Skip to content

Commit

Permalink
inference: avoid world age assertion (#24449)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
vtjnash authored Nov 6, 2017
1 parent 088e52b commit 6b3dd9d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/gf.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 6b3dd9d

Please sign in to comment.