Skip to content

Commit

Permalink
add test for #9770
Browse files Browse the repository at this point in the history
  • Loading branch information
vtjnash committed Feb 29, 2016
1 parent 8041588 commit 9518206
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 1 deletion.
2 changes: 1 addition & 1 deletion test/choosetests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Upon return, `tests` is a vector of fully-expanded test names, and
""" ->
function choosetests(choices = [])
testnames = [
"linalg", "core", "keywordargs", "numbers", "printf",
"linalg", "core", "inference", "keywordargs", "numbers", "printf",
"char", "string", "triplequote", "unicode",
"dates", "dict", "hashing", "remote", "iobuffer", "staged",
"arrayops", "tuple", "subarray", "reduce", "reducedim", "random",
Expand Down
24 changes: 24 additions & 0 deletions test/inference.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# This file is a part of Julia. License is MIT: http://julialang.org/license

# test for Core.Inference correctness and precision

const Bottom = Union{}

# issue 9770
@noinline x9770() = false
function f9770(x)
if x9770()
g9770(:a, :foo)
else
x
end
end
function g9770(x,y)
if isa(y, Symbol)
f9770(x)
else
g9770(:a, :foo)
end
end
@test g9770(:a, "c") === :a
@test g9770(:b, :c) === :b

0 comments on commit 9518206

Please sign in to comment.