-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[Space Engine] Remove the @_downgrade_exhaustivity_check hack #17764
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
[Space Engine] Remove the @_downgrade_exhaustivity_check hack #17764
Conversation
@swift-ci please smoke test |
@swift-ci please test source compatibility |
Good stuff! |
Please test with following pull request: @swift-ci Please smoke test Linux platform |
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! Only small comments, not relevant to the main diff.
SIMPLE_DECL_ATTR(_downgrade_exhaustivity_check, DowngradeExhaustivityCheck, | ||
OnEnumElement | | ||
LongAttribute | UserInaccessible, | ||
71) |
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.
Can you leave behind a "71 is unused comment" here, like we did for other enums?
Technically this should probably mean bumping the module version too
lib/SILGen/SILGenPattern.cpp
Outdated
@@ -1812,8 +1812,7 @@ CaseBlocks::CaseBlocks( | |||
SGF.F.getResilienceExpansion()); | |||
} | |||
if (canAssumeExhaustive) { | |||
// Check that Sema didn't let any cases slip through. (This can happen | |||
// with @_downgrade_exhaustivity_check.) | |||
// Check that Sema didn't let any cases slip through. |
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 think this can't happen anymore, so maybe we can make this an assertion instead.
0bd059e
to
6a93094
Compare
This hack was only needed for Swift 3 mode in a narrow case. Flush it out of the compiler so we can simplify the space engine.
6a93094
to
2fb5afb
Compare
Lost the original source compat failure. Let's try again @swift-ci please test source compatibility |
Please test with following pull request: @swift-ci Please smoke test |
Please test with following pull request: @swift-ci Please smoke test Linux platform |
⛵️ |
This hack was only needed for Swift 3 mode in a narrow case. Flush it out of the compiler so we can simplify the space engine.