Skip to content

Commit ea939f6

Browse files
ranjananJeffBezanson
authored andcommittedAug 9, 2016
test for #17811, type of e.g. abs(Integer[]) (#17891)
This tests that the result type of an empty comprehension is big enough to hold the possible results.
1 parent aa3cfcf commit ea939f6

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed
 

‎test/inference.jl

+8
Original file line numberDiff line numberDiff line change
@@ -269,3 +269,11 @@ function f17572{A}(::Type{Val{A}})
269269
end
270270
# test that inference doesn't error
271271
@test isa(code_typed(f17572, (Type{Val{0}},)), Array)
272+
273+
# Issue #17811
274+
let I = Integer[]
275+
I = abs(I)
276+
@test typeof(I) == Array{Any,1}
277+
push!(I, 1)
278+
@test I == Any[1]
279+
end

0 commit comments

Comments
 (0)