Skip to content

Commit fcc4bef

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

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
@@ -4251,13 +4251,16 @@ void SolutionApplicationTarget::maybeApplyPropertyWrapper() {
42514251
if (!outermostWrapperType)
42524252
return;
42534253

4254+
bool isImplicit = false;
4255+
42544256
// Retrieve the outermost wrapper argument. If there isn't one, we're
42554257
// performing default initialization.
42564258
auto outermostArg = outermostWrapperAttr->getArg();
42574259
if (!outermostArg) {
42584260
SourceLoc fakeParenLoc = outermostWrapperAttr->getRange().End;
42594261
outermostArg = TupleExpr::createEmpty(
42604262
ctx, fakeParenLoc, fakeParenLoc, /*Implicit=*/true);
4263+
isImplicit = true;
42614264
}
42624265

42634266
auto typeExpr = TypeExpr::createImplicitHack(
@@ -4268,7 +4271,7 @@ void SolutionApplicationTarget::maybeApplyPropertyWrapper() {
42684271
outermostWrapperAttr->getArgumentLabels(),
42694272
outermostWrapperAttr->getArgumentLabelLocs(),
42704273
/*hasTrailingClosure=*/false,
4271-
/*implicit=*/false);
4274+
/*implicit=*/isImplicit);
42724275
}
42734276
wrapperAttrs[0]->setSemanticInit(backingInitializer);
42744277

0 commit comments

Comments
 (0)