Skip to content

Commit f8cf96e

Browse files
committed
[Property Wrappers] For properties that are implicitly default initialized
via property wrapper, mark the init call as implicit.
1 parent 20dbf50 commit f8cf96e

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

lib/Sema/ConstraintSystem.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4247,13 +4247,16 @@ void SolutionApplicationTarget::maybeApplyPropertyWrapper() {
42474247
if (!outermostWrapperType)
42484248
return;
42494249

4250+
bool isImplicit = false;
4251+
42504252
// Retrieve the outermost wrapper argument. If there isn't one, we're
42514253
// performing default initialization.
42524254
auto outermostArg = outermostWrapperAttr->getArg();
42534255
if (!outermostArg) {
42544256
SourceLoc fakeParenLoc = outermostWrapperAttr->getRange().End;
42554257
outermostArg = TupleExpr::createEmpty(
42564258
ctx, fakeParenLoc, fakeParenLoc, /*Implicit=*/true);
4259+
isImplicit = true;
42574260
}
42584261

42594262
auto typeExpr = TypeExpr::createImplicitHack(
@@ -4264,7 +4267,7 @@ void SolutionApplicationTarget::maybeApplyPropertyWrapper() {
42644267
outermostWrapperAttr->getArgumentLabels(),
42654268
outermostWrapperAttr->getArgumentLabelLocs(),
42664269
/*hasTrailingClosure=*/false,
4267-
/*implicit=*/false);
4270+
/*implicit=*/isImplicit);
42684271
}
42694272
wrapperAttrs[0]->setSemanticInit(backingInitializer);
42704273

0 commit comments

Comments
 (0)