@@ -1253,6 +1253,9 @@ function abstract_call_known(interp::AbstractInterpreter, @nospecialize(f),
12531253 return abstract_modifyfield! (interp, argtypes, sv)
12541254 end
12551255 return CallMeta (abstract_call_builtin (interp, f, fargs, argtypes, sv, max_methods), false )
1256+ elseif isa (f, Core. OpaqueClosure)
1257+ # calling an OpaqueClosure about which we have no information returns no information
1258+ return CallMeta (Any, false )
12561259 elseif f === Core. kwfunc
12571260 if la == 2
12581261 aty = argtypes[2 ]
@@ -1380,8 +1383,8 @@ function abstract_call(interp::AbstractInterpreter, fargs::Union{Nothing,Vector{
13801383 f = argtype_to_function (ft)
13811384 if isa (ft, PartialOpaque)
13821385 return abstract_call_opaque_closure (interp, ft, argtypes[2 : end ], sv)
1383- elseif (uft = unwrap_unionall (ft ); isa (uft, DataType) && uft. name === typename (Core. OpaqueClosure))
1384- return CallMeta (rewrap_unionall ((uft:: DataType ). parameters[2 ], ft ), false )
1386+ elseif (uft = unwrap_unionall (widenconst (ft) ); isa (uft, DataType) && uft. name === typename (Core. OpaqueClosure))
1387+ return CallMeta (rewrap_unionall ((uft:: DataType ). parameters[2 ], widenconst (ft) ), false )
13851388 elseif f === nothing
13861389 # non-constant function, but the number of arguments is known
13871390 # and the ft is not a Builtin or IntrinsicFunction
0 commit comments