From 2adef76f1b3ba3c2b1eb0ab5e07b71a5eba28798 Mon Sep 17 00:00:00 2001 From: Keno Fischer Date: Wed, 20 Nov 2024 05:13:24 +0000 Subject: [PATCH] Add an explicit `invokelatest` after `delete_method` in loop Loops will no longer have implicit world age increments at top level in Julia 1.12. See https://github.com/JuliaLang/julia/pull/56509. --- test/runtests.jl | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/test/runtests.jl b/test/runtests.jl index 3b1e384..3e8a889 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -158,10 +158,11 @@ end while length(collect(methods(j))) > 0 Base.delete_method((first ∘ methods)(j)) - - T = Tuple{Any, Vararg{Any}} - @test (length ∘ collect ∘ static_methods)(j, T) == length(collect(methods(j))) - @test static_method_count(j, T) == length(collect(methods(j))) + invokelatest() do + T = Tuple{Any, Vararg{Any}} + @test (length ∘ collect ∘ static_methods)(j, T) == length(collect(methods(j))) + @test static_method_count(j, T) == length(collect(methods(j))) + end end end end