-
Notifications
You must be signed in to change notification settings - Fork 10.5k
GSB: Better handling of unresolved DependentMemberTypes in maybeResolveEquivalenceClass() #35907
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
GSB: Better handling of unresolved DependentMemberTypes in maybeResolveEquivalenceClass() #35907
Conversation
@swift-ci Please smoke test |
8400c32
to
52e4cf7
Compare
@swift-ci Please smoke test |
52e4cf7
to
84c836b
Compare
Cool, the PR test failed because this also resolved an older crasher. |
@swift-ci Please smoke test |
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.
Looks good, thanks!
return ResolvedType::forUnresolved(nullptr); | ||
|
||
auto bestConcreteTypeIter = | ||
std::min_element(concreteDecls.begin(), concreteDecls.end(), |
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.
This rule is effectively arbitrary, because we don't have a way to handle ambiguity? I suppose that's no worse than what we have today.
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.
I copy and pasted the code from further down in the function. I should extract it out into a helper at some point.
…veEquivalenceClass() A DependentMemberType can either have a bound AssociatedTypeDecl, or it might be 'unresolved' and only store an identifier. In maybeResolveEquivalenceClass(), we did not handle the unresolved case when the base type of the DependentMemberType had itself been resolved to a concrete type. Fixes <rdar://problem/71162777>.
84c836b
to
5acd795
Compare
@swift-ci Please smoke test |
A DependentMemberType can either have a bound AssociatedTypeDecl,
or it might be 'unresolved' and only store an identifier.
In maybeResolveEquivalenceClass(), we did not handle the unresolved
case when the base type of the DependentMemberType had itself been
resolved to a concrete type.
Fixes rdar://problem/71162777.