JuliaGPU / JuliaGPU/GPUArrays.jl

TestSuite.compare does not handle Nothing

Open
#272 0 comments 0 reactions 0 assignees View on GitHub
bug good first issue
Dominant language
Julia
Stars
450
Forks
104
Avg merge
1d 4h
Merged PRs (30d)
10

Description

```
findfirst: Error During Test at /builds/JuliaGPU/CuArrays.jl/test/base.jl:313
Test threw exception
Expression: testf((x->begin
findfirst(x)
end), fill(false, 10))
MethodError: no method matching length(::Nothing)
Closest candidates are:
length(!Matched::Core.SimpleVector) at essentials.jl:593
length(!Matched::Base.MethodList) at reflection.jl:849
length(!Matched::Core.MethodTable) at reflection.jl:923
...
Stacktrace:
[1] _similar_for(::UnitRange{Int64}, ::Type{Any}, ::Nothing, ::Base.HasLength) at ./array.jl:533
[2] _collect(::UnitRange{Int64}, ::Nothing, ::Base.HasEltype, ::Base.HasLength) at ./array.jl:566
[3] collect(::Nothing) at ./array.jl:560
[4] #compare#1(::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}, ::typeof(Main.TestSuite.compare), ::Function, ::Type{CuArray}, ::Array{Bool,1}) at /builds/JuliaGPU/CuArrays.jl/.julia/packages/GPUArrays/OXvxB/test/testsuite.jl:24
[5] compare at /builds/JuliaGPU/CuArrays.jl/.julia/packages/GPUArrays/OXvxB/test/testsuite.jl:20 [inlined]
[6] #testf#3 at /builds/JuliaGPU/CuArrays.jl/test/runtests.jl:18 [inlined]
[7] testf(::Function, ::Array{Bool,1}) at /builds/JuliaGPU/CuArrays.jl/test/runtests.jl:18
[8] top-level scope at /builds/JuliaGPU/CuArrays.jl/test/base.jl:313
[9] top-level scope at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.3/Test/src/Test.jl:1107
[10] top-level scope at /builds/JuliaGPU/CuArrays.jl/test/base.jl:313
```

https://github.com/JuliaGPU/CuArrays.jl/pull/712

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.