Skip to content

Commit b433290

Browse files
committed
make test cases for #48455 more reliable
xref: <#48455 (comment)>
1 parent 94c4fb5 commit b433290

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed

test/compiler/inline.jl

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1921,11 +1921,17 @@ let src = code_typed1((Union{Bool,Tuple{String,Any}},)) do x
19211921
@test any(iscall((src, f48397)), src.code)
19221922
end
19231923
g48397::Union{Bool,Tuple{String,Any}} = ("48397", 48397)
1924-
@test_throws MethodError let
1925-
Base.Experimental.@force_compile
1926-
f48397(g48397)
1924+
let res = @test_throws MethodError let
1925+
Base.Experimental.@force_compile
1926+
f48397(g48397)
1927+
end
1928+
err = res.value
1929+
@test err.f === f48397 && err.args === (g48397,)
19271930
end
1928-
@test_throws MethodError let
1929-
Base.Experimental.@force_compile
1930-
convert(Union{Bool,Tuple{String,String}}, g48397)
1931+
let res = @test_throws MethodError let
1932+
Base.Experimental.@force_compile
1933+
convert(Union{Bool,Tuple{String,String}}, g48397)
1934+
end
1935+
err = res.value
1936+
@test err.f === convert && err.args === (Union{Bool,Tuple{String,String}}, g48397)
19311937
end

0 commit comments

Comments
 (0)