From 7cb229b6b69e85bc441fc26b4ae5f9ac74cb4022 Mon Sep 17 00:00:00 2001 From: Jameson Nash Date: Thu, 2 Nov 2017 10:51:19 -0400 Subject: [PATCH] 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 --- 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