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:
John McCall
2016-01-11 16:02:48 -08:00
parent 0b8468d36b
commit 1f3b3142b4
25 changed files with 246 additions and 196 deletions

View File

@@ -52,7 +52,7 @@ const uint16_t VERSION_MAJOR = 0;
/// in source control, you should also update the comment to briefly
/// describe what change you made. The content of this comment isn't important;
/// it just ensures a conflict if two people change the module format.
const uint16_t VERSION_MINOR = 232; // no archetype in substitutions
const uint16_t VERSION_MINOR = 233; // superclass requirement kind
using DeclID = Fixnum<31>;
using DeclIDField = BCFixed<31>;
@@ -233,7 +233,8 @@ static inline OperatorKind getStableFixity(DeclKind kind) {
enum GenericRequirementKind : uint8_t {
Conformance = 0,
SameType,
WitnessMarker
WitnessMarker,
Superclass
};
using GenericRequirementKindField = BCFixed<2>;