Skip to content

Commit

Permalink
Add some explicit world age increments
Browse files Browse the repository at this point in the history
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 JuliaLang/julia#56509.
  • Loading branch information
Keno committed Nov 20, 2024
1 parent dd1f2c2 commit 8ddd572
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
3 changes: 2 additions & 1 deletion test/compiler.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
12 changes: 6 additions & 6 deletions test/ir.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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


Expand All @@ -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

0 comments on commit 8ddd572

Please sign in to comment.