mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Distinguish conformance and superclass generic requirements.
As part of this, use a different enum for parsed generic requirements. NFC except that I noticed that ASTWalker wasn't visiting the second type in a conformance constraint; fixing this seems to have no effect beyond producing better IDE annotations.
This commit is contained in:
@@ -194,9 +194,8 @@ bool Parser::parseGenericWhereClause(
|
||||
}
|
||||
|
||||
// Add the requirement.
|
||||
Requirements.push_back(RequirementRepr::getConformance(FirstType.get(),
|
||||
ColonLoc,
|
||||
Protocol.get()));
|
||||
Requirements.push_back(RequirementRepr::getTypeConstraint(FirstType.get(),
|
||||
ColonLoc, Protocol.get()));
|
||||
} else if ((Tok.isAnyOperator() && Tok.getText() == "==") ||
|
||||
Tok.is(tok::equal)) {
|
||||
// A same-type-requirement
|
||||
|
||||
Reference in New Issue
Block a user