Skip to content

Sema: Properly handle inference for abstract fixed type witnesses #27425

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

Closed

Conversation

AnthonyLatsis
Copy link
Collaborator

@AnthonyLatsis AnthonyLatsis commented Sep 29, 2019

This fixes inference for some fixed type witness chains - SR-10831, for example:

protocol P {
  associatedtype A
  associatedtype B
}
protocol Q: P where A == G<B> {}
protocol R: Q where B == Int {}

struct Foo: R {} // OK

And adds inference of fixed type witnesses containing Self - SR-11671:

protocol P {
  associatedtype A
}
protocol Q: P where A == Self {}

struct Foo: Q {} // OK, Self == Foo

@slavapestov

@AnthonyLatsis AnthonyLatsis force-pushed the assoc-same-ty-10831 branch 5 times, most recently from 1c41549 to 48d6f8e Compare November 1, 2019 14:01
@AnthonyLatsis
Copy link
Collaborator Author

@slavapestov bumping this up in case you have some bandwidth

@AnthonyLatsis AnthonyLatsis changed the title [Sema] Properly handle fixed type computing for abstract type witnesses Sema: Fixed type witness inference fixes Nov 8, 2019
@AnthonyLatsis AnthonyLatsis changed the title Sema: Fixed type witness inference fixes Sema: Properly handle fixed type witness inference Nov 8, 2019
@AnthonyLatsis AnthonyLatsis changed the title Sema: Properly handle fixed type witness inference Sema: Properly handle inference for abstract fixed type witnesses Nov 8, 2019
@AnthonyLatsis
Copy link
Collaborator Author

After almost a year I can tell the approach here is flawed and quite narrow. Closing to revisit this once we settle on the implementation details of a new conformance checker.

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