Merge pull request #39146 from hborla/wrapped-param-diagnostics

[ConstraintSystem] Fix a misleading argument mismatch error when using wrapped parameters.
This commit is contained in:
Holly Borla
2021-09-02 22:10:21 -07:00
committed by GitHub
4 changed files with 42 additions and 26 deletions

View File

@@ -8920,6 +8920,11 @@ bool ConstraintSystem::resolveClosure(TypeVariableType *typeVar,
setType(projection, computeProjectedValueType(paramDecl, backingType));
}
if (!paramDecl->getName().hasDollarPrefix()) {
generateWrappedPropertyTypeConstraints(paramDecl, backingType,
param.getParameterType());
}
auto result = applyPropertyWrapperToParameter(backingType, param.getParameterType(),
paramDecl, paramDecl->getName(),
ConstraintKind::Equal,