Skip to content

Commit 349600d

Browse files
committed
fix compilation world-age assertion
fix #25705 (comment)
1 parent 131813f commit 349600d

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

base/compiler/typeinfer.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ const COMPILER_TEMP_SYM = Symbol("#temp#")
55
# add the real backedges
66
function finalize_backedges(frame::InferenceState)
77
toplevel = !isa(frame.linfo.def, Method)
8-
if !toplevel && frame.cached && frame.max_valid == typemax(UInt)
8+
if !toplevel && (frame.cached || frame.parent !== nothing) && frame.max_valid == typemax(UInt)
99
caller = frame.linfo
1010
for edges in frame.stmt_edges
1111
i = 1

base/sysimg.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ setproperty!(x::Module, f::Symbol, v) = setfield!(x, f, v)
1616
getproperty(x::Type, f::Symbol) = getfield(x, f)
1717
setproperty!(x::Type, f::Symbol, v) = setfield!(x, f, v)
1818

19+
function include_relative end
1920
function include(mod::Module, path::AbstractString)
2021
local result
2122
if INCLUDE_STATE === 1

src/codegen.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1101,7 +1101,7 @@ jl_llvm_functions_t jl_compile_linfo(jl_method_instance_t **pli, jl_code_info_t
11011101
else if (!src) {
11021102
// If the caller didn't provide the source,
11031103
// try to infer it for ourself, but first, re-check if it's already compiled.
1104-
// assert(li->min_world <= world && li->max_world >= world); TODO: Re-enable at some point
1104+
assert(li->min_world <= world && li->max_world >= world);
11051105
if ((params->cached && decls.functionObject != NULL) || li->jlcall_api == JL_API_CONST)
11061106
goto locked_out;
11071107

0 commit comments

Comments
 (0)