-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[CSSimplify] Delay binding metatype instance types if one side is type variable #20786
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
Conversation
@swift-ci please test source compatibility |
@swift-ci please test |
Build failed |
Timeout :( |
@swift-ci please test macOS platform |
The metatype handling code here (prior to your change) seems pretty odd to me. Why do we default to a type equality check regardless of what the original type match kind was? I wonder what breaks if we just make this immediately call back into |
@rudkx I think the reason is trying to maintain subtype property? I wonder if what we need to to do here is to resolve this constraint (e.g. call to |
…e variable While matching two metatypes where one side is a class (which could have supertypes) and another is a type variable use `subtype` constraint to delay binding types together because there is a real possibility that there exists a superclass associated with yet free type variable which would be a better match when attempted. Resolves: rdar://problem/44816848
@swift-ci please test |
Build failed |
Build failed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change LGTM. Might be good to follow-up at some point with an assert about the incoming kind
so that if we ever violate any assumptions being made here it will be flagged.
@swift-ci please test source compatibility |
While matching two metatypes where one side is a class (which could have
supertypes) and another is a type variable use
subtype
constraint todelay binding types together because there is a real possibility that
there exists a superclass associated with yet free type variable which
would be a better match when attempted.
Resolves: rdar://problem/44816848