Skip to content

Commit 9b889e7

Browse files
committed
Fix a use-after-free error I introduced
rdar://45894044
1 parent 38e0f38 commit 9b889e7

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/SILGen/SILGenLValue.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1291,14 +1291,15 @@ namespace {
12911291
bool isDirectAccessorUse = this->IsDirectAccessorUse;
12921292
auto indices = std::move(this->Indices);
12931293
auto baseFormalType = this->BaseFormalType;
1294+
bool isOnSelfParameter = this->IsOnSelfParameter;
12941295

12951296
// Drop this component from the l-value.
12961297
dest.dropLastComponent(*this);
12971298

12981299
return emitAssignWithSetter(SGF, loc, std::move(dest), baseFormalType,
12991300
isSuper, setter, isDirectAccessorUse, subs,
13001301
std::move(indices), std::move(value),
1301-
IsOnSelfParameter);
1302+
isOnSelfParameter);
13021303
}
13031304

13041305
static void emitAssignWithSetter(SILGenFunction &SGF, SILLocation loc,

0 commit comments

Comments
 (0)