mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[CSSimplify] Fix external property wrapper check to use parameter index
Both `ParameterListInfo` and `getParameterAt` expect parameter index because they operate on a declaration referenced by a call.
This commit is contained in:
@@ -1912,11 +1912,14 @@ static ConstraintSystem::TypeMatchResult matchCallArguments(
|
||||
}
|
||||
|
||||
auto argLabel = argument.getLabel();
|
||||
if (paramInfo.hasExternalPropertyWrapper(argIdx) || argLabel.hasDollarPrefix()) {
|
||||
auto *param = getParameterAt(callee, argIdx);
|
||||
if (paramInfo.hasExternalPropertyWrapper(paramIdx) ||
|
||||
argLabel.hasDollarPrefix()) {
|
||||
auto *param = getParameterAt(callee, paramIdx);
|
||||
assert(param);
|
||||
if (cs.applyPropertyWrapperToParameter(paramTy, argTy, const_cast<ParamDecl *>(param),
|
||||
argLabel, subKind, loc).isFailure()) {
|
||||
if (cs.applyPropertyWrapperToParameter(paramTy, argTy,
|
||||
const_cast<ParamDecl *>(param),
|
||||
argLabel, subKind, loc)
|
||||
.isFailure()) {
|
||||
return cs.getTypeMatchFailure(loc);
|
||||
}
|
||||
continue;
|
||||
|
||||
Reference in New Issue
Block a user