-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[TypeChecker] Prevent pattern resolution from triggering type-checking for unresolved references #39399
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 smoke test |
@swift-ci please test source compatibility |
if (cs.isDebugMode()) { | ||
auto &log = llvm::errs(); | ||
|
||
log << "--- Applying result builder to function ---\n"; |
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.
Nice, this will be super helpful in debug-constraints output 🙂
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.
Yeah, it's going to be a good indicator what is being processed piecemeal, otherwise it's sometimes unclear where the sub-targets are coming from...
@swift-ci please smoke test Windows platform |
…g for unresolved references Workaround for Clang enum typaliases called `isInvalid()` and `getInterfaceType()` on discovered declarations. That doesn't play well with result builders because declarations/patterns used in the body of a result builder don't get a type until a solution is applied. Calling `isInvalid()` or `getInterfaceType` on declarations located in the body of a result builder trigger a separate type-check for the declaration that interferes with builder transformation and leads to crashes.
690cb80
to
3710967
Compare
I have changed to check for |
@swift-ci please smoke test |
@swift-ci please smoke test Windows platform |
…rEnumElement` Since re-declaration error is going to be emitted anyway it doesn't matter which declaration would get returned.
@swift-ci please smoke test |
As suggested by @slavapestov removed both |
Workaround for Clang enum typaliases called
isInvalid()
andgetInterfaceType()
on discovered declarations. That doesn't play well with result builders because
declarations/patterns used in the body of a result builder don't get a type until
a solution is applied. Calling
isInvalid()
orgetInterfaceType
on declarationslocated in the body of a result builder trigger a separate type-check for the
declaration that interferes with builder transformation and leads to crashes.