From 8ddd5726da54a48b1f13e9b2658692c7c6155d7f Mon Sep 17 00:00:00 2001 From: Keno Fischer Date: Wed, 20 Nov 2024 05:01:00 +0000 Subject: [PATCH] Add some explicit world age increments Julia 1.12 will be stricter about implicit world age increments at toplevel and these annotations may be required (and are harmless on older julia versions). See https://github.com/JuliaLang/julia/pull/56509. --- test/compiler.jl | 3 ++- test/ir.jl | 12 ++++++------ 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/test/compiler.jl b/test/compiler.jl index 1fce761..9b11bde 100644 --- a/test/compiler.jl +++ b/test/compiler.jl @@ -370,7 +370,8 @@ end @test fir(nothing, false, 1) === 11 ir = @code_ir f_try_catch7() - @test func(ir)(nothing) === 1. + fir = func(ir) + @test fir(nothing) === 1. ir = @code_ir f_try_catch8(1.) fir = func(ir) diff --git a/test/ir.jl b/test/ir.jl index f436b13..5796f74 100644 --- a/test/ir.jl +++ b/test/ir.jl @@ -49,8 +49,8 @@ let @test inline_at !== nothing ir = IRTools.inline(ir1, inline_at, ir2) f = IRTools.func(ir) - @test f(nothing, 2, 3) == 3 - @test f(nothing, 3, 2) == 3 + @test invokelatest(f, nothing, 2, 3) == 3 + @test invokelatest(f, nothing, 3, 2) == 3 end function foo1(x) @@ -77,8 +77,8 @@ let end @test inline_at !== nothing ir3 = IRTools.inline(ir, inline_at, ir2) - @test IRTools.func(ir3)(nothing, 2) == 12 - @test IRTools.func(ir3)(nothing, 101) == 101 + @test invokelatest(IRTools.func(ir3), nothing, 2) == 12 + @test invokelatest(IRTools.func(ir3), nothing, 101) == 101 end @@ -103,6 +103,6 @@ let end @test inline_at !== nothing ir3 = IRTools.inline(ir, inline_at, ir2) - @test IRTools.func(ir3)(nothing, 2) == foo2(2) - @test IRTools.func(ir3)(nothing, -2) == foo2(-2) + @test invokelatest(IRTools.func(ir3), nothing, 2) == foo2(2) + @test invokelatest(IRTools.func(ir3), nothing, -2) == foo2(-2) end