Rename semantics InvalidType to Error (#2975)

Following up on zygoloid's request [on
#2940](https://github.com/carbon-language/carbon-lang/pull/2940#discussion_r1253522564)
This commit is contained in:
Jon Ross-Perkins
2023-07-06 22:30:56 +00:00
committed by GitHub
parent ea982ad2c8
commit bc84f109fe
28 changed files with 60 additions and 58 deletions
+5 -5
View File
@@ -168,8 +168,8 @@ struct SemanticsTypeId : public IndexBase {
// The builtin TypeType.
static const SemanticsTypeId TypeType;
// The builtin InvalidType.
static const SemanticsTypeId InvalidType;
// The builtin Error.
static const SemanticsTypeId Error;
// An explicitly invalid ID.
static const SemanticsTypeId Invalid;
@@ -179,8 +179,8 @@ struct SemanticsTypeId : public IndexBase {
out << "type";
if (index == TypeType.index) {
out << "TypeType";
} else if (index == InvalidType.index) {
out << "InvalidType";
} else if (index == Error.index) {
out << "Error";
} else {
IndexBase::Print(out);
}
@@ -189,7 +189,7 @@ struct SemanticsTypeId : public IndexBase {
constexpr SemanticsTypeId SemanticsTypeId::TypeType =
SemanticsTypeId(SemanticsTypeId::InvalidIndex - 2);
constexpr SemanticsTypeId SemanticsTypeId::InvalidType =
constexpr SemanticsTypeId SemanticsTypeId::Error =
SemanticsTypeId(SemanticsTypeId::InvalidIndex - 1);
constexpr SemanticsTypeId SemanticsTypeId::Invalid =
SemanticsTypeId(SemanticsTypeId::InvalidIndex);