Skip to content

Commit

Permalink
Fix incorrect application of invalid type on imports. (#3902)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
jonmeow authored Apr 22, 2024
1 parent 280a25b commit 76a5cf5
Show file tree
Hide file tree
Showing 35 changed files with 85 additions and 85 deletions.
4 changes: 2 additions & 2 deletions toolchain/check/import_ref.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down Expand Up @@ -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 =
Expand Down
4 changes: 2 additions & 2 deletions toolchain/check/testdata/alias/import.carbon
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ var c: i32 = a_alias_alias;
// CHECK:STDOUT: %import_ref.2: type = import_ref ir2, inst+6, loc_12 [template = constants.%C]
// CHECK:STDOUT: %import_ref.3 = import_ref ir2, inst+11, unloaded
// CHECK:STDOUT: %Core: <namespace> = namespace [template] {}
// CHECK:STDOUT: %C.decl: invalid = class_decl @C [template = constants.%C] {}
// CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {}
// CHECK:STDOUT: %import_ref.4 = import_ref ir2, inst+3, unloaded
// CHECK:STDOUT: %c_alias.ref.loc6: type = name_ref c_alias, %import_ref.2 [template = constants.%C]
// CHECK:STDOUT: %c_alias_alias: type = bind_alias c_alias_alias, %import_ref.2 [template = constants.%C]
Expand Down Expand Up @@ -148,7 +148,7 @@ var c: i32 = a_alias_alias;
// CHECK:STDOUT: %import_ref.1: type = import_ref ir2, inst+10, loc_11 [template = constants.%C]
// CHECK:STDOUT: %import_ref.2 = import_ref ir2, inst+15, unloaded
// CHECK:STDOUT: %Core: <namespace> = namespace [template] {}
// CHECK:STDOUT: %C.decl: invalid = class_decl @C [template = constants.%C] {}
// CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {}
// CHECK:STDOUT: %import_ref.3 = import_ref ir2, inst+8, unloaded
// CHECK:STDOUT: %c_alias_alias.ref: type = name_ref c_alias_alias, %import_ref.1 [template = constants.%C]
// CHECK:STDOUT: %.loc6: type = ptr_type C [template = constants.%.2]
Expand Down
2 changes: 1 addition & 1 deletion toolchain/check/testdata/alias/import_order.carbon
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ var a_val: a = {.v = b_val.v};
// CHECK:STDOUT: %import_ref.4: type = import_ref ir2, inst+14, loc_23 [template = constants.%C]
// CHECK:STDOUT: %import_ref.5: type = import_ref ir2, inst+16, loc_11 [template = constants.%C]
// CHECK:STDOUT: %Core: <namespace> = namespace [template] {}
// CHECK:STDOUT: %C.decl: invalid = class_decl @C [template = constants.%C] {}
// CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {}
// CHECK:STDOUT: %import_ref.6: <unbound element of class C> = import_ref ir2, inst+5, loc_31 [template = imports.%.1]
// CHECK:STDOUT: %import_ref.7 = import_ref ir2, inst+3, unloaded
// CHECK:STDOUT: %d.ref: type = name_ref d, %import_ref.5 [template = constants.%C]
Expand Down
10 changes: 5 additions & 5 deletions toolchain/check/testdata/class/cross_package_import.carbon
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ var c: Other.C = {};
// CHECK:STDOUT: %Other: <namespace> = namespace [template] {}
// CHECK:STDOUT: %Other.ref: <namespace> = name_ref Other, %Other [template = %Other]
// CHECK:STDOUT: %import_ref.1: type = import_ref ir3, inst+2, loc_14 [template = constants.%C]
// CHECK:STDOUT: %C.decl: invalid = class_decl @C [template = constants.%C] {}
// CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {}
// CHECK:STDOUT: %import_ref.2 = import_ref ir3, inst+3, unloaded
// CHECK:STDOUT: %C.ref: type = name_ref C, %import_ref.1 [template = constants.%C]
// CHECK:STDOUT: %c.var: ref C = var c
Expand Down Expand Up @@ -198,7 +198,7 @@ var c: Other.C = {};
// CHECK:STDOUT: %Other: <namespace> = namespace [template] {}
// CHECK:STDOUT: %Other.ref: <namespace> = name_ref Other, %Other [template = %Other]
// CHECK:STDOUT: %import_ref: type = import_ref ir3, inst+3, loc_14 [template = constants.%.1]
// CHECK:STDOUT: %C.decl: invalid = class_decl @C [template = constants.%C] {}
// CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {}
// CHECK:STDOUT: %C.ref: type = name_ref C, %import_ref [template = constants.%.1]
// CHECK:STDOUT: %c.var: ref extern C = var c
// CHECK:STDOUT: %c: ref extern C = bind_name c, %c.var
Expand Down Expand Up @@ -235,10 +235,10 @@ var c: Other.C = {};
// CHECK:STDOUT: %Other: <namespace> = namespace [template] {}
// CHECK:STDOUT: %Other.ref: <namespace> = name_ref Other, %Other [template = %Other]
// CHECK:STDOUT: %import_ref.1: type = import_ref ir3, inst+2, loc_19 [template = constants.%C.1]
// CHECK:STDOUT: %C.decl.1: invalid = class_decl @C.1 [template = constants.%C.1] {}
// CHECK:STDOUT: %C.decl.1: type = class_decl @C.1 [template = constants.%C.1] {}
// CHECK:STDOUT: %import_ref.2 = import_ref ir3, inst+3, unloaded
// CHECK:STDOUT: %import_ref.3: type = import_ref ir4, inst+3, loaded [template = constants.%.2]
// CHECK:STDOUT: %C.decl.2: invalid = class_decl @C.2 [template = constants.%C.2] {}
// CHECK:STDOUT: %C.decl.2: type = class_decl @C.2 [template = constants.%C.2] {}
// CHECK:STDOUT: %C.ref: type = name_ref C, %import_ref.1 [template = constants.%C.1]
// CHECK:STDOUT: %c.var: ref C = var c
// CHECK:STDOUT: %c: ref C = bind_name c, %c.var
Expand Down Expand Up @@ -280,7 +280,7 @@ var c: Other.C = {};
// CHECK:STDOUT: %Core: <namespace> = namespace [template] {}
// CHECK:STDOUT: %Other.ref: <namespace> = name_ref Other, %Other [template = %Other]
// CHECK:STDOUT: %import_ref.1: type = import_ref ir2, inst+2, loc_19 [template = constants.%C]
// CHECK:STDOUT: %C.decl: invalid = class_decl @C.2 [template = constants.%C] {}
// CHECK:STDOUT: %C.decl: type = class_decl @C.2 [template = constants.%C] {}
// CHECK:STDOUT: %import_ref.2 = import_ref ir2, inst+3, unloaded
// CHECK:STDOUT: %import_ref.3: <function> = import_ref ir3, inst+2, loaded [template = imports.%C]
// CHECK:STDOUT: %C.ref: type = name_ref C, %import_ref.1 [template = constants.%C]
Expand Down
30 changes: 15 additions & 15 deletions toolchain/check/testdata/class/extern.carbon
Original file line number Diff line number Diff line change
Expand Up @@ -454,8 +454,8 @@ extern class C;
// CHECK:STDOUT: }
// CHECK:STDOUT: %import_ref.1: type = import_ref ir2, inst+3, loaded [template = constants.%.1]
// CHECK:STDOUT: %import_ref.2: type = import_ref ir3, inst+2, loaded [template = constants.%C.1]
// CHECK:STDOUT: %C.decl.1: invalid = class_decl @C.1 [template = constants.%C.1] {}
// CHECK:STDOUT: %C.decl.2: invalid = class_decl @C.2 [template = constants.%C.2] {}
// CHECK:STDOUT: %C.decl.1: type = class_decl @C.1 [template = constants.%C.1] {}
// CHECK:STDOUT: %C.decl.2: type = class_decl @C.2 [template = constants.%C.2] {}
// CHECK:STDOUT: %Core: <namespace> = namespace [template] {}
// CHECK:STDOUT: }
// CHECK:STDOUT:
Expand All @@ -478,8 +478,8 @@ extern class C;
// CHECK:STDOUT: }
// CHECK:STDOUT: %import_ref.1: type = import_ref ir2, inst+2, loaded [template = constants.%C.2]
// CHECK:STDOUT: %import_ref.2: type = import_ref ir3, inst+3, loaded [template = constants.%.1]
// CHECK:STDOUT: %C.decl.1: invalid = class_decl @C.1 [template = constants.%C.1] {}
// CHECK:STDOUT: %C.decl.2: invalid = class_decl @C.2 [template = constants.%C.2] {}
// CHECK:STDOUT: %C.decl.1: type = class_decl @C.1 [template = constants.%C.1] {}
// CHECK:STDOUT: %C.decl.2: type = class_decl @C.2 [template = constants.%C.2] {}
// CHECK:STDOUT: %Core: <namespace> = namespace [template] {}
// CHECK:STDOUT: }
// CHECK:STDOUT:
Expand All @@ -503,9 +503,9 @@ extern class C;
// CHECK:STDOUT: }
// CHECK:STDOUT: %import_ref.1: type = import_ref ir2, inst+3, loaded [template = constants.%.2]
// CHECK:STDOUT: %import_ref.2: type = import_ref ir3, inst+2, loaded [template = constants.%C.1]
// CHECK:STDOUT: %C.decl.1: invalid = class_decl @C.1 [template = constants.%C.1] {}
// CHECK:STDOUT: %C.decl.1: type = class_decl @C.1 [template = constants.%C.1] {}
// CHECK:STDOUT: %import_ref.3 = import_ref ir3, inst+3, unloaded
// CHECK:STDOUT: %C.decl.2: invalid = class_decl @C.2 [template = constants.%C.2] {}
// CHECK:STDOUT: %C.decl.2: type = class_decl @C.2 [template = constants.%C.2] {}
// CHECK:STDOUT: %Core: <namespace> = namespace [template] {}
// CHECK:STDOUT: }
// CHECK:STDOUT:
Expand Down Expand Up @@ -536,10 +536,10 @@ extern class C;
// CHECK:STDOUT: }
// CHECK:STDOUT: %import_ref.1: type = import_ref ir2, inst+3, loaded [template = constants.%.1]
// CHECK:STDOUT: %import_ref.2: type = import_ref ir3, inst+2, loaded [template = constants.%C.1]
// CHECK:STDOUT: %C.decl.1: invalid = class_decl @C.1 [template = constants.%C.1] {}
// CHECK:STDOUT: %C.decl.2: invalid = class_decl @C.2 [template = constants.%C.2] {}
// CHECK:STDOUT: %C.decl.1: type = class_decl @C.1 [template = constants.%C.1] {}
// CHECK:STDOUT: %C.decl.2: type = class_decl @C.2 [template = constants.%C.2] {}
// CHECK:STDOUT: %import_ref.3: type = import_ref ir4, inst+2, loaded [template = constants.%C.3]
// CHECK:STDOUT: %C.decl.3: invalid = class_decl @C.3 [template = constants.%C.3] {}
// CHECK:STDOUT: %C.decl.3: type = class_decl @C.3 [template = constants.%C.3] {}
// CHECK:STDOUT: %import_ref.4 = import_ref ir4, inst+3, unloaded
// CHECK:STDOUT: %Core: <namespace> = namespace [template] {}
// CHECK:STDOUT: }
Expand Down Expand Up @@ -572,8 +572,8 @@ extern class C;
// CHECK:STDOUT: }
// CHECK:STDOUT: %import_ref.1: type = import_ref ir2, inst+3, loaded [template = constants.%.2]
// CHECK:STDOUT: %import_ref.2: type = import_ref ir3, inst+3, loaded [template = constants.%.1]
// CHECK:STDOUT: %C.decl.1: invalid = class_decl @C.1 [template = constants.%C.1] {}
// CHECK:STDOUT: %C.decl.2: invalid = class_decl @C.2 [template = constants.%C.2] {}
// CHECK:STDOUT: %C.decl.1: type = class_decl @C.1 [template = constants.%C.1] {}
// CHECK:STDOUT: %C.decl.2: type = class_decl @C.2 [template = constants.%C.2] {}
// CHECK:STDOUT: %Core: <namespace> = namespace [template] {}
// CHECK:STDOUT: }
// CHECK:STDOUT:
Expand All @@ -596,7 +596,7 @@ extern class C;
// CHECK:STDOUT: %import_ref: type = import_ref ir2, inst+3, loaded [template = constants.%.1]
// CHECK:STDOUT: %Core: <namespace> = namespace [template] {}
// CHECK:STDOUT: %C.decl.loc6: type = class_decl @C [template = constants.%C] {
// CHECK:STDOUT: %C.decl.1: invalid = class_decl @C [template = constants.%C] {}
// CHECK:STDOUT: %C.decl.1: type = class_decl @C [template = constants.%C] {}
// CHECK:STDOUT: }
// CHECK:STDOUT: %.loc6: type = extern_decl %C.decl.loc6 [template = constants.%.1]
// CHECK:STDOUT: }
Expand All @@ -618,7 +618,7 @@ extern class C;
// CHECK:STDOUT: %import_ref: type = import_ref ir2, inst+2, loaded [template = constants.%C]
// CHECK:STDOUT: %Core: <namespace> = namespace [template] {}
// CHECK:STDOUT: %C.decl.loc6: type = class_decl @C [template = constants.%C] {
// CHECK:STDOUT: %C.decl.1: invalid = class_decl @C [template = constants.%C] {}
// CHECK:STDOUT: %C.decl.1: type = class_decl @C [template = constants.%C] {}
// CHECK:STDOUT: }
// CHECK:STDOUT: %.loc6: type = extern_decl %C.decl.loc6 [template = constants.%.1]
// CHECK:STDOUT: }
Expand All @@ -642,7 +642,7 @@ extern class C;
// CHECK:STDOUT: %Core: <namespace> = namespace [template] {}
// CHECK:STDOUT: %import_ref.2 = import_ref ir2, inst+3, unloaded
// CHECK:STDOUT: %C.decl.loc6: type = class_decl @C [template = constants.%C] {
// CHECK:STDOUT: %C.decl.1: invalid = class_decl @C [template = constants.%C] {}
// CHECK:STDOUT: %C.decl.1: type = class_decl @C [template = constants.%C] {}
// CHECK:STDOUT: }
// CHECK:STDOUT: %.loc6: type = extern_decl %C.decl.loc6 [template = constants.%.2]
// CHECK:STDOUT: }
Expand All @@ -669,7 +669,7 @@ extern class C;
// CHECK:STDOUT: %Core: <namespace> = namespace [template] {}
// CHECK:STDOUT: %import_ref.2 = import_ref ir2, inst+3, unloaded
// CHECK:STDOUT: %C.decl.loc6: type = class_decl @C [template = constants.%C] {
// CHECK:STDOUT: %C.decl.1: invalid = class_decl @C [template = constants.%C] {}
// CHECK:STDOUT: %C.decl.1: type = class_decl @C [template = constants.%C] {}
// CHECK:STDOUT: }
// CHECK:STDOUT: %.loc6: type = extern_decl %C.decl.loc6 [template = constants.%.2]
// CHECK:STDOUT: }
Expand Down
4 changes: 2 additions & 2 deletions toolchain/check/testdata/class/fail_import_misuses.carbon
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,9 @@ var a: Incomplete;
// CHECK:STDOUT: %Core: <namespace> = namespace [template] {}
// CHECK:STDOUT: %import_ref.3 = import_ref ir2, inst+3, unloaded
// CHECK:STDOUT: %Empty.decl.loc16: type = class_decl @Empty [template = constants.%Empty] {
// CHECK:STDOUT: %Empty.decl.1: invalid = class_decl @Empty [template = constants.%Empty] {}
// CHECK:STDOUT: %Empty.decl.1: type = class_decl @Empty [template = constants.%Empty] {}
// CHECK:STDOUT: }
// CHECK:STDOUT: %Incomplete.decl: invalid = class_decl @Incomplete [template = constants.%Incomplete] {}
// CHECK:STDOUT: %Incomplete.decl: type = class_decl @Incomplete [template = constants.%Incomplete] {}
// CHECK:STDOUT: %Incomplete.ref: type = name_ref Incomplete, %import_ref.2 [template = constants.%Incomplete]
// CHECK:STDOUT: %a.var: ref <error> = var a
// CHECK:STDOUT: %a: ref <error> = bind_name a, %a.var
Expand Down
10 changes: 5 additions & 5 deletions toolchain/check/testdata/class/import.carbon
Original file line number Diff line number Diff line change
Expand Up @@ -191,15 +191,15 @@ fn Run() {
// CHECK:STDOUT:
// CHECK:STDOUT: fn @Run() {
// CHECK:STDOUT: !entry:
// CHECK:STDOUT: %Empty.decl: invalid = class_decl @Empty [template = constants.%Empty] {}
// CHECK:STDOUT: %Empty.decl: type = class_decl @Empty [template = constants.%Empty] {}
// CHECK:STDOUT: %Empty.ref: type = name_ref Empty, file.%import_ref.1 [template = constants.%Empty]
// CHECK:STDOUT: %a.var: ref Empty = var a
// CHECK:STDOUT: %a: ref Empty = bind_name a, %a.var
// CHECK:STDOUT: %.loc7_19.1: {} = struct_literal ()
// CHECK:STDOUT: %.loc7_19.2: init Empty = class_init (), %a.var [template = constants.%.4]
// CHECK:STDOUT: %.loc7_20: init Empty = converted %.loc7_19.1, %.loc7_19.2 [template = constants.%.4]
// CHECK:STDOUT: assign %a.var, %.loc7_20
// CHECK:STDOUT: %Field.decl: invalid = class_decl @Field [template = constants.%Field] {}
// CHECK:STDOUT: %Field.decl: type = class_decl @Field [template = constants.%Field] {}
// CHECK:STDOUT: %Field.ref: type = name_ref Field, file.%import_ref.2 [template = constants.%Field]
// CHECK:STDOUT: %b.var: ref Field = var b
// CHECK:STDOUT: %b: ref Field = bind_name b, %b.var
Expand All @@ -215,7 +215,7 @@ fn Run() {
// CHECK:STDOUT: %.loc10_4: ref i32 = class_element_access %b.ref, element0
// CHECK:STDOUT: %.loc10_9: i32 = int_literal 2 [template = constants.%.10]
// CHECK:STDOUT: assign %.loc10_4, %.loc10_9
// CHECK:STDOUT: %ForwardDeclared.decl.1: invalid = class_decl @ForwardDeclared.1 [template = constants.%ForwardDeclared.1] {}
// CHECK:STDOUT: %ForwardDeclared.decl.1: type = class_decl @ForwardDeclared.1 [template = constants.%ForwardDeclared.1] {}
// CHECK:STDOUT: %ForwardDeclared.ref.loc12: type = name_ref ForwardDeclared, file.%import_ref.3 [template = constants.%ForwardDeclared.1]
// CHECK:STDOUT: %c.var: ref ForwardDeclared = var c
// CHECK:STDOUT: %c: ref ForwardDeclared = bind_name c, %c.var
Expand All @@ -224,7 +224,7 @@ fn Run() {
// CHECK:STDOUT: %.loc12_30: init ForwardDeclared = converted %.loc12_29.1, %.loc12_29.2 [template = constants.%.11]
// CHECK:STDOUT: assign %c.var, %.loc12_30
// CHECK:STDOUT: %c.ref.loc13: ref ForwardDeclared = name_ref c, %c
// CHECK:STDOUT: %ForwardDeclared.decl.2: invalid = class_decl @ForwardDeclared.2 [template = constants.%ForwardDeclared.2] {}
// CHECK:STDOUT: %ForwardDeclared.decl.2: type = class_decl @ForwardDeclared.2 [template = constants.%ForwardDeclared.2] {}
// CHECK:STDOUT: %F.ref: <function> = name_ref F, file.%import_ref.10 [template = imports.%F]
// CHECK:STDOUT: %.loc13_4: <bound method> = bound_method %c.ref.loc13, %F.ref
// CHECK:STDOUT: %.loc13_3: ForwardDeclared = bind_value %c.ref.loc13
Expand All @@ -241,7 +241,7 @@ fn Run() {
// CHECK:STDOUT: %c.ref.loc16: ref ForwardDeclared = name_ref c, %c
// CHECK:STDOUT: %.loc16_29: ForwardDeclared* = addr_of %c.ref.loc16
// CHECK:STDOUT: assign %d.var, %.loc16_29
// CHECK:STDOUT: %Incomplete.decl: invalid = class_decl @Incomplete [template = constants.%Incomplete] {}
// CHECK:STDOUT: %Incomplete.decl: type = class_decl @Incomplete [template = constants.%Incomplete] {}
// CHECK:STDOUT: %Incomplete.ref: type = name_ref Incomplete, file.%import_ref.4 [template = constants.%Incomplete]
// CHECK:STDOUT: %.loc18: type = ptr_type Incomplete [template = constants.%.13]
// CHECK:STDOUT: %e.var: ref Incomplete* = var e
Expand Down
4 changes: 2 additions & 2 deletions toolchain/check/testdata/class/import_base.carbon
Original file line number Diff line number Diff line change
Expand Up @@ -150,8 +150,8 @@ fn Run() {
// CHECK:STDOUT:
// CHECK:STDOUT: fn @Run() {
// CHECK:STDOUT: !entry:
// CHECK:STDOUT: %Child.decl: invalid = class_decl @Child [template = constants.%Child] {}
// CHECK:STDOUT: %Base.decl: invalid = class_decl @Base [template = constants.%Base] {}
// CHECK:STDOUT: %Child.decl: type = class_decl @Child [template = constants.%Child] {}
// CHECK:STDOUT: %Base.decl: type = class_decl @Base [template = constants.%Base] {}
// CHECK:STDOUT: %Child.ref: type = name_ref Child, file.%import_ref.2 [template = constants.%Child]
// CHECK:STDOUT: %a.var: ref Child = var a
// CHECK:STDOUT: %a: ref Child = bind_name a, %a.var
Expand Down
2 changes: 1 addition & 1 deletion toolchain/check/testdata/class/import_forward_decl.carbon
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ class ForwardDecl {
// CHECK:STDOUT: %import_ref: type = import_ref ir1, inst+2, loaded [template = constants.%ForwardDecl]
// CHECK:STDOUT: %Core: <namespace> = namespace [template] {}
// CHECK:STDOUT: %ForwardDecl.decl.loc4: type = class_decl @ForwardDecl [template = constants.%ForwardDecl] {
// CHECK:STDOUT: %ForwardDecl.decl.1: invalid = class_decl @ForwardDecl [template = constants.%ForwardDecl] {}
// CHECK:STDOUT: %ForwardDecl.decl.1: type = class_decl @ForwardDecl [template = constants.%ForwardDecl] {}
// CHECK:STDOUT: }
// CHECK:STDOUT: }
// CHECK:STDOUT:
Expand Down
2 changes: 1 addition & 1 deletion toolchain/check/testdata/class/import_member_cycle.carbon
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ fn Run() {
// CHECK:STDOUT:
// CHECK:STDOUT: fn @Run() {
// CHECK:STDOUT: !entry:
// CHECK:STDOUT: %Cycle.decl: invalid = class_decl @Cycle [template = constants.%Cycle] {}
// CHECK:STDOUT: %Cycle.decl: type = class_decl @Cycle [template = constants.%Cycle] {}
// CHECK:STDOUT: %Cycle.ref: type = name_ref Cycle, file.%import_ref.1 [template = constants.%Cycle]
// CHECK:STDOUT: %.loc7: type = ptr_type Cycle [template = constants.%.1]
// CHECK:STDOUT: %a.var: ref Cycle* = var a
Expand Down
2 changes: 1 addition & 1 deletion toolchain/check/testdata/class/import_struct_cyle.carbon
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ fn Run() {
// CHECK:STDOUT:
// CHECK:STDOUT: fn @Run() {
// CHECK:STDOUT: !entry:
// CHECK:STDOUT: %Cycle.decl: invalid = class_decl @Cycle [template = constants.%Cycle] {}
// CHECK:STDOUT: %Cycle.decl: type = class_decl @Cycle [template = constants.%Cycle] {}
// CHECK:STDOUT: %a.ref.loc7_3: ref {.b: Cycle*} = name_ref a, file.%import_ref.2
// CHECK:STDOUT: %.loc7_4: ref Cycle* = struct_access %a.ref.loc7_3, element0
// CHECK:STDOUT: %a.ref.loc7_11: ref {.b: Cycle*} = name_ref a, file.%import_ref.2
Expand Down
Loading

0 comments on commit 76a5cf5

Please sign in to comment.