Skip to content

Commit 7ee404c

Browse files
authored
fix _apply_pure deprecation (#57800)
Fix typo from #57532 and ensure "inference world" code has the permitted ability to inspect the max world age, since it needs that info in order to cache results correctly.
1 parent f82917a commit 7ee404c

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

base/boot.jl

+1-1
Original file line numberDiff line numberDiff line change
@@ -1017,7 +1017,7 @@ _setparser!(parser) = setglobal!(Core, :_parse, parser)
10171017

10181018
# support for deprecated uses of builtin functions
10191019
_apply(x...) = _apply_iterate(Main.Base.iterate, x...)
1020-
_apply_pure(x...) = invoke_in_world_total(typemax_UInt, x...)
1020+
const _apply_pure = _apply
10211021
const _call_latest = invokelatest
10221022
const _call_in_world = invoke_in_world
10231023

src/gf.c

+3
Original file line numberDiff line numberDiff line change
@@ -532,7 +532,10 @@ JL_DLLEXPORT jl_value_t *jl_call_in_typeinf_world(jl_value_t **args, int nargs)
532532
jl_task_t *ct = jl_current_task;
533533
size_t last_age = ct->world_age;
534534
ct->world_age = jl_typeinf_world;
535+
int last_pure = ct->ptls->in_pure_callback;
536+
ct->ptls->in_pure_callback = 0;
535537
jl_value_t *ret = jl_apply(args, nargs);
538+
ct->ptls->in_pure_callback = last_pure;
536539
ct->world_age = last_age;
537540
return ret;
538541
}

0 commit comments

Comments
 (0)