-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[AST] Handle getSuperclassForDecl() returning an ErrorType in more places #26750
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
[AST] Handle getSuperclassForDecl() returning an ErrorType in more places #26750
Conversation
@swift-ci please test |
Instead of fixing every call site, I think its better to address the root cause, which is that getSuperclass() returns an empty type if the substitution fails. It should use SubstFlags::UseErrorType instead. Try this change: 70b5342 |
f82cccb
to
b3b3e07
Compare
Thanks @slavapestov! Adding the flag worked. I had to change the helper a little from what was in your patch to maintain the existing behavior of getSuperclass(). Does this look ok now? Should I try removing the other checks for ErrorType? |
@swift-ci please test |
Build failed |
Build failed |
b3b3e07
to
7dda615
Compare
@swift-ci please test |
Build failed |
Build failed |
@swift-ci please test |
Resolves rdar://problem/54145042
7dda615
to
b073e98
Compare
@swift-ci please smoke test |
Build failed |
Build failed |
We already were at some call sites, but weren't inModuleDecl::lookupConformance()
orTypeBase::getContextSubstitutions()
. Code completion was hitting both of these cases.Slava fixed the root cause of this in #26776. This is now just adding a regression test.
Resolves rdar://problem/54145042