mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Merge pull request #36344 from hborla/property-wrapper-parameter-revision
[SE-0293] Implement revision #3 of property wrapper parameters
This commit is contained in:
@@ -4091,21 +4091,7 @@ ConstraintSystem::applyPropertyWrapperToParameter(
|
||||
anchor = apply->getFn();
|
||||
}
|
||||
|
||||
auto supportsProjectedValueInit = [&](ParamDecl *param) -> bool {
|
||||
if (!param->hasAttachedPropertyWrapper())
|
||||
return false;
|
||||
|
||||
if (param->hasImplicitPropertyWrapper())
|
||||
return true;
|
||||
|
||||
if (param->getAttachedPropertyWrappers().front()->getArg())
|
||||
return false;
|
||||
|
||||
auto wrapperInfo = param->getAttachedPropertyWrapperTypeInfo(0);
|
||||
return wrapperInfo.projectedValueVar && wrapperInfo.hasProjectedValueInit;
|
||||
};
|
||||
|
||||
if (argLabel.hasDollarPrefix() && (!param || !supportsProjectedValueInit(param))) {
|
||||
if (argLabel.hasDollarPrefix() && (!param || !param->hasExternalPropertyWrapper())) {
|
||||
if (!shouldAttemptFixes())
|
||||
return getTypeMatchFailure(locator);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user