Skip to content

Commit

Permalink
test fixed inlining bug #18735 (#22530)
Browse files Browse the repository at this point in the history
  • Loading branch information
KristofferC authored Jun 25, 2017
1 parent cb50e0b commit 6218a1f
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions test/misc.jl
Original file line number Diff line number Diff line change
Expand Up @@ -794,3 +794,9 @@ end # module
# @test @test_warn "A{T}(x::S) where {T, S} is deprecated, use f() instead." A{Int}(1.)
# @test @test_nowarn A{Int}(1.)
end

@testset "inline bug #18735" begin
@noinline f(n) = n ? error() : Int
g() = Union{f(true)}
@test_throws ErrorException g()
end

0 comments on commit 6218a1f

Please sign in to comment.