File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -805,8 +805,6 @@ void SILGenFunction::emitCaptures(SILLocation loc,
805
805
// If this is a boxed variable, we can use it directly.
806
806
if (Entry.box &&
807
807
entryValue->getType ().getASTType () == minimalLoweredType) {
808
- // If our captured value is a box with a moveonlywrapped type inside,
809
- // unwrap it.
810
808
auto box = ManagedValue::forBorrowedObjectRValue (Entry.box );
811
809
// We can guarantee our own box to the callee.
812
810
if (canGuarantee) {
@@ -815,6 +813,8 @@ void SILGenFunction::emitCaptures(SILLocation loc,
815
813
box = box.copy (*this , loc);
816
814
}
817
815
816
+ // If our captured value is a box with a moveonlywrapped type inside,
817
+ // unwrap it.
818
818
if (box.getType ().isBoxedMoveOnlyWrappedType (&F)) {
819
819
CleanupCloner cloner (*this , box);
820
820
box = cloner.clone (
You can’t perform that action at this time.
0 commit comments