| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221 |
- // Part of the Carbon Language project, under the Apache License v2.0 with LLVM
- // Exceptions. See /LICENSE for license information.
- // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
- //
- // AUTOUPDATE
- // TIP: To test this file alone, run:
- // TIP: bazel test //toolchain/testing:file_test --test_arg=--file_tests=toolchain/check/testdata/eval/aggregate.carbon
- // TIP: To dump output, run:
- // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/eval/aggregate.carbon
- var tuple_copy: (i32, i32) = (1, 2) as (i32, i32);
- var struct_copy: {.a: i32, .b: i32, .c: i32} = {.c = 3, .b = 2, .a = 1} as {.b: i32, .a: i32, .c: i32};
- var tuple_index: [i32; 1] = (0,) as [i32; (5, 7, 1, 9).2];
- var struct_access: [i32; 1] = (0,) as [i32; {.a = 3, .b = 1}.b];
- // CHECK:STDOUT: --- aggregate.carbon
- // CHECK:STDOUT:
- // CHECK:STDOUT: constants {
- // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template]
- // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template]
- // CHECK:STDOUT: %tuple.type.24b: type = tuple_type (type, type) [template]
- // CHECK:STDOUT: %tuple.type.471: type = tuple_type (%i32, %i32) [template]
- // CHECK:STDOUT: %int_1.5b8: Core.IntLiteral = int_value 1 [template]
- // CHECK:STDOUT: %int_2.ecc: Core.IntLiteral = int_value 2 [template]
- // CHECK:STDOUT: %tuple.type.f94: type = tuple_type (Core.IntLiteral, Core.IntLiteral) [template]
- // CHECK:STDOUT: %Convert.type.cd1: type = fn_type @Convert.1, @ImplicitAs(%i32) [template]
- // CHECK:STDOUT: %impl_witness.5b0: <witness> = impl_witness (imports.%import_ref.723), @impl.1(%int_32) [template]
- // CHECK:STDOUT: %Convert.type.466: type = fn_type @Convert.2, @impl.1(%int_32) [template]
- // CHECK:STDOUT: %Convert.925: %Convert.type.466 = struct_value () [template]
- // CHECK:STDOUT: %Convert.bound.afd: <bound method> = bound_method %int_1.5b8, %Convert.925 [template]
- // CHECK:STDOUT: %Convert.specific_fn.b73: <specific function> = specific_function %Convert.bound.afd, @Convert.2(%int_32) [template]
- // CHECK:STDOUT: %int_1.c60: %i32 = int_value 1 [template]
- // CHECK:STDOUT: %Convert.bound.f0b: <bound method> = bound_method %int_2.ecc, %Convert.925 [template]
- // CHECK:STDOUT: %Convert.specific_fn.20e: <specific function> = specific_function %Convert.bound.f0b, @Convert.2(%int_32) [template]
- // CHECK:STDOUT: %int_2.166: %i32 = int_value 2 [template]
- // CHECK:STDOUT: %tuple.58e: %tuple.type.471 = tuple_value (%int_1.c60, %int_2.166) [template]
- // CHECK:STDOUT: %struct_type.a.b.c: type = struct_type {.a: %i32, .b: %i32, .c: %i32} [template]
- // CHECK:STDOUT: %int_3.1ba: Core.IntLiteral = int_value 3 [template]
- // CHECK:STDOUT: %struct_type.c.b.a: type = struct_type {.c: Core.IntLiteral, .b: Core.IntLiteral, .a: Core.IntLiteral} [template]
- // CHECK:STDOUT: %struct_type.b.a.c: type = struct_type {.b: %i32, .a: %i32, .c: %i32} [template]
- // CHECK:STDOUT: %Convert.bound.0db: <bound method> = bound_method %int_3.1ba, %Convert.925 [template]
- // CHECK:STDOUT: %Convert.specific_fn.456: <specific function> = specific_function %Convert.bound.0db, @Convert.2(%int_32) [template]
- // CHECK:STDOUT: %int_3.25b: %i32 = int_value 3 [template]
- // CHECK:STDOUT: %struct.de7: %struct_type.b.a.c = struct_value (%int_2.166, %int_1.c60, %int_3.25b) [template]
- // CHECK:STDOUT: %struct.cca: %struct_type.a.b.c = struct_value (%int_1.c60, %int_2.166, %int_3.25b) [template]
- // CHECK:STDOUT: %array_type: type = array_type %int_1.5b8, %i32 [template]
- // CHECK:STDOUT: %int_0.5c6: Core.IntLiteral = int_value 0 [template]
- // CHECK:STDOUT: %tuple.type.985: type = tuple_type (Core.IntLiteral) [template]
- // CHECK:STDOUT: %int_5: Core.IntLiteral = int_value 5 [template]
- // CHECK:STDOUT: %int_7: Core.IntLiteral = int_value 7 [template]
- // CHECK:STDOUT: %int_9: Core.IntLiteral = int_value 9 [template]
- // CHECK:STDOUT: %tuple.type.d46: type = tuple_type (Core.IntLiteral, Core.IntLiteral, Core.IntLiteral, Core.IntLiteral) [template]
- // CHECK:STDOUT: %tuple.869: %tuple.type.d46 = tuple_value (%int_5, %int_7, %int_1.5b8, %int_9) [template]
- // CHECK:STDOUT: %Convert.bound.b41: <bound method> = bound_method %int_0.5c6, %Convert.925 [template]
- // CHECK:STDOUT: %Convert.specific_fn.c35: <specific function> = specific_function %Convert.bound.b41, @Convert.2(%int_32) [template]
- // CHECK:STDOUT: %int_0.f61: %i32 = int_value 0 [template]
- // CHECK:STDOUT: %array: %array_type = tuple_value (%int_0.f61) [template]
- // CHECK:STDOUT: %struct_type.a.b: type = struct_type {.a: Core.IntLiteral, .b: Core.IntLiteral} [template]
- // CHECK:STDOUT: %struct.a81: %struct_type.a.b = struct_value (%int_3.1ba, %int_1.5b8) [template]
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: imports {
- // CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [template] {
- // CHECK:STDOUT: .Int = %import_ref.187
- // CHECK:STDOUT: .ImplicitAs = %import_ref.a69
- // CHECK:STDOUT: import Core//prelude
- // CHECK:STDOUT: import Core//prelude/...
- // CHECK:STDOUT: }
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: file {
- // CHECK:STDOUT: package: <namespace> = namespace [template] {
- // CHECK:STDOUT: .Core = imports.%Core
- // CHECK:STDOUT: .tuple_copy = %tuple_copy
- // CHECK:STDOUT: .struct_copy = %struct_copy
- // CHECK:STDOUT: .tuple_index = %tuple_index
- // CHECK:STDOUT: .struct_access = %struct_access
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %Core.import = import Core
- // CHECK:STDOUT: %tuple_copy.var: ref %tuple.type.471 = var tuple_copy
- // CHECK:STDOUT: %tuple_copy: ref %tuple.type.471 = bind_name tuple_copy, %tuple_copy.var
- // CHECK:STDOUT: %struct_copy.var: ref %struct_type.a.b.c = var struct_copy
- // CHECK:STDOUT: %struct_copy: ref %struct_type.a.b.c = bind_name struct_copy, %struct_copy.var
- // CHECK:STDOUT: %tuple_index.var: ref %array_type = var tuple_index
- // CHECK:STDOUT: %tuple_index: ref %array_type = bind_name tuple_index, %tuple_index.var
- // CHECK:STDOUT: %struct_access.var: ref %array_type = var struct_access
- // CHECK:STDOUT: %struct_access: ref %array_type = bind_name struct_access, %struct_access.var
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn @__global_init() {
- // CHECK:STDOUT: !entry:
- // CHECK:STDOUT: %int_1.loc11: Core.IntLiteral = int_value 1 [template = constants.%int_1.5b8]
- // CHECK:STDOUT: %int_2.loc11: Core.IntLiteral = int_value 2 [template = constants.%int_2.ecc]
- // CHECK:STDOUT: %.loc11_35.1: %tuple.type.f94 = tuple_literal (%int_1.loc11, %int_2.loc11)
- // CHECK:STDOUT: %int_32.loc11_41: Core.IntLiteral = int_value 32 [template = constants.%int_32]
- // CHECK:STDOUT: %i32.loc11_41: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
- // CHECK:STDOUT: %int_32.loc11_46: Core.IntLiteral = int_value 32 [template = constants.%int_32]
- // CHECK:STDOUT: %i32.loc11_46: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
- // CHECK:STDOUT: %.loc11_49.1: %tuple.type.24b = tuple_literal (%i32.loc11_41, %i32.loc11_46)
- // CHECK:STDOUT: %.loc11_49.2: type = converted %.loc11_49.1, constants.%tuple.type.471 [template = constants.%tuple.type.471]
- // CHECK:STDOUT: %impl.elem0.loc11_35.1: %Convert.type.cd1 = impl_witness_access constants.%impl_witness.5b0, element0 [template = constants.%Convert.925]
- // CHECK:STDOUT: %Convert.bound.loc11_35.1: <bound method> = bound_method %int_1.loc11, %impl.elem0.loc11_35.1 [template = constants.%Convert.bound.afd]
- // CHECK:STDOUT: %Convert.specific_fn.loc11_35.1: <specific function> = specific_function %Convert.bound.loc11_35.1, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.b73]
- // CHECK:STDOUT: %int.convert_checked.loc11_35.1: init %i32 = call %Convert.specific_fn.loc11_35.1(%int_1.loc11) [template = constants.%int_1.c60]
- // CHECK:STDOUT: %.loc11_35.2: %i32 = value_of_initializer %int.convert_checked.loc11_35.1 [template = constants.%int_1.c60]
- // CHECK:STDOUT: %.loc11_35.3: %i32 = converted %int_1.loc11, %.loc11_35.2 [template = constants.%int_1.c60]
- // CHECK:STDOUT: %impl.elem0.loc11_35.2: %Convert.type.cd1 = impl_witness_access constants.%impl_witness.5b0, element0 [template = constants.%Convert.925]
- // CHECK:STDOUT: %Convert.bound.loc11_35.2: <bound method> = bound_method %int_2.loc11, %impl.elem0.loc11_35.2 [template = constants.%Convert.bound.f0b]
- // CHECK:STDOUT: %Convert.specific_fn.loc11_35.2: <specific function> = specific_function %Convert.bound.loc11_35.2, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.20e]
- // CHECK:STDOUT: %int.convert_checked.loc11_35.2: init %i32 = call %Convert.specific_fn.loc11_35.2(%int_2.loc11) [template = constants.%int_2.166]
- // CHECK:STDOUT: %.loc11_35.4: %i32 = value_of_initializer %int.convert_checked.loc11_35.2 [template = constants.%int_2.166]
- // CHECK:STDOUT: %.loc11_35.5: %i32 = converted %int_2.loc11, %.loc11_35.4 [template = constants.%int_2.166]
- // CHECK:STDOUT: %tuple.loc11: %tuple.type.471 = tuple_value (%.loc11_35.3, %.loc11_35.5) [template = constants.%tuple.58e]
- // CHECK:STDOUT: %.loc11_37.1: %tuple.type.471 = converted %.loc11_35.1, %tuple.loc11 [template = constants.%tuple.58e]
- // CHECK:STDOUT: %tuple.elem0.loc11_37.1: %i32 = tuple_access %.loc11_37.1, element0 [template = constants.%int_1.c60]
- // CHECK:STDOUT: %tuple.elem0.loc11_37.2: ref %i32 = tuple_access file.%tuple_copy.var, element0
- // CHECK:STDOUT: %.loc11_37.2: init %i32 = initialize_from %tuple.elem0.loc11_37.1 to %tuple.elem0.loc11_37.2 [template = constants.%int_1.c60]
- // CHECK:STDOUT: %tuple.elem1.loc11_37.1: %i32 = tuple_access %.loc11_37.1, element1 [template = constants.%int_2.166]
- // CHECK:STDOUT: %tuple.elem1.loc11_37.2: ref %i32 = tuple_access file.%tuple_copy.var, element1
- // CHECK:STDOUT: %.loc11_37.3: init %i32 = initialize_from %tuple.elem1.loc11_37.1 to %tuple.elem1.loc11_37.2 [template = constants.%int_2.166]
- // CHECK:STDOUT: %.loc11_37.4: init %tuple.type.471 = tuple_init (%.loc11_37.2, %.loc11_37.3) to file.%tuple_copy.var [template = constants.%tuple.58e]
- // CHECK:STDOUT: %.loc11_50: init %tuple.type.471 = converted %.loc11_37.1, %.loc11_37.4 [template = constants.%tuple.58e]
- // CHECK:STDOUT: assign file.%tuple_copy.var, %.loc11_50
- // CHECK:STDOUT: %int_3.loc13: Core.IntLiteral = int_value 3 [template = constants.%int_3.1ba]
- // CHECK:STDOUT: %int_2.loc13: Core.IntLiteral = int_value 2 [template = constants.%int_2.ecc]
- // CHECK:STDOUT: %int_1.loc13: Core.IntLiteral = int_value 1 [template = constants.%int_1.5b8]
- // CHECK:STDOUT: %.loc13_71.1: %struct_type.c.b.a = struct_literal (%int_3.loc13, %int_2.loc13, %int_1.loc13)
- // CHECK:STDOUT: %int_32.loc13_81: Core.IntLiteral = int_value 32 [template = constants.%int_32]
- // CHECK:STDOUT: %i32.loc13_81: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
- // CHECK:STDOUT: %int_32.loc13_90: Core.IntLiteral = int_value 32 [template = constants.%int_32]
- // CHECK:STDOUT: %i32.loc13_90: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
- // CHECK:STDOUT: %int_32.loc13_99: Core.IntLiteral = int_value 32 [template = constants.%int_32]
- // CHECK:STDOUT: %i32.loc13_99: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
- // CHECK:STDOUT: %struct_type.b.a.c: type = struct_type {.b: %i32, .a: %i32, .c: %i32} [template = constants.%struct_type.b.a.c]
- // CHECK:STDOUT: %impl.elem0.loc13_71.1: %Convert.type.cd1 = impl_witness_access constants.%impl_witness.5b0, element0 [template = constants.%Convert.925]
- // CHECK:STDOUT: %Convert.bound.loc13_71.1: <bound method> = bound_method %int_2.loc13, %impl.elem0.loc13_71.1 [template = constants.%Convert.bound.f0b]
- // CHECK:STDOUT: %Convert.specific_fn.loc13_71.1: <specific function> = specific_function %Convert.bound.loc13_71.1, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.20e]
- // CHECK:STDOUT: %int.convert_checked.loc13_71.1: init %i32 = call %Convert.specific_fn.loc13_71.1(%int_2.loc13) [template = constants.%int_2.166]
- // CHECK:STDOUT: %.loc13_71.2: %i32 = value_of_initializer %int.convert_checked.loc13_71.1 [template = constants.%int_2.166]
- // CHECK:STDOUT: %.loc13_71.3: %i32 = converted %int_2.loc13, %.loc13_71.2 [template = constants.%int_2.166]
- // CHECK:STDOUT: %impl.elem0.loc13_71.2: %Convert.type.cd1 = impl_witness_access constants.%impl_witness.5b0, element0 [template = constants.%Convert.925]
- // CHECK:STDOUT: %Convert.bound.loc13_71.2: <bound method> = bound_method %int_1.loc13, %impl.elem0.loc13_71.2 [template = constants.%Convert.bound.afd]
- // CHECK:STDOUT: %Convert.specific_fn.loc13_71.2: <specific function> = specific_function %Convert.bound.loc13_71.2, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.b73]
- // CHECK:STDOUT: %int.convert_checked.loc13_71.2: init %i32 = call %Convert.specific_fn.loc13_71.2(%int_1.loc13) [template = constants.%int_1.c60]
- // CHECK:STDOUT: %.loc13_71.4: %i32 = value_of_initializer %int.convert_checked.loc13_71.2 [template = constants.%int_1.c60]
- // CHECK:STDOUT: %.loc13_71.5: %i32 = converted %int_1.loc13, %.loc13_71.4 [template = constants.%int_1.c60]
- // CHECK:STDOUT: %impl.elem0.loc13_71.3: %Convert.type.cd1 = impl_witness_access constants.%impl_witness.5b0, element0 [template = constants.%Convert.925]
- // CHECK:STDOUT: %Convert.bound.loc13_71.3: <bound method> = bound_method %int_3.loc13, %impl.elem0.loc13_71.3 [template = constants.%Convert.bound.0db]
- // CHECK:STDOUT: %Convert.specific_fn.loc13_71.3: <specific function> = specific_function %Convert.bound.loc13_71.3, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.456]
- // CHECK:STDOUT: %int.convert_checked.loc13_71.3: init %i32 = call %Convert.specific_fn.loc13_71.3(%int_3.loc13) [template = constants.%int_3.25b]
- // CHECK:STDOUT: %.loc13_71.6: %i32 = value_of_initializer %int.convert_checked.loc13_71.3 [template = constants.%int_3.25b]
- // CHECK:STDOUT: %.loc13_71.7: %i32 = converted %int_3.loc13, %.loc13_71.6 [template = constants.%int_3.25b]
- // CHECK:STDOUT: %struct.loc13: %struct_type.b.a.c = struct_value (%.loc13_71.3, %.loc13_71.5, %.loc13_71.7) [template = constants.%struct.de7]
- // CHECK:STDOUT: %.loc13_73.1: %struct_type.b.a.c = converted %.loc13_71.1, %struct.loc13 [template = constants.%struct.de7]
- // CHECK:STDOUT: %.loc13_73.2: %i32 = struct_access %.loc13_73.1, element1 [template = constants.%int_1.c60]
- // CHECK:STDOUT: %.loc13_73.3: ref %i32 = struct_access file.%struct_copy.var, element1
- // CHECK:STDOUT: %.loc13_73.4: init %i32 = initialize_from %.loc13_73.2 to %.loc13_73.3 [template = constants.%int_1.c60]
- // CHECK:STDOUT: %.loc13_73.5: %i32 = struct_access %.loc13_73.1, element0 [template = constants.%int_2.166]
- // CHECK:STDOUT: %.loc13_73.6: ref %i32 = struct_access file.%struct_copy.var, element0
- // CHECK:STDOUT: %.loc13_73.7: init %i32 = initialize_from %.loc13_73.5 to %.loc13_73.6 [template = constants.%int_2.166]
- // CHECK:STDOUT: %.loc13_73.8: %i32 = struct_access %.loc13_73.1, element2 [template = constants.%int_3.25b]
- // CHECK:STDOUT: %.loc13_73.9: ref %i32 = struct_access file.%struct_copy.var, element2
- // CHECK:STDOUT: %.loc13_73.10: init %i32 = initialize_from %.loc13_73.8 to %.loc13_73.9 [template = constants.%int_3.25b]
- // CHECK:STDOUT: %.loc13_73.11: init %struct_type.a.b.c = struct_init (%.loc13_73.4, %.loc13_73.7, %.loc13_73.10) to file.%struct_copy.var [template = constants.%struct.cca]
- // CHECK:STDOUT: %.loc13_103: init %struct_type.a.b.c = converted %.loc13_73.1, %.loc13_73.11 [template = constants.%struct.cca]
- // CHECK:STDOUT: assign file.%struct_copy.var, %.loc13_103
- // CHECK:STDOUT: %int_0.loc15_30: Core.IntLiteral = int_value 0 [template = constants.%int_0.5c6]
- // CHECK:STDOUT: %.loc15_32.1: %tuple.type.985 = tuple_literal (%int_0.loc15_30)
- // CHECK:STDOUT: %int_32.loc15: Core.IntLiteral = int_value 32 [template = constants.%int_32]
- // CHECK:STDOUT: %i32.loc15: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
- // CHECK:STDOUT: %int_5: Core.IntLiteral = int_value 5 [template = constants.%int_5]
- // CHECK:STDOUT: %int_7: Core.IntLiteral = int_value 7 [template = constants.%int_7]
- // CHECK:STDOUT: %int_1.loc15: Core.IntLiteral = int_value 1 [template = constants.%int_1.5b8]
- // CHECK:STDOUT: %int_9: Core.IntLiteral = int_value 9 [template = constants.%int_9]
- // CHECK:STDOUT: %.loc15_54.1: %tuple.type.d46 = tuple_literal (%int_5, %int_7, %int_1.loc15, %int_9)
- // CHECK:STDOUT: %int_2.loc15: Core.IntLiteral = int_value 2 [template = constants.%int_2.ecc]
- // CHECK:STDOUT: %tuple.loc15: %tuple.type.d46 = tuple_value (%int_5, %int_7, %int_1.loc15, %int_9) [template = constants.%tuple.869]
- // CHECK:STDOUT: %.loc15_54.2: %tuple.type.d46 = converted %.loc15_54.1, %tuple.loc15 [template = constants.%tuple.869]
- // CHECK:STDOUT: %tuple.elem2: Core.IntLiteral = tuple_access %.loc15_54.2, element2 [template = constants.%int_1.5b8]
- // CHECK:STDOUT: %array_type.loc15: type = array_type %tuple.elem2, %i32 [template = constants.%array_type]
- // CHECK:STDOUT: %impl.elem0.loc15: %Convert.type.cd1 = impl_witness_access constants.%impl_witness.5b0, element0 [template = constants.%Convert.925]
- // CHECK:STDOUT: %Convert.bound.loc15: <bound method> = bound_method %int_0.loc15_30, %impl.elem0.loc15 [template = constants.%Convert.bound.b41]
- // CHECK:STDOUT: %Convert.specific_fn.loc15: <specific function> = specific_function %Convert.bound.loc15, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.c35]
- // CHECK:STDOUT: %int.convert_checked.loc15: init %i32 = call %Convert.specific_fn.loc15(%int_0.loc15_30) [template = constants.%int_0.f61]
- // CHECK:STDOUT: %.loc15_32.2: init %i32 = converted %int_0.loc15_30, %int.convert_checked.loc15 [template = constants.%int_0.f61]
- // CHECK:STDOUT: %.loc15_5: ref %array_type = splice_block file.%tuple_index.var {}
- // CHECK:STDOUT: %int_0.loc15_32: Core.IntLiteral = int_value 0 [template = constants.%int_0.5c6]
- // CHECK:STDOUT: %.loc15_32.3: ref %i32 = array_index %.loc15_5, %int_0.loc15_32
- // CHECK:STDOUT: %.loc15_32.4: init %i32 = initialize_from %.loc15_32.2 to %.loc15_32.3 [template = constants.%int_0.f61]
- // CHECK:STDOUT: %.loc15_32.5: init %array_type = array_init (%.loc15_32.4) to %.loc15_5 [template = constants.%array]
- // CHECK:STDOUT: %.loc15_34: init %array_type = converted %.loc15_32.1, %.loc15_32.5 [template = constants.%array]
- // CHECK:STDOUT: assign file.%tuple_index.var, %.loc15_34
- // CHECK:STDOUT: %int_0.loc17_32: Core.IntLiteral = int_value 0 [template = constants.%int_0.5c6]
- // CHECK:STDOUT: %.loc17_34.1: %tuple.type.985 = tuple_literal (%int_0.loc17_32)
- // CHECK:STDOUT: %int_32.loc17: Core.IntLiteral = int_value 32 [template = constants.%int_32]
- // CHECK:STDOUT: %i32.loc17: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
- // CHECK:STDOUT: %int_3.loc17: Core.IntLiteral = int_value 3 [template = constants.%int_3.1ba]
- // CHECK:STDOUT: %int_1.loc17: Core.IntLiteral = int_value 1 [template = constants.%int_1.5b8]
- // CHECK:STDOUT: %.loc17_60.1: %struct_type.a.b = struct_literal (%int_3.loc17, %int_1.loc17)
- // CHECK:STDOUT: %struct.loc17: %struct_type.a.b = struct_value (%int_3.loc17, %int_1.loc17) [template = constants.%struct.a81]
- // CHECK:STDOUT: %.loc17_60.2: %struct_type.a.b = converted %.loc17_60.1, %struct.loc17 [template = constants.%struct.a81]
- // CHECK:STDOUT: %.loc17_61: Core.IntLiteral = struct_access %.loc17_60.2, element1 [template = constants.%int_1.5b8]
- // CHECK:STDOUT: %array_type.loc17: type = array_type %.loc17_61, %i32 [template = constants.%array_type]
- // CHECK:STDOUT: %impl.elem0.loc17: %Convert.type.cd1 = impl_witness_access constants.%impl_witness.5b0, element0 [template = constants.%Convert.925]
- // CHECK:STDOUT: %Convert.bound.loc17: <bound method> = bound_method %int_0.loc17_32, %impl.elem0.loc17 [template = constants.%Convert.bound.b41]
- // CHECK:STDOUT: %Convert.specific_fn.loc17: <specific function> = specific_function %Convert.bound.loc17, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.c35]
- // CHECK:STDOUT: %int.convert_checked.loc17: init %i32 = call %Convert.specific_fn.loc17(%int_0.loc17_32) [template = constants.%int_0.f61]
- // CHECK:STDOUT: %.loc17_34.2: init %i32 = converted %int_0.loc17_32, %int.convert_checked.loc17 [template = constants.%int_0.f61]
- // CHECK:STDOUT: %.loc17_5: ref %array_type = splice_block file.%struct_access.var {}
- // CHECK:STDOUT: %int_0.loc17_34: Core.IntLiteral = int_value 0 [template = constants.%int_0.5c6]
- // CHECK:STDOUT: %.loc17_34.3: ref %i32 = array_index %.loc17_5, %int_0.loc17_34
- // CHECK:STDOUT: %.loc17_34.4: init %i32 = initialize_from %.loc17_34.2 to %.loc17_34.3 [template = constants.%int_0.f61]
- // CHECK:STDOUT: %.loc17_34.5: init %array_type = array_init (%.loc17_34.4) to %.loc17_5 [template = constants.%array]
- // CHECK:STDOUT: %.loc17_36: init %array_type = converted %.loc17_34.1, %.loc17_34.5 [template = constants.%array]
- // CHECK:STDOUT: assign file.%struct_access.var, %.loc17_36
- // CHECK:STDOUT: return
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
|