Skip to content

[AutoDiff] Fix false 'Differentiable' synthesis warning on class property wrappers. #32003

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 25, 2020

Conversation

rxwei
Copy link
Contributor

@rxwei rxwei commented May 25, 2020

In Differentiable derived conformances, determine whether a property-wrapped property is mutable by checking whether a setter exists, instead of calling VarDecl::getPropertyWrapperMutability().

Resolves rdar://63577692 (SR-12873) where class-typed property wrappers with a mutable wrappedValue are rejected by synthesis (not included in the TangentVector). Also improve the property-wrapper-specific immutability warning message.

…erty wrappers.

In `Differentiable` derived conformances, determine whether a property-wrapped property is mutable by checking whether a setter exists, instead of calling `VarDecl::getPropertyWrapperMutability()`.

Resolves rdar://63577692 (SR-12873) where class-typed property wrappers with a mutable `wrappedValue` are rejected by synthesis (not included in the `TangentVector`). Also improve the property-wrapper-spe
cific immutability warning message.
@rxwei rxwei requested review from dan-zheng and bartchr808 May 25, 2020 00:17
@rxwei
Copy link
Contributor Author

rxwei commented May 25, 2020

@swift-ci please smoke test

@rxwei rxwei merged commit 65d66da into swiftlang:master May 25, 2020
@rxwei rxwei deleted the SR-12873 branch May 25, 2020 08:51
rxwei added a commit to rxwei/swift that referenced this pull request Jun 3, 2020
…erty wrappers. (swiftlang#32003)

In `Differentiable` derived conformances, determine whether a property-wrapped property is mutable by checking whether a setter exists, instead of calling `VarDecl::getPropertyWrapperMutability()`.

Resolves rdar://63577692 (SR-12873) where class-typed property wrappers with a mutable `wrappedValue` are rejected by synthesis (not included in the `TangentVector`). Also improve the property-wrapper-spe
cific immutability warning message.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants