Skip to content

Commit

Permalink
Merge pull request #16468 from JuliaLang/test14878
Browse files Browse the repository at this point in the history
Close #14878 by adding test for uncaught undef. var.
  • Loading branch information
IainNZ committed May 20, 2016
2 parents f24bdf4 + 361322e commit bfb0ac6
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions test/core.jl
Original file line number Diff line number Diff line change
Expand Up @@ -4157,3 +4157,18 @@ function f16431(x)
z * g(x)
end
@test @inferred(f16431(1)) == 4

# issue #14878
type A14878
ext
end
A14878() = A14878(Dict())
type B14878
end
B14878(ng) = B14878()
function trigger14878()
w = A14878()
w.ext[:14878] = B14878(junk) # junk not defined!
return w
end
@test_throws UndefVarError trigger14878()

0 comments on commit bfb0ac6

Please sign in to comment.