Skip to content

Commit

Permalink
make test cases for #48455 more reliable (#48464)
Browse files Browse the repository at this point in the history
  • Loading branch information
aviatesk authored Feb 1, 2023
1 parent 768d537 commit b736924
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions test/compiler/inline.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1921,11 +1921,17 @@ let src = code_typed1((Union{Bool,Tuple{String,Any}},)) do x
@test any(iscall((src, f48397)), src.code)
end
g48397::Union{Bool,Tuple{String,Any}} = ("48397", 48397)
@test_throws MethodError let
Base.Experimental.@force_compile
f48397(g48397)
let res = @test_throws MethodError let
Base.Experimental.@force_compile
f48397(g48397)
end
err = res.value
@test err.f === f48397 && err.args === (g48397,)
end
@test_throws MethodError let
Base.Experimental.@force_compile
convert(Union{Bool,Tuple{String,String}}, g48397)
let res = @test_throws MethodError let
Base.Experimental.@force_compile
convert(Union{Bool,Tuple{String,String}}, g48397)
end
err = res.value
@test err.f === convert && err.args === (Union{Bool,Tuple{String,String}}, g48397)
end

0 comments on commit b736924

Please sign in to comment.