mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 22:02:55 +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:
+2
-2
@@ -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]
|
||||
@@ -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]
|
||||
|
||||
+1
-1
@@ -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]
|
||||
|
||||
Reference in New Issue
Block a user