Skip to content

Commit 41529b6

Browse files
LilithHafnerKristofferC
authored andcommitted
Also disable word splitting when the matches are not fully covered (regardless of number of methods) [Using Claude]
1 parent 607ac08 commit 41529b6

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Compiler/src/abstractinterpretation.jl

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,12 @@ function abstract_call_gf_by_type(interp::AbstractInterpreter, @nospecialize(fun
122122
return Future(CallMeta(Any, Any, Effects(), NoCallInfo()))
123123
end
124124

125+
# Disable inference when not fully covered (similar to union split limit)
126+
if !fully_covering(matches)
127+
add_remark!(interp, sv, "Inference disabled for method without full coverage")
128+
return Future(CallMeta(Any, Any, Effects(), NoCallInfo()))
129+
end
130+
125131
(; valid_worlds, applicable) = matches
126132
update_valid_age!(sv, get_inference_world(interp), 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
127133
if bail_out_toplevel_call(interp, sv)

0 commit comments

Comments
 (0)