From 6b3dd9d8b759b6908a1c7c849365d272fbe680f5 Mon Sep 17 00:00:00 2001 From: Jameson Nash Date: Mon, 6 Nov 2017 12:36:44 -0500 Subject: [PATCH] inference: avoid world age assertion (#24449) 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 --- src/gf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gf.c b/src/gf.c index 61b1f6ea7fd35..e6c1c8c9511dc 100644 --- a/src/gf.c +++ b/src/gf.c @@ -1348,7 +1348,7 @@ static int invalidate_backedges(jl_typemap_entry_t *oldentry, struct typemap_int // add a backedge from callee to caller JL_DLLEXPORT void jl_method_instance_add_backedge(jl_method_instance_t *callee, jl_method_instance_t *caller) { - assert(callee->min_world <= caller->min_world && callee->max_world >= caller->max_world); + assert(callee->def.method->min_world <= caller->min_world && callee->max_world >= caller->max_world); JL_LOCK(&callee->def.method->writelock); if (!callee->backedges) { // lazy-init the backedges array