Skip to content

Commit

Permalink
test for #17811, type of e.g. abs(Integer[]) (#17891)
Browse files Browse the repository at this point in the history
This tests that the result type of an empty comprehension is big enough to hold the possible results.
(cherry picked from commit 93c6061)
ranjanan authored and tkelman committed Aug 11, 2016

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
1 parent 9bc9a47 commit 916d894
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions test/inference.jl
Original file line number Diff line number Diff line change
@@ -274,3 +274,11 @@ end
let f(x) = (x===nothing) ? 1 : 1.0
@test Base.return_types(f, (Void,)) == Any[Int]
end

# Issue #17811
let I = Integer[]
I = abs(I)
@test typeof(I) == Array{Any,1}
push!(I, 1)
@test I == Any[1]
end

2 comments on commit 916d894

@tkelman
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nanosoldier runbenchmarks(ALL, vs = "@0030eec2f332f353e6890ca289ac2aca55532dde")

916d894 vs 0.5.0-rc0

I'm guessing that #17847 made string join slower

@nanosoldier
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your benchmark job has completed - possible performance regressions were detected. A full report can be found here. cc @jrevels

Please sign in to comment.