mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 22:02:55 +01:00
Rename type's GetInstId to GetTypeInstId, reflecting returned type (#6708)
Discussed briefly [on Discord](https://discord.com/channels/655572317891461132/655578254970716160/1470442830118912265), done to reduce confusion. Assisted-by: Google Antigravity with Gemini 3 Flash
This commit is contained in:
@@ -76,7 +76,7 @@ template <const TypeInstId& BuiltinId>
|
||||
struct BuiltinType {
|
||||
static auto CheckType(const File& sem_ir, ValidateState& /*state*/,
|
||||
TypeId type_id) -> bool {
|
||||
return sem_ir.types().GetInstId(type_id) == BuiltinId;
|
||||
return sem_ir.types().GetTypeInstId(type_id) == BuiltinId;
|
||||
}
|
||||
};
|
||||
|
||||
@@ -199,7 +199,7 @@ struct AnyType {
|
||||
struct CoreStringType {
|
||||
static auto CheckType(const File& sem_ir, ValidateState& /*state*/,
|
||||
TypeId type_id) -> bool {
|
||||
auto type_inst_id = sem_ir.types().GetInstId(type_id);
|
||||
auto type_inst_id = sem_ir.types().GetTypeInstId(type_id);
|
||||
auto class_type = sem_ir.insts().TryGetAs<ClassType>(type_inst_id);
|
||||
if (!class_type) {
|
||||
return false;
|
||||
@@ -214,7 +214,7 @@ struct CoreStringType {
|
||||
struct CoreCharType {
|
||||
static auto CheckType(const File& sem_ir, ValidateState& /*state*/,
|
||||
TypeId type_id) -> bool {
|
||||
auto type_inst_id = sem_ir.types().GetInstId(type_id);
|
||||
auto type_inst_id = sem_ir.types().GetTypeInstId(type_id);
|
||||
auto class_type = sem_ir.insts().TryGetAs<ClassType>(type_inst_id);
|
||||
if (!class_type) {
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user