Skip to content

Commit 907c2eb

Browse files
committed
[Typechecker] When creating the pattern binding for the backing variable, use the original property's static spelling
1 parent b8fb2e5 commit 907c2eb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/Sema/TypeCheckStorage.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2348,8 +2348,8 @@ PropertyWrapperBackingPropertyInfoRequest::evaluate(Evaluator &evaluator,
23482348
pbdPattern->setType(storageType);
23492349
pbdPattern = TypedPattern::createImplicit(ctx, pbdPattern, storageType);
23502350
auto pbd = PatternBindingDecl::createImplicit(
2351-
ctx, backingVar->getCorrectStaticSpelling(), pbdPattern,
2352-
/*init*/nullptr, dc, SourceLoc());
2351+
ctx, var->getCorrectStaticSpelling(), pbdPattern,
2352+
/*init*/ nullptr, dc, SourceLoc());
23532353
addMemberToContextIfNeeded(pbd, dc, var);
23542354
pbd->setStatic(var->isStatic());
23552355

0 commit comments

Comments
 (0)