@@ -43,30 +43,30 @@ CC.method_table(interp::MTOverlayInterp) = CC.OverlayMethodTable(CC.get_world_co
4343
4444strangesin (x) = sin (x)
4545@overlay OverlayedMT strangesin (x:: Float64 ) = iszero (x) ? nothing : cos (x)
46- @test Base. return_types ((Float64,); MTOverlayInterp ()) do x
46+ @test Base. return_types ((Float64,); interp = MTOverlayInterp ()) do x
4747 strangesin (x)
4848end |> only === Union{Float64,Nothing}
49- @test Base. return_types ((Any,); MTOverlayInterp ()) do x
49+ @test Base. return_types ((Any,); interp = MTOverlayInterp ()) do x
5050 Base. @invoke strangesin (x:: Float64 )
5151end |> only === Union{Float64,Nothing}
5252
5353# fallback to the internal method table
54- @test Base. return_types ((Int,), MTOverlayInterp ()) do x
54+ @test Base. return_types ((Int,); interp = MTOverlayInterp ()) do x
5555 cos (x)
5656end |> only === Float64
57- @test Base. return_types ((Any,); MTOverlayInterp ()) do x
57+ @test Base. return_types ((Any,); interp = MTOverlayInterp ()) do x
5858 Base. @invoke cos (x:: Float64 )
5959end |> only === Float64
6060
6161# not fully covered overlay method match
6262overlay_match (:: Any ) = nothing
6363@overlay OverlayedMT overlay_match (:: Int ) = missing
64- @test Base. return_types ((Any,), MTOverlayInterp ()) do x
64+ @test Base. return_types ((Any,); interp = MTOverlayInterp ()) do x
6565 overlay_match (x)
6666end |> only === Union{Nothing,Missing}
6767
6868# partial pure/concrete evaluation
69- @test Base. return_types ((), MTOverlayInterp ()) do
69+ @test Base. return_types (; interp = MTOverlayInterp ()) do
7070 isbitstype (Int) ? nothing : missing
7171end |> only === Nothing
7272Base. @assume_effects :terminates_globally function issue41694 (x)
@@ -78,13 +78,13 @@ Base.@assume_effects :terminates_globally function issue41694(x)
7878 end
7979 return res
8080end
81- @test Base. return_types ((), MTOverlayInterp ()) do
81+ @test Base. return_types (; interp = MTOverlayInterp ()) do
8282 issue41694 (3 ) == 6 ? nothing : missing
8383end |> only === Nothing
8484
8585# disable partial pure/concrete evaluation when tainted by any overlayed call
8686Base. @assume_effects :total totalcall (f, args... ) = f (args... )
87- @test Base. return_types (; MTOverlayInterp ()) do
87+ @test Base. return_types (; interp = MTOverlayInterp ()) do
8888 if totalcall (strangesin, 1.0 ) == cos (1.0 )
8989 return nothing
9090 else
0 commit comments