Navigation Menu

Skip to content
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

[SR-13474] Differentiable derived conformances rejecting class-bound let properties #55916

Closed
rxwei opened this issue Aug 29, 2020 · 2 comments
Closed
Assignees
Labels
AutoDiff bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler in itself

Comments

@rxwei
Copy link
Member

rxwei commented Aug 29, 2020

Previous ID SR-13474
Radar rdar://problem/67982207
Original Reporter @rxwei
Type Bug
Status Resolved
Resolution Done
Additional Detail from JIRA
Votes 0
Component/s Compiler
Labels Bug, AutoDiff
Assignee @rxwei
Priority Medium

md5: d50cde41f3668a222061ebf2c3495f14

Issue Description:

Today, Differentiable derived conformances will treat any `let` stored property as if it had @noDerivative, because the synthesized move(along🙂 needs to call to move(along🙂 on each stored property. However, class-bound properties' move(along🙂 can be called even if they are let properties.

The following code should work.

struct Foo: Differentiable {
    let x: DifferentiableClassType
}

The property inclusion rule in the Differentiable derived conformances should be corrected to only reject non-class-bound let properties.

(Working on an implementation as I'm typing this.)

@rxwei
Copy link
Member Author

rxwei commented Aug 29, 2020

@swift-ci create

@rxwei
Copy link
Member Author

rxwei commented Aug 30, 2020

#33700

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
AutoDiff bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler in itself
Projects
None yet
Development

No branches or pull requests

1 participant