mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-04 22:02:52 +01:00
Rename the builtin FloatType to LegacyFloatType, Error to ErrorInst (#4555)
This is for more clearly distinct names, and to make it a clearer transition from `BuiltinInst` for name conflicts. `FloatType` is also an instruction, and we have `Carbon::Error` (common/error.h). This avoids affecting tests, although the name is embedded in the builtin test. In `LegacyFloatType`, `Legacy` because I was having trouble coming up with a more appropriate name. I'm not clear this is a `FloatLiteralType` at present, it needs some work to mirror `IntLiteralType`. In `ErrorInst`, the suffix `Inst` was discussed as good and similar to `BuiltinInst` (although I'm trying to get rid of that).
This commit is contained in:
@@ -201,10 +201,10 @@ static auto HandleAnyBindingPattern(Context& context, Parse::NodeId node_id,
|
||||
break;
|
||||
}
|
||||
if (had_error) {
|
||||
context.AddNameToLookup(name_id, SemIR::InstId::BuiltinError);
|
||||
context.AddNameToLookup(name_id, SemIR::InstId::BuiltinErrorInst);
|
||||
// Replace the parameter with an invalid instruction so that we don't
|
||||
// try constructing a generic based on it.
|
||||
param_pattern_id = SemIR::InstId::BuiltinError;
|
||||
param_pattern_id = SemIR::InstId::BuiltinErrorInst;
|
||||
} else {
|
||||
auto bind_id = context.AddInstInNoBlock(
|
||||
make_bind_name(cast_type_id, SemIR::InstId::Invalid));
|
||||
|
||||
Reference in New Issue
Block a user