Skip to content

Commit d7da2a4

Browse files
authored
minor follow ups for opaque closure works (#40052)
1 parent c700781 commit d7da2a4

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

base/compiler/abstractinterpretation.jl

+1-1
Original file line numberDiff line numberDiff line change
@@ -1235,7 +1235,7 @@ function abstract_call_opaque_closure(interp::AbstractInterpreter, closure::Part
12351235
pushfirst!(argtypes, closure.env)
12361236
sig = argtypes_to_type(argtypes)
12371237
rt, edgecycle, edge = abstract_call_method(interp, closure.source::Method, sig, Core.svec(), false, sv)
1238-
add_backedge!(edge, sv)
1238+
edge !== nothing && add_backedge!(edge, sv)
12391239
tt = closure.typ
12401240
sigT = unwrap_unionall(tt).parameters[1]
12411241
match = MethodMatch(sig, Core.svec(), closure.source::Method, sig <: rewrap_unionall(sigT, tt))

test/opaque_closure.jl

+1-1
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ function oc_varargs_constprop()
188188
oc = @opaque (args...)->args[1]+args[2]+args[3]
189189
return Val{oc(1,2,3)}()
190190
end
191-
Base.return_types(oc_varargs_constprop, Tuple{}) == Any[Val{6}]
191+
@test Base.return_types(oc_varargs_constprop, Tuple{}) == Any[Val{6}]
192192

193193
# OpaqueClosure ABI
194194
f_oc_noinline(x) = @opaque function (y)

0 commit comments

Comments
 (0)