Skip to content

Commit

Permalink
Close #14878 by adding test for uncaught undef. var.
Browse files Browse the repository at this point in the history
  • Loading branch information
IainNZ committed May 20, 2016
1 parent ce67648 commit 361322e
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 361322e

Please sign in to comment.