Skip to content

Commit e7e97ca

Browse files
KaanKesginLWAnton Oresten
authored andcommitted
Fix undefined variable in memory_source error message (#2990)
The fallback method used `typeof(t)` but the parameter was anonymous. This would cause an UndefVarError instead of the intended error message when passing an unsupported type to CuTexture.
1 parent 87b06e7 commit e7e97ca

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/texture.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,7 @@ Currently, that is not being enforced.
353353
CuTexture(x::CuArray{T,N}; kwargs...) where {T,N} =
354354
CuTexture{T,N}(x; kwargs...)
355355

356-
memory_source(::Any) = error("Unknown texture source $(typeof(t))")
356+
memory_source(t::Any) = error("Unknown texture source $(typeof(t))")
357357
memory_source(::CuArray) = LinearMemorySource()
358358
memory_source(::CuTextureArray) = ArrayMemorySource()
359359

0 commit comments

Comments
 (0)