mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-04 22:02:52 +01:00
Fix incorrect application of invalid type on imports. (#3902)
In handle_class and handle_interface we assign TypeType, so is more consistent. I think this had been missed because we haven't really been using these declarations (historically, declarations didn't have a type). It seems not to significantly affect output at present, although I found this while trying to change merge behavior.
This commit is contained in:
@@ -542,7 +542,7 @@ class ImportRefResolver {
|
||||
auto MakeIncompleteClass(const SemIR::Class& import_class)
|
||||
-> SemIR::ConstantId {
|
||||
auto class_decl =
|
||||
SemIR::ClassDecl{SemIR::TypeId::Invalid, SemIR::ClassId::Invalid,
|
||||
SemIR::ClassDecl{SemIR::TypeId::TypeType, SemIR::ClassId::Invalid,
|
||||
SemIR::InstBlockId::Empty};
|
||||
auto class_decl_id =
|
||||
context_.AddPlaceholderInst(SemIR::LocIdAndInst::Untyped(
|
||||
@@ -788,7 +788,7 @@ class ImportRefResolver {
|
||||
// importing the interface definition in order to resolve cycles.
|
||||
auto MakeInterfaceDecl(const SemIR::Interface& import_interface)
|
||||
-> SemIR::ConstantId {
|
||||
auto interface_decl = SemIR::InterfaceDecl{SemIR::TypeId::Invalid,
|
||||
auto interface_decl = SemIR::InterfaceDecl{SemIR::TypeId::TypeType,
|
||||
SemIR::InterfaceId::Invalid,
|
||||
SemIR::InstBlockId::Empty};
|
||||
auto interface_decl_id =
|
||||
|
||||
Reference in New Issue
Block a user