Skip to content

Commit 9500381

Browse files
committed
[SILGen] Use the property wrapper backing storage when forwarding parameters
with external property wrappers. Otherwise, the code will attempt to forward the wrapped value type to a function that accepts the property wrapper type.
1 parent bd80342 commit 9500381

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lib/SILGen/SILGenProlog.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -306,6 +306,10 @@ static void makeArgument(Type ty, ParamDecl *decl,
306306

307307
void SILGenFunction::bindParameterForForwarding(ParamDecl *param,
308308
SmallVectorImpl<SILValue> &parameters) {
309+
if (param->hasExternalPropertyWrapper()) {
310+
param = cast<ParamDecl>(param->getPropertyWrapperBackingProperty());
311+
}
312+
309313
makeArgument(param->getType(), param, parameters, *this);
310314
}
311315

0 commit comments

Comments
 (0)