Skip to content

Commit ec82065

Browse files
committed
Sema: Fix local property wrappers on constructor
Fixes rdar://problem/142443421.
1 parent f8937ab commit ec82065

File tree

2 files changed

+1
-4
lines changed

2 files changed

+1
-4
lines changed

lib/Sema/CSGen.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4303,9 +4303,6 @@ ConstraintSystem::applyPropertyWrapperToParameter(
43034303
Type wrapperType, Type paramType, ParamDecl *param, Identifier argLabel,
43044304
ConstraintKind matchKind, ConstraintLocatorBuilder locator) {
43054305
Expr *anchor = getAsExpr(locator.getAnchor());
4306-
if (auto *apply = dyn_cast<ApplyExpr>(anchor)) {
4307-
anchor = apply->getFn();
4308-
}
43094306

43104307
auto recordPropertyWrapperFix = [&](ConstraintFix *fix) -> TypeMatchResult {
43114308
if (!shouldAttemptFixes())

lib/Sema/CSSimplify.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1850,7 +1850,7 @@ static ConstraintSystem::TypeMatchResult matchCallArguments(
18501850
assert(param);
18511851
if (cs.applyPropertyWrapperToParameter(paramTy, argTy,
18521852
const_cast<ParamDecl *>(param),
1853-
wrapperArgLabel, subKind, loc)
1853+
wrapperArgLabel, subKind, calleeLocator)
18541854
.isFailure()) {
18551855
return cs.getTypeMatchFailure(loc);
18561856
}

0 commit comments

Comments
 (0)