Skip to content

[AutoDiff] Fix false Differentiable derived conformances warning. #32527

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
Jun 25, 2020

Conversation

dan-zheng
Copy link
Contributor

Fix false Differentiable derived conformances warning on @differentiable property-wrapped properties.

Check property mutability using VarDecl::isSettable instead of VarDecl::getAccessor(AccessorKind::Set).
Some settable properties do not have setters, depending on the underlying WriteImplKind.

Resolves SR-13071.

Fix false `Differentiable` derived conformances warning on `@differentiable`
property-wrapped properties.

Check property mutability using `VarDecl::isSettable` instead of
`VarDecl::getAccessor(AccessorKind::Set)`.

Some settable properties do not have setters, depending on the underlying
`WriteImplKind`.

Resolves SR-13071.
@dan-zheng dan-zheng requested a review from rxwei June 24, 2020 18:54
@dan-zheng
Copy link
Contributor Author

@swift-ci Please smoke test

@dan-zheng dan-zheng requested a review from marcrasi June 24, 2020 21:27
@dan-zheng
Copy link
Contributor Author

Merging to unblock progress, the fix should not be controversial.

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.

1 participant