@@ -1482,8 +1482,17 @@ function abstract_call_known(interp::AbstractInterpreter, @nospecialize(f),
14821482 if f === _apply_iterate
14831483 return abstract_apply (interp, argtypes, sv, max_methods)
14841484 elseif f === invoke
1485- return abstract_invoke (interp, arginfo, sv)
1485+ call = abstract_invoke (interp, arginfo, sv)
1486+ if call. info === false
1487+ if call. rt === Bottom
1488+ tristate_merge! (sv, Effects (EFFECTS_TOTAL, nothrow= ALWAYS_FALSE))
1489+ else
1490+ tristate_merge! (sv, Effects ())
1491+ end
1492+ end
1493+ return call
14861494 elseif f === modifyfield!
1495+ tristate_merge! (sv, Effects ()) # TODO
14871496 return abstract_modifyfield! (interp, argtypes, sv)
14881497 end
14891498 rt = abstract_call_builtin (interp, f, arginfo, sv, max_methods)
@@ -1622,13 +1631,16 @@ function abstract_call(interp::AbstractInterpreter, arginfo::ArgInfo,
16221631 if isa (ft, PartialOpaque)
16231632 newargtypes = copy (argtypes)
16241633 newargtypes[1 ] = ft. env
1634+ tristate_merge! (sv, Effects ()) # TODO
16251635 return abstract_call_opaque_closure (interp, ft, ArgInfo (arginfo. fargs, newargtypes), sv)
16261636 elseif (uft = unwrap_unionall (widenconst (ft)); isa (uft, DataType) && uft. name === typename (Core. OpaqueClosure))
1637+ tristate_merge! (sv, Effects ()) # TODO
16271638 return CallMeta (rewrap_unionall ((uft:: DataType ). parameters[2 ], widenconst (ft)), false )
16281639 elseif f === nothing
16291640 # non-constant function, but the number of arguments is known
16301641 # and the ft is not a Builtin or IntrinsicFunction
16311642 if hasintersect (widenconst (ft), Union{Builtin, Core. OpaqueClosure})
1643+ tristate_merge! (sv, Effects ())
16321644 add_remark! (interp, sv, " Could not identify method table for call" )
16331645 return CallMeta (Any, false )
16341646 end
0 commit comments