mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-04 07:31:04 +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:
@@ -100,7 +100,7 @@ var arr: [i32; 1 + 2] = (3, 4, 3 + 4);
|
||||
// CHECK:STDOUT: %import_ref.4: <function> = import_ref ir3, inst+18, loc_10 [template = imports.%Op]
|
||||
// CHECK:STDOUT: impl_decl @impl {
|
||||
// CHECK:STDOUT: %Core.ref: <namespace> = name_ref Core, %Core [template = %Core]
|
||||
// CHECK:STDOUT: %Add.decl: invalid = interface_decl @Add [template = constants.%.1] {}
|
||||
// CHECK:STDOUT: %Add.decl: type = interface_decl @Add [template = constants.%.1] {}
|
||||
// CHECK:STDOUT: %Add.ref: type = name_ref Add, %import_ref.1 [template = constants.%.1]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %.loc10_16: i32 = int_literal 1 [template = constants.%.3]
|
||||
|
||||
+2
-2
@@ -180,12 +180,12 @@ fn CallFAndGIncomplete() {
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @CallFAndGIncomplete() {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %C.decl: invalid = class_decl @C [template = constants.%C] {}
|
||||
// CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {}
|
||||
// CHECK:STDOUT: %ReturnCUnused.ref: <function> = name_ref ReturnCUnused, file.%import_ref.3 [template = imports.%ReturnCUnused]
|
||||
// CHECK:STDOUT: %ReturnCUnused.call: init <error> = call %ReturnCUnused.ref()
|
||||
// CHECK:STDOUT: %ReturnCUsed.ref: <function> = name_ref ReturnCUsed, file.%import_ref.4 [template = imports.%ReturnCUsed]
|
||||
// CHECK:STDOUT: %ReturnCUsed.call: init <error> = call %ReturnCUsed.ref()
|
||||
// CHECK:STDOUT: %D.decl: invalid = class_decl @D [template = constants.%D] {}
|
||||
// CHECK:STDOUT: %D.decl: type = class_decl @D [template = constants.%D] {}
|
||||
// CHECK:STDOUT: %ReturnDUnused.ref: <function> = name_ref ReturnDUnused, file.%import_ref.5 [template = imports.%ReturnDUnused]
|
||||
// CHECK:STDOUT: %.loc24_16.1: ref D = temporary_storage
|
||||
// CHECK:STDOUT: %ReturnDUnused.call: init D = call %ReturnDUnused.ref() to %.loc24_16.1
|
||||
|
||||
Reference in New Issue
Block a user