mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[Property Wrappers] Inject the opaque value placeholder for a property
wrapper original wrapped value expression inside of CSApply. This prevents type checking the synthesized backing storage initializer twice - once with the original expression and again with the placeholder.
This commit is contained in:
@@ -4182,9 +4182,11 @@ void SolutionApplicationTarget::maybeApplyPropertyWrapper() {
|
||||
Expr *backingInitializer;
|
||||
if (Expr *initializer = expression.expression) {
|
||||
// Form init(wrappedValue:) call(s).
|
||||
Expr *wrappedInitializer =
|
||||
buildPropertyWrapperWrappedValueCall(
|
||||
singleVar, Type(), initializer, /*ignoreAttributeArgs=*/false);
|
||||
Expr *wrappedInitializer = buildPropertyWrapperWrappedValueCall(
|
||||
singleVar, Type(), initializer, /*ignoreAttributeArgs=*/false,
|
||||
[&](ApplyExpr *innermostInit) {
|
||||
expression.innermostWrappedValueInit = innermostInit;
|
||||
});
|
||||
if (!wrappedInitializer)
|
||||
return;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user