Skip to content

Commit 398d610

Browse files
authored
Merge pull request swiftlang#15099 from gottesmm/pr-d8c5e55f0e9ec3eb499410c22fa6d8936aea147e
When assigning into memory via builtin assign, be sure that we store …
2 parents 8212f9c + 01c9fe4 commit 398d610

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/SILGen/SILGenBuiltin.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ static ManagedValue emitBuiltinAssign(SILGenFunction &SGF,
268268
// Build the value to be assigned, reconstructing tuples if needed.
269269
auto src = RValue(SGF, args.slice(0, args.size() - 1), assignFormalType);
270270

271-
std::move(src).assignInto(SGF, loc, addr);
271+
std::move(src).ensurePlusOne(SGF, loc).assignInto(SGF, loc, addr);
272272

273273
return ManagedValue::forUnmanaged(SGF.emitEmptyTuple(loc));
274274
}

0 commit comments

Comments
 (0)