Skip to content

Commit 7cb229b

Browse files
committed
inference: avoid world age assertion
This was over-aggressive. It was only correct in the case where we where depending on the `.inferred` field or `.rettype` contents exactly. However, sometimes inference of the method instead depends on `.def.source`. fix #23981 fix #23768
1 parent f16a119 commit 7cb229b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/gf.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -1348,7 +1348,7 @@ static int invalidate_backedges(jl_typemap_entry_t *oldentry, struct typemap_int
13481348
// add a backedge from callee to caller
13491349
JL_DLLEXPORT void jl_method_instance_add_backedge(jl_method_instance_t *callee, jl_method_instance_t *caller)
13501350
{
1351-
assert(callee->min_world <= caller->min_world && callee->max_world >= caller->max_world);
1351+
assert(callee->def.method->min_world <= caller->min_world && callee->max_world >= caller->max_world);
13521352
JL_LOCK(&callee->def.method->writelock);
13531353
if (!callee->backedges) {
13541354
// lazy-init the backedges array

0 commit comments

Comments
 (0)