Skip to content

Commit e6d1344

Browse files
committed
SILGen: Fix incorrect formal type.
Noticed by inspection. The `self` parameter in an initializer never requires lvalue reabstraction in practice, so this should be NFC (otherwise we would have noticed it was broken already).
1 parent f89c701 commit e6d1344

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/SILGen/SILGenConstructor.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -726,7 +726,8 @@ static void emitMemberInit(SILGenFunction &SGF, VarDecl *selfDecl,
726726
SGFContext::AllowImmediatePlusZero)
727727
.getAsSingleValue(SGF, loc);
728728
else
729-
self = SGF.emitLValueForDecl(loc, selfDecl, src.getType(),
729+
self = SGF.emitLValueForDecl(loc, selfDecl,
730+
src.getType()->getCanonicalType(),
730731
AccessKind::Write,
731732
AccessSemantics::DirectToStorage);
732733

0 commit comments

Comments
 (0)