mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 06:41:06 +01:00
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:
@@ -17,14 +17,14 @@ auto SemanticsIR::MakeBuiltinIR() -> SemanticsIR {
|
||||
SemanticsIR semantics_ir(/*builtin_ir=*/nullptr);
|
||||
semantics_ir.nodes_.reserve(SemanticsBuiltinKind::ValidCount);
|
||||
|
||||
// InvalidType uses a self-referential type so that it's not accidentally
|
||||
// treated as a normal type. Every other builtin is a type, including the
|
||||
// Error uses a self-referential type so that it's not accidentally treated as
|
||||
// a normal type. Every other builtin is a type, including the
|
||||
// self-referential TypeType.
|
||||
#define CARBON_SEMANTICS_BUILTIN_KIND(Name, ...) \
|
||||
semantics_ir.nodes_.push_back(SemanticsNode::Builtin::Make( \
|
||||
SemanticsBuiltinKind::Name, \
|
||||
SemanticsBuiltinKind::Name == SemanticsBuiltinKind::InvalidType \
|
||||
? SemanticsTypeId::InvalidType \
|
||||
#define CARBON_SEMANTICS_BUILTIN_KIND(Name, ...) \
|
||||
semantics_ir.nodes_.push_back(SemanticsNode::Builtin::Make( \
|
||||
SemanticsBuiltinKind::Name, \
|
||||
SemanticsBuiltinKind::Name == SemanticsBuiltinKind::Error \
|
||||
? SemanticsTypeId::Error \
|
||||
: SemanticsTypeId::TypeType));
|
||||
#include "toolchain/semantics/semantics_builtin_kind.def"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user