diff --git a/test/opaque_closure.jl b/test/opaque_closure.jl index da2797b8ab68a4..81ca94f484b90f 100644 --- a/test/opaque_closure.jl +++ b/test/opaque_closure.jl @@ -271,14 +271,16 @@ end let ci = code_typed(+, (Int, Int))[1][1] ir = Core.Compiler.inflate_ir(ci) @test OC(ir, 2, false)(40, 2) == 42 + @test OC(ci)(40, 2) == 42 end let ci = code_typed((x, y...)->(x, y), (Int, Int))[1][1] ir = Core.Compiler.inflate_ir(ci) @test OC(ir, 2, true)(40, 2) === (40, (2,)) + @test OC(ci)(40, 2) === (40, (2,)) end let ci = code_typed((x, y...)->(x, y), (Int, Int))[1][1] - @test OC(ci)(1, 2) === (1, (2,)) + @test_throws MethodError OC(ir, 2, true)(1, 2, 3) @test_throws MethodError OC(ci)(1, 2, 3) end