From 60f32e3937c17008ba3d1d14882b91184b7b0517 Mon Sep 17 00:00:00 2001 From: Kristoffer Carlsson Date: Sun, 25 Jun 2017 09:55:11 -0700 Subject: [PATCH] test fixed inlining bug #18735 (#22530) --- test/misc.jl | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/test/misc.jl b/test/misc.jl index 28612a37ab2bb8..3063912756061f 100644 --- a/test/misc.jl +++ b/test/misc.jl @@ -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