diff --git a/src/gf.c b/src/gf.c index 47dea836f6daa..a29f19dacd1fb 100644 --- a/src/gf.c +++ b/src/gf.c @@ -882,7 +882,7 @@ static jl_method_instance_t *cache_method( if (!cache_with_orig && mt) { // now examine what will happen if we chose to use this sig in the cache // TODO: should we first check `compilationsig <: definition`? - temp = ml_matches(mt->defs, 0, compilationsig, -1, 1, world, &min_valid, &max_valid); // TODO: use MAX_UNSPECIALIZED_CONFLICTS? + temp = ml_matches(mt->defs, 0, compilationsig, MAX_UNSPECIALIZED_CONFLICTS, 1, world, &min_valid, &max_valid); int guards = 0; if (temp == jl_false) { cache_with_orig = 1; diff --git a/test/misc.jl b/test/misc.jl index a011e72ee5166..47adccf388243 100644 --- a/test/misc.jl +++ b/test/misc.jl @@ -174,6 +174,9 @@ v11801, t11801 = @timed sin(1) # interactive utilities +struct ambigconvert; end # inject a problematic `convert` method to ensure it still works +Base.convert(::Any, v::ambigconvert) = v + import Base.summarysize @test summarysize(Core) > (summarysize(Core.Compiler) + Base.summarysize(Core.Intrinsics)) > Core.sizeof(Core) @test summarysize(Base) > 100_000 * sizeof(Ptr)