Skip to content

Conversation

@DougGregor
Copy link
Member

The TypeCheckExprFlags enum has amassed a few flags that are either redundant (because they can be computed from other information) or simply unused. Remove them.

This flag is recoverable from the contextual type purpose; don’t duplicate
the logic.
This is always set along with SubExpressionDiagnostics, so use that
for both purposes. That flag will go away when `CSDiag.cpp` goes away.
A contextual type purpose, that is, so it captures more about what the
entity is that is being solved.
@DougGregor
Copy link
Member Author

@swift-ci please smoke test and merge

case ConstraintLocator::ContextualType: {
auto purpose = getContextualTypePurpose();
assert(!(purpose == CTP_Unused && purpose == CTP_CannotFail));
assert(!(purpose == CTP_Unused || purpose == CTP_CannotFail));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops...

@swift-ci swift-ci merged commit b6d9dcc into swiftlang:master Feb 1, 2020
@DougGregor DougGregor deleted the expr-type-check-flag-cleanups branch February 1, 2020 14:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants