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-9690] [Sema] Differentiable derivation for generic type #52131

Closed
dan-zheng opened this issue Jan 17, 2019 · 1 comment
Closed

[SR-9690] [Sema] Differentiable derivation for generic type #52131

dan-zheng opened this issue Jan 17, 2019 · 1 comment
Assignees
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. swift for tensorflow

Comments

@dan-zheng
Copy link
Collaborator

Previous ID SR-9690
Radar None
Original Reporter @dan-zheng
Type Bug
Status Resolved
Resolution Done
Additional Detail from JIRA
Votes 0
Component/s Swift for TensorFlow
Labels Bug
Assignee @dan-zheng
Priority Medium

md5: 73821f74532f4fb44765a55487f5966b

Issue Description:

struct Foo<Scalar : FloatingPoint & Differentiable> : Differentiable {
  var x: Float
}
// <unknown>:0: error: type of expression is ambiguous without more context

Scary diagnostic, but I think I know the solution. Need to propagate substitution map from nominal type to various ConcreteDeclRefs in synthesized expressions.

@dan-zheng
Copy link
Collaborator Author

Fixed in #21995
The issue was actually that derived setters didn't inherit their parent's generic environment.

@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
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. swift for tensorflow
Projects
None yet
Development

No branches or pull requests

1 participant