Skip to content

Commit 9a9d79b

Browse files
mlechuaviatesk
authored andcommitted
Add some missing world age increments
Was missing increments after closure type declarations and a kwarg function declaration. Fixes the world age warnings when running tests. Part of JuliaLang/julia#56509
1 parent 08f95ef commit 9a9d79b

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

src/closure_conversion.jl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -389,6 +389,7 @@ function _convert_closures(ctx::ClosureConversionCtx, ex)
389389
type_for_closure(ctx, ex, name_str, field_syms, field_is_box)
390390
if !ctx.is_toplevel_seq_point
391391
push!(ctx.toplevel_stmts, closure_type_def)
392+
push!(ctx.toplevel_stmts, @ast ctx ex [K"latestworld_if_toplevel"])
392393
closure_type_def = nothing
393394
end
394395
closure_info = ClosureInfo(closure_type_, field_syms, field_inds)
@@ -413,6 +414,7 @@ function _convert_closures(ctx::ClosureConversionCtx, ex)
413414
end
414415
@ast ctx ex [K"block"
415416
closure_type_def
417+
[K"latestworld_if_toplevel"]
416418
closure_type := if isempty(type_params)
417419
closure_type_
418420
else

src/desugaring.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2811,6 +2811,7 @@ function keyword_function_defs(ctx, srcref, callex_srcref, name_str, typevar_nam
28112811

28122812
kw_func_method_defs = @ast ctx srcref [K"block"
28132813
[K"function_decl" body_func_name]
2814+
[K"latestworld"]
28142815
[K"scope_block"(scope_type=:hard)
28152816
[K"method_defs"
28162817
body_func_name

0 commit comments

Comments
 (0)