mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 11:31:05 +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:
+3
-3
@@ -164,7 +164,7 @@ var f: ForwardDeclared* = &f_ref.f;
|
||||
// CHECK:STDOUT: %Core: <namespace> = namespace [template] {}
|
||||
// CHECK:STDOUT: %import_ref.5 = import_ref ir2, inst+4, unloaded
|
||||
// CHECK:STDOUT: %UseEmpty: <function> = fn_decl @UseEmpty [template] {
|
||||
// CHECK:STDOUT: %Empty.decl: invalid = interface_decl @Empty [template = constants.%.1] {}
|
||||
// CHECK:STDOUT: %Empty.decl: type = interface_decl @Empty [template = constants.%.1] {}
|
||||
// CHECK:STDOUT: %Empty.ref: type = name_ref Empty, %import_ref.1 [template = constants.%.1]
|
||||
// CHECK:STDOUT: %e.loc6_13.1: Empty = param e
|
||||
// CHECK:STDOUT: @UseEmpty.%e: Empty = bind_name e, %e.loc6_13.1
|
||||
@@ -175,7 +175,7 @@ var f: ForwardDeclared* = &f_ref.f;
|
||||
// CHECK:STDOUT: %import_ref.9 = import_ref ir2, inst+8, unloaded
|
||||
// CHECK:STDOUT: %import_ref.10 = import_ref ir2, inst+12, unloaded
|
||||
// CHECK:STDOUT: %UseBasic: <function> = fn_decl @UseBasic [template] {
|
||||
// CHECK:STDOUT: %Basic.decl: invalid = interface_decl @Basic [template = constants.%.3] {}
|
||||
// CHECK:STDOUT: %Basic.decl: type = interface_decl @Basic [template = constants.%.3] {}
|
||||
// CHECK:STDOUT: %Basic.ref.loc7: type = name_ref Basic, %import_ref.2 [template = constants.%.3]
|
||||
// CHECK:STDOUT: %e.loc7_13.1: Basic = param e
|
||||
// CHECK:STDOUT: @UseBasic.%e: Basic = bind_name e, %e.loc7_13.1
|
||||
@@ -186,7 +186,7 @@ var f: ForwardDeclared* = &f_ref.f;
|
||||
// CHECK:STDOUT: %import_ref.14 = import_ref ir2, inst+20, unloaded
|
||||
// CHECK:STDOUT: %import_ref.15 = import_ref ir2, inst+24, unloaded
|
||||
// CHECK:STDOUT: %UseForwardDeclared: <function> = fn_decl @UseForwardDeclared [template] {
|
||||
// CHECK:STDOUT: %ForwardDeclared.decl: invalid = interface_decl @ForwardDeclared [template = constants.%.4] {}
|
||||
// CHECK:STDOUT: %ForwardDeclared.decl: type = interface_decl @ForwardDeclared [template = constants.%.4] {}
|
||||
// CHECK:STDOUT: %ForwardDeclared.ref.loc8: type = name_ref ForwardDeclared, %import_ref.3 [template = constants.%.4]
|
||||
// CHECK:STDOUT: %f.loc8_23.1: ForwardDeclared = param f
|
||||
// CHECK:STDOUT: @UseForwardDeclared.%f: ForwardDeclared = bind_name f, %f.loc8_23.1
|
||||
|
||||
Reference in New Issue
Block a user