@@ -21,7 +21,7 @@ base class Base {
2121 fn Unused[self: Self]();
2222
2323 var x: i32 ;
24- var unused : i32 ;
24+ var unused_y : i32 ;
2525}
2626
2727class Child {
@@ -35,7 +35,7 @@ library "[[@TEST_NAME]]";
3535import library "a" ;
3636
3737fn Run () {
38- var a: Child = {.base = {.x = 0 , .unused = 1 }};
38+ var a: Child = {.base = {.x = 0 , .unused_y = 1 }};
3939 a.x = 2 ;
4040 a.F ();
4141}
@@ -54,8 +54,8 @@ fn Run() {
5454// CHECK:STDOUT: %Int.generic: %Int.type = struct_value () [concrete]
5555// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete]
5656// CHECK:STDOUT: %Base.elem: type = unbound_element_type %Base, %i32 [concrete]
57- // CHECK:STDOUT: %struct_type.x.unused : type = struct_type {.x: %i32, .unused : %i32} [concrete]
58- // CHECK:STDOUT: %complete_type.20c : <witness> = complete_type_witness %struct_type.x.unused [concrete]
57+ // CHECK:STDOUT: %struct_type.x.unused_y : type = struct_type {.x: %i32, .unused_y : %i32} [concrete]
58+ // CHECK:STDOUT: %complete_type.cf1 : <witness> = complete_type_witness %struct_type.x.unused_y [concrete]
5959// CHECK:STDOUT: %Child: type = class_type @Child [concrete]
6060// CHECK:STDOUT: %Child.elem: type = unbound_element_type %Child, %Base [concrete]
6161// CHECK:STDOUT: %struct_type.base: type = struct_type {.base: %Base} [concrete]
@@ -104,16 +104,16 @@ fn Run() {
104104// CHECK:STDOUT: %.loc8: %Base.elem = field_decl x, element0 [concrete]
105105// CHECK:STDOUT: %int_32.loc9: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
106106// CHECK:STDOUT: %i32.loc9: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
107- // CHECK:STDOUT: %.loc9: %Base.elem = field_decl unused , element1 [concrete]
108- // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness constants.%struct_type.x.unused [concrete = constants.%complete_type.20c ]
107+ // CHECK:STDOUT: %.loc9: %Base.elem = field_decl unused_y , element1 [concrete]
108+ // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness constants.%struct_type.x.unused_y [concrete = constants.%complete_type.cf1 ]
109109// CHECK:STDOUT: complete_type_witness = %complete_type
110110// CHECK:STDOUT:
111111// CHECK:STDOUT: !members:
112112// CHECK:STDOUT: .Self = constants.%Base
113113// CHECK:STDOUT: .F = %Base.F.decl
114114// CHECK:STDOUT: .Unused = %Base.Unused.decl
115115// CHECK:STDOUT: .x = %.loc8
116- // CHECK:STDOUT: .unused = %.loc9
116+ // CHECK:STDOUT: .unused_y = %.loc9
117117// CHECK:STDOUT: }
118118// CHECK:STDOUT:
119119// CHECK:STDOUT: class @Child {
@@ -143,17 +143,17 @@ fn Run() {
143143// CHECK:STDOUT: %Base: type = class_type @Base [concrete]
144144// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete]
145145// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete]
146- // CHECK:STDOUT: %struct_type.x.unused.7d5 : type = struct_type {.x: %i32, .unused : %i32} [concrete]
147- // CHECK:STDOUT: %complete_type.90f : <witness> = complete_type_witness %struct_type.x.unused.7d5 [concrete]
146+ // CHECK:STDOUT: %struct_type.x.unused_y.9fc : type = struct_type {.x: %i32, .unused_y : %i32} [concrete]
147+ // CHECK:STDOUT: %complete_type.2da : <witness> = complete_type_witness %struct_type.x.unused_y.9fc [concrete]
148148// CHECK:STDOUT: %struct_type.base.b1e: type = struct_type {.base: %Base} [concrete]
149149// CHECK:STDOUT: %complete_type.15c: <witness> = complete_type_witness %struct_type.base.b1e [concrete]
150150// CHECK:STDOUT: %pattern_type.1bd: type = pattern_type %Child [concrete]
151151// CHECK:STDOUT: %int_0.5c6: Core.IntLiteral = int_value 0 [concrete]
152152// CHECK:STDOUT: %int_1.5b8: Core.IntLiteral = int_value 1 [concrete]
153- // CHECK:STDOUT: %struct_type.x.unused.c45 : type = struct_type {.x: Core.IntLiteral, .unused : Core.IntLiteral} [concrete]
154- // CHECK:STDOUT: %struct.9cc : %struct_type.x.unused.c45 = struct_value (%int_0.5c6, %int_1.5b8) [concrete]
155- // CHECK:STDOUT: %struct_type.base.6c7 : type = struct_type {.base: %struct_type.x.unused.c45 } [concrete]
156- // CHECK:STDOUT: %struct.133 : %struct_type.base.6c7 = struct_value (%struct.9cc ) [concrete]
153+ // CHECK:STDOUT: %struct_type.x.unused_y.76a : type = struct_type {.x: Core.IntLiteral, .unused_y : Core.IntLiteral} [concrete]
154+ // CHECK:STDOUT: %struct.0bf : %struct_type.x.unused_y.76a = struct_value (%int_0.5c6, %int_1.5b8) [concrete]
155+ // CHECK:STDOUT: %struct_type.base.503 : type = struct_type {.base: %struct_type.x.unused_y.76a } [concrete]
156+ // CHECK:STDOUT: %struct.cb5 : %struct_type.base.503 = struct_value (%struct.0bf ) [concrete]
157157// CHECK:STDOUT: %ImplicitAs.type.cc7: type = generic_interface_type @ImplicitAs [concrete]
158158// CHECK:STDOUT: %ImplicitAs.generic: %ImplicitAs.type.cc7 = struct_value () [concrete]
159159// CHECK:STDOUT: %ImplicitAs.type.bd9: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete]
@@ -199,12 +199,12 @@ fn Run() {
199199// CHECK:STDOUT: import Core//prelude
200200// CHECK:STDOUT: import Core//prelude/...
201201// CHECK:STDOUT: }
202- // CHECK:STDOUT: %Main.import_ref.239 : <witness> = import_ref Main//a, loc10_1, loaded [concrete = constants.%complete_type.90f ]
202+ // CHECK:STDOUT: %Main.import_ref.8f2 : <witness> = import_ref Main//a, loc10_1, loaded [concrete = constants.%complete_type.2da ]
203203// CHECK:STDOUT: %Main.import_ref.1f3 = import_ref Main//a, inst{{[0-9A-F]+}} [no loc], unloaded
204204// CHECK:STDOUT: %Main.import_ref.e8f: %Base.F.type = import_ref Main//a, loc5_21, loaded [concrete = constants.%Base.F]
205205// CHECK:STDOUT: %Main.import_ref.8bf = import_ref Main//a, loc6_26, unloaded
206206// CHECK:STDOUT: %Main.import_ref.e67: %Base.elem = import_ref Main//a, loc8_8, loaded [concrete = %.720]
207- // CHECK:STDOUT: %Main.import_ref.2e4 = import_ref Main//a, loc9_13 , unloaded
207+ // CHECK:STDOUT: %Main.import_ref.edd = import_ref Main//a, loc9_15 , unloaded
208208// CHECK:STDOUT: %Main.import_ref.c5f: <witness> = import_ref Main//a, loc14_1, loaded [concrete = constants.%complete_type.15c]
209209// CHECK:STDOUT: %Main.import_ref.9a9 = import_ref Main//a, inst{{[0-9A-F]+}} [no loc], unloaded
210210// CHECK:STDOUT: %Main.import_ref.7e5 = import_ref Main//a, loc13_20, unloaded
@@ -240,14 +240,14 @@ fn Run() {
240240// CHECK:STDOUT: }
241241// CHECK:STDOUT:
242242// CHECK:STDOUT: class @Base [from "a.carbon"] {
243- // CHECK:STDOUT: complete_type_witness = imports.%Main.import_ref.239
243+ // CHECK:STDOUT: complete_type_witness = imports.%Main.import_ref.8f2
244244// CHECK:STDOUT:
245245// CHECK:STDOUT: !members:
246246// CHECK:STDOUT: .Self = imports.%Main.import_ref.1f3
247247// CHECK:STDOUT: .F = imports.%Main.import_ref.e8f
248248// CHECK:STDOUT: .Unused = imports.%Main.import_ref.8bf
249249// CHECK:STDOUT: .x = imports.%Main.import_ref.e67
250- // CHECK:STDOUT: .unused = imports.%Main.import_ref.2e4
250+ // CHECK:STDOUT: .unused_y = imports.%Main.import_ref.edd
251251// CHECK:STDOUT: }
252252// CHECK:STDOUT:
253253// CHECK:STDOUT: fn @Run() {
@@ -259,29 +259,29 @@ fn Run() {
259259// CHECK:STDOUT: %a.var: ref %Child = var %a.var_patt
260260// CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6]
261261// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8]
262- // CHECK:STDOUT: %.loc7_47 .1: %struct_type.x.unused.c45 = struct_literal (%int_0, %int_1) [concrete = constants.%struct.9cc ]
263- // CHECK:STDOUT: %.loc7_48 .1: %struct_type.base.6c7 = struct_literal (%.loc7_47 .1) [concrete = constants.%struct.133 ]
264- // CHECK:STDOUT: %impl.elem0.loc7_47 .1: %.1a5 = impl_witness_access constants.%ImplicitAs.impl_witness.09b, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.13e]
265- // CHECK:STDOUT: %bound_method.loc7_47 .1: <bound method> = bound_method %int_0, %impl.elem0.loc7_47 .1 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.7ff]
266- // CHECK:STDOUT: %specific_fn.loc7_47 .1: <specific function> = specific_function %impl.elem0.loc7_47 .1, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn]
267- // CHECK:STDOUT: %bound_method.loc7_47 .2: <bound method> = bound_method %int_0, %specific_fn.loc7_47 .1 [concrete = constants.%bound_method.29e]
268- // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc7_47 .1: init %i32 = call %bound_method.loc7_47 .2(%int_0) [concrete = constants.%int_0.263]
269- // CHECK:STDOUT: %.loc7_47 .2: init %i32 = converted %int_0, %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc7_47 .1 [concrete = constants.%int_0.263]
270- // CHECK:STDOUT: %.loc7_48 .2: ref %Base = class_element_access %a.var, element0
271- // CHECK:STDOUT: %.loc7_47 .3: ref %i32 = class_element_access %.loc7_48 .2, element0
272- // CHECK:STDOUT: %.loc7_47 .4: init %i32 = initialize_from %.loc7_47 .2 to %.loc7_47 .3 [concrete = constants.%int_0.263]
273- // CHECK:STDOUT: %impl.elem0.loc7_47 .2: %.1a5 = impl_witness_access constants.%ImplicitAs.impl_witness.09b, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.13e]
274- // CHECK:STDOUT: %bound_method.loc7_47 .3: <bound method> = bound_method %int_1, %impl.elem0.loc7_47 .2 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.b66]
275- // CHECK:STDOUT: %specific_fn.loc7_47 .2: <specific function> = specific_function %impl.elem0.loc7_47 .2, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn]
276- // CHECK:STDOUT: %bound_method.loc7_47 .4: <bound method> = bound_method %int_1, %specific_fn.loc7_47 .2 [concrete = constants.%bound_method.c7c]
277- // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc7_47 .2: init %i32 = call %bound_method.loc7_47 .4(%int_1) [concrete = constants.%int_1.47b]
278- // CHECK:STDOUT: %.loc7_47 .5: init %i32 = converted %int_1, %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc7_47 .2 [concrete = constants.%int_1.47b]
279- // CHECK:STDOUT: %.loc7_47 .6: ref %i32 = class_element_access %.loc7_48 .2, element1
280- // CHECK:STDOUT: %.loc7_47 .7: init %i32 = initialize_from %.loc7_47 .5 to %.loc7_47 .6 [concrete = constants.%int_1.47b]
281- // CHECK:STDOUT: %.loc7_47 .8: init %Base = class_init (%.loc7_47 .4, %.loc7_47 .7), %.loc7_48 .2 [concrete = constants.%Base.val]
282- // CHECK:STDOUT: %.loc7_48 .3: init %Base = converted %.loc7_47 .1, %.loc7_47 .8 [concrete = constants.%Base.val]
283- // CHECK:STDOUT: %.loc7_48 .4: init %Child = class_init (%.loc7_48 .3), %a.var [concrete = constants.%Child.val]
284- // CHECK:STDOUT: %.loc7_3: init %Child = converted %.loc7_48 .1, %.loc7_48 .4 [concrete = constants.%Child.val]
262+ // CHECK:STDOUT: %.loc7_49 .1: %struct_type.x.unused_y.76a = struct_literal (%int_0, %int_1) [concrete = constants.%struct.0bf ]
263+ // CHECK:STDOUT: %.loc7_50 .1: %struct_type.base.503 = struct_literal (%.loc7_49 .1) [concrete = constants.%struct.cb5 ]
264+ // CHECK:STDOUT: %impl.elem0.loc7_49 .1: %.1a5 = impl_witness_access constants.%ImplicitAs.impl_witness.09b, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.13e]
265+ // CHECK:STDOUT: %bound_method.loc7_49 .1: <bound method> = bound_method %int_0, %impl.elem0.loc7_49 .1 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.7ff]
266+ // CHECK:STDOUT: %specific_fn.loc7_49 .1: <specific function> = specific_function %impl.elem0.loc7_49 .1, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn]
267+ // CHECK:STDOUT: %bound_method.loc7_49 .2: <bound method> = bound_method %int_0, %specific_fn.loc7_49 .1 [concrete = constants.%bound_method.29e]
268+ // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc7_49 .1: init %i32 = call %bound_method.loc7_49 .2(%int_0) [concrete = constants.%int_0.263]
269+ // CHECK:STDOUT: %.loc7_49 .2: init %i32 = converted %int_0, %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc7_49 .1 [concrete = constants.%int_0.263]
270+ // CHECK:STDOUT: %.loc7_50 .2: ref %Base = class_element_access %a.var, element0
271+ // CHECK:STDOUT: %.loc7_49 .3: ref %i32 = class_element_access %.loc7_50 .2, element0
272+ // CHECK:STDOUT: %.loc7_49 .4: init %i32 = initialize_from %.loc7_49 .2 to %.loc7_49 .3 [concrete = constants.%int_0.263]
273+ // CHECK:STDOUT: %impl.elem0.loc7_49 .2: %.1a5 = impl_witness_access constants.%ImplicitAs.impl_witness.09b, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.13e]
274+ // CHECK:STDOUT: %bound_method.loc7_49 .3: <bound method> = bound_method %int_1, %impl.elem0.loc7_49 .2 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.b66]
275+ // CHECK:STDOUT: %specific_fn.loc7_49 .2: <specific function> = specific_function %impl.elem0.loc7_49 .2, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn]
276+ // CHECK:STDOUT: %bound_method.loc7_49 .4: <bound method> = bound_method %int_1, %specific_fn.loc7_49 .2 [concrete = constants.%bound_method.c7c]
277+ // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc7_49 .2: init %i32 = call %bound_method.loc7_49 .4(%int_1) [concrete = constants.%int_1.47b]
278+ // CHECK:STDOUT: %.loc7_49 .5: init %i32 = converted %int_1, %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc7_49 .2 [concrete = constants.%int_1.47b]
279+ // CHECK:STDOUT: %.loc7_49 .6: ref %i32 = class_element_access %.loc7_50 .2, element1
280+ // CHECK:STDOUT: %.loc7_49 .7: init %i32 = initialize_from %.loc7_49 .5 to %.loc7_49 .6 [concrete = constants.%int_1.47b]
281+ // CHECK:STDOUT: %.loc7_49 .8: init %Base = class_init (%.loc7_49 .4, %.loc7_49 .7), %.loc7_50 .2 [concrete = constants.%Base.val]
282+ // CHECK:STDOUT: %.loc7_50 .3: init %Base = converted %.loc7_49 .1, %.loc7_49 .8 [concrete = constants.%Base.val]
283+ // CHECK:STDOUT: %.loc7_50 .4: init %Child = class_init (%.loc7_50 .3), %a.var [concrete = constants.%Child.val]
284+ // CHECK:STDOUT: %.loc7_3: init %Child = converted %.loc7_50 .1, %.loc7_50 .4 [concrete = constants.%Child.val]
285285// CHECK:STDOUT: assign %a.var, %.loc7_3
286286// CHECK:STDOUT: %Child.ref: type = name_ref Child, imports.%Main.Child [concrete = constants.%Child]
287287// CHECK:STDOUT: %a: ref %Child = ref_binding a, %a.var
0 commit comments