Skip to content

Commit

Permalink
test fixed inlining bug #18735 (#22530)
Browse files Browse the repository at this point in the history
Ref #22530
(cherry picked from commit 6218a1f)
  • Loading branch information
KristofferC authored and ararslan committed Sep 11, 2017
1 parent ddba785 commit 720dda6
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 @@ -742,3 +742,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 720dda6

Please sign in to comment.