diff --git a/Compiler/src/Compiler.jl b/Compiler/src/Compiler.jl index e1c167e57ed08..b8a1742f4d740 100644 --- a/Compiler/src/Compiler.jl +++ b/Compiler/src/Compiler.jl @@ -137,7 +137,7 @@ baremodule BuildSettings using Core: ARGS, include, Int, === using ..Compiler: >, getindex, length -global MAX_METHODS::Int = 3 +global MAX_METHODS::Int = 1 if length(ARGS) > 2 && ARGS[2] === "--buildsettings" include(BuildSettings, ARGS[3]) diff --git a/Compiler/src/abstractinterpretation.jl b/Compiler/src/abstractinterpretation.jl index 100cdd97e511a..a3bd7c94bd055 100644 --- a/Compiler/src/abstractinterpretation.jl +++ b/Compiler/src/abstractinterpretation.jl @@ -123,6 +123,12 @@ function abstract_call_gf_by_type(interp::AbstractInterpreter, @nospecialize(fun return Future(CallMeta(Any, Any, Effects(), NoCallInfo())) end + # Disable inference when not fully covered (similar to union split limit) + if !fully_covering(matches) + add_remark!(interp, sv, "Inference disabled for method without full coverage") + return Future(CallMeta(Any, Any, Effects(), NoCallInfo())) + end + (; valid_worlds, applicable) = matches update_valid_age!(sv, valid_worlds) # need to record the negative world now, since even if we don't generate any useful information, inlining might want to add an invoke edge and it won't have this information anymore if bail_out_toplevel_call(interp, sv)