From 39a701084c2880d978f3abf281d3c2c033db3b22 Mon Sep 17 00:00:00 2001 From: Jon Ross-Perkins Date: Mon, 2 Jun 2025 09:21:11 -0700 Subject: [PATCH] Update eval tests (#5547) In the vein of https://github.com/carbon-language/carbon-lang/pull/5455. This also uses the 'int' min_prelude being added by #5546. --- .../check/testdata/eval/aggregate.carbon | 296 --------- .../check/testdata/eval/fail_aggregate.carbon | 173 ----- .../eval/min_prelude/aggregates.carbon | 597 ++++++++++++++++++ toolchain/check/testdata/eval/symbolic.carbon | 207 ------ 4 files changed, 597 insertions(+), 676 deletions(-) delete mode 100644 toolchain/check/testdata/eval/aggregate.carbon delete mode 100644 toolchain/check/testdata/eval/fail_aggregate.carbon create mode 100644 toolchain/check/testdata/eval/min_prelude/aggregates.carbon delete mode 100644 toolchain/check/testdata/eval/symbolic.carbon diff --git a/toolchain/check/testdata/eval/aggregate.carbon b/toolchain/check/testdata/eval/aggregate.carbon deleted file mode 100644 index ac8910933357..000000000000 --- a/toolchain/check/testdata/eval/aggregate.carbon +++ /dev/null @@ -1,296 +0,0 @@ -// 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: array(i32, 1) = (0,) as array(i32, (5, 7, 1, 9).2); - -var struct_access: array(i32, 1) = (0,) as array(i32, {.a = 3, .b = 1}.b); - -// CHECK:STDOUT: --- aggregate.carbon -// CHECK:STDOUT: -// CHECK:STDOUT: constants { -// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete] -// CHECK:STDOUT: %Int.type: type = generic_class_type @Int [concrete] -// CHECK:STDOUT: %Int.generic: %Int.type = struct_value () [concrete] -// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete] -// CHECK:STDOUT: %tuple.type.24b: type = tuple_type (type, type) [concrete] -// CHECK:STDOUT: %tuple.type.d07: type = tuple_type (%i32, %i32) [concrete] -// CHECK:STDOUT: %pattern_type.511: type = pattern_type %tuple.type.d07 [concrete] -// CHECK:STDOUT: %int_1.5b8: Core.IntLiteral = int_value 1 [concrete] -// CHECK:STDOUT: %int_2.ecc: Core.IntLiteral = int_value 2 [concrete] -// CHECK:STDOUT: %tuple.type.f94: type = tuple_type (Core.IntLiteral, Core.IntLiteral) [concrete] -// CHECK:STDOUT: %ImplicitAs.type.cc7: type = generic_interface_type @ImplicitAs [concrete] -// CHECK:STDOUT: %ImplicitAs.generic: %ImplicitAs.type.cc7 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] -// CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] -// CHECK:STDOUT: %To.c80: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] -// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.2, @impl.4f9(%To.c80) [symbolic] -// CHECK:STDOUT: %Convert.f06: %Convert.type.0f9 = struct_value () [symbolic] -// CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness imports.%ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] -// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] -// CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] -// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] -// CHECK:STDOUT: %Convert.bound.ab5: = bound_method %int_1.5b8, %Convert.956 [concrete] -// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] -// CHECK:STDOUT: %bound_method.9a1: = bound_method %int_1.5b8, %Convert.specific_fn [concrete] -// CHECK:STDOUT: %int_1.5d2: %i32 = int_value 1 [concrete] -// CHECK:STDOUT: %Convert.bound.ef9: = bound_method %int_2.ecc, %Convert.956 [concrete] -// CHECK:STDOUT: %bound_method.b92: = bound_method %int_2.ecc, %Convert.specific_fn [concrete] -// CHECK:STDOUT: %int_2.ef8: %i32 = int_value 2 [concrete] -// CHECK:STDOUT: %tuple.21c: %tuple.type.d07 = tuple_value (%int_1.5d2, %int_2.ef8) [concrete] -// CHECK:STDOUT: %tuple.elem0: ref %i32 = tuple_access file.%tuple_copy.var, element0 [concrete] -// CHECK:STDOUT: %tuple.elem1: ref %i32 = tuple_access file.%tuple_copy.var, element1 [concrete] -// CHECK:STDOUT: %struct_type.a.b.c: type = struct_type {.a: %i32, .b: %i32, .c: %i32} [concrete] -// CHECK:STDOUT: %pattern_type.8ae: type = pattern_type %struct_type.a.b.c [concrete] -// CHECK:STDOUT: %int_3.1ba: Core.IntLiteral = int_value 3 [concrete] -// CHECK:STDOUT: %struct_type.c.b.a: type = struct_type {.c: Core.IntLiteral, .b: Core.IntLiteral, .a: Core.IntLiteral} [concrete] -// CHECK:STDOUT: %struct_type.b.a.c: type = struct_type {.b: %i32, .a: %i32, .c: %i32} [concrete] -// CHECK:STDOUT: %Convert.bound.b30: = bound_method %int_3.1ba, %Convert.956 [concrete] -// CHECK:STDOUT: %bound_method.047: = bound_method %int_3.1ba, %Convert.specific_fn [concrete] -// CHECK:STDOUT: %int_3.822: %i32 = int_value 3 [concrete] -// CHECK:STDOUT: %struct.21d: %struct_type.b.a.c = struct_value (%int_2.ef8, %int_1.5d2, %int_3.822) [concrete] -// CHECK:STDOUT: %.91e: ref %i32 = struct_access file.%struct_copy.var, element1 [concrete] -// CHECK:STDOUT: %.657: ref %i32 = struct_access file.%struct_copy.var, element0 [concrete] -// CHECK:STDOUT: %.8fb: ref %i32 = struct_access file.%struct_copy.var, element2 [concrete] -// CHECK:STDOUT: %struct.cff: %struct_type.a.b.c = struct_value (%int_1.5d2, %int_2.ef8, %int_3.822) [concrete] -// CHECK:STDOUT: %array_type: type = array_type %int_1.5b8, %i32 [concrete] -// CHECK:STDOUT: %pattern_type.a98: type = pattern_type %array_type [concrete] -// CHECK:STDOUT: %int_0.5c6: Core.IntLiteral = int_value 0 [concrete] -// CHECK:STDOUT: %tuple.type.985: type = tuple_type (Core.IntLiteral) [concrete] -// CHECK:STDOUT: %int_5: Core.IntLiteral = int_value 5 [concrete] -// CHECK:STDOUT: %int_7: Core.IntLiteral = int_value 7 [concrete] -// CHECK:STDOUT: %int_9: Core.IntLiteral = int_value 9 [concrete] -// CHECK:STDOUT: %tuple.type.d46: type = tuple_type (Core.IntLiteral, Core.IntLiteral, Core.IntLiteral, Core.IntLiteral) [concrete] -// CHECK:STDOUT: %tuple.869: %tuple.type.d46 = tuple_value (%int_5, %int_7, %int_1.5b8, %int_9) [concrete] -// CHECK:STDOUT: %Convert.bound.d04: = bound_method %int_0.5c6, %Convert.956 [concrete] -// CHECK:STDOUT: %bound_method.b6e: = bound_method %int_0.5c6, %Convert.specific_fn [concrete] -// CHECK:STDOUT: %int_0.6a9: %i32 = int_value 0 [concrete] -// CHECK:STDOUT: %array: %array_type = tuple_value (%int_0.6a9) [concrete] -// CHECK:STDOUT: %struct_type.a.b: type = struct_type {.a: Core.IntLiteral, .b: Core.IntLiteral} [concrete] -// CHECK:STDOUT: %struct.a81: %struct_type.a.b = struct_value (%int_3.1ba, %int_1.5b8) [concrete] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: imports { -// CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { -// CHECK:STDOUT: .Int = %Core.Int -// CHECK:STDOUT: .ImplicitAs = %Core.ImplicitAs -// CHECK:STDOUT: import Core//prelude -// CHECK:STDOUT: import Core//prelude/... -// CHECK:STDOUT: } -// CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/types/int, Int, loaded [concrete = constants.%Int.generic] -// CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.cc7 = import_ref Core//prelude/operators/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic] -// CHECK:STDOUT: %Core.import_ref.a5b: @impl.4f9.%Convert.type (%Convert.type.0f9) = import_ref Core//prelude/types/int, loc19_39, loaded [symbolic = @impl.4f9.%Convert (constants.%Convert.f06)] -// CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (%Core.import_ref.a5b), @impl.4f9 [concrete] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: file { -// CHECK:STDOUT: package: = namespace [concrete] { -// 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: name_binding_decl { -// CHECK:STDOUT: %tuple_copy.patt: %pattern_type.511 = binding_pattern tuple_copy [concrete] -// CHECK:STDOUT: %tuple_copy.var_patt: %pattern_type.511 = var_pattern %tuple_copy.patt [concrete] -// CHECK:STDOUT: } -// CHECK:STDOUT: %tuple_copy.var: ref %tuple.type.d07 = var %tuple_copy.var_patt [concrete] -// CHECK:STDOUT: %.loc11_26.1: type = splice_block %.loc11_26.3 [concrete = constants.%tuple.type.d07] { -// CHECK:STDOUT: %int_32.loc11_18: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] -// CHECK:STDOUT: %i32.loc11_18: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] -// CHECK:STDOUT: %int_32.loc11_23: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] -// CHECK:STDOUT: %i32.loc11_23: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] -// CHECK:STDOUT: %.loc11_26.2: %tuple.type.24b = tuple_literal (%i32.loc11_18, %i32.loc11_23) -// CHECK:STDOUT: %.loc11_26.3: type = converted %.loc11_26.2, constants.%tuple.type.d07 [concrete = constants.%tuple.type.d07] -// CHECK:STDOUT: } -// CHECK:STDOUT: %tuple_copy: ref %tuple.type.d07 = bind_name tuple_copy, %tuple_copy.var [concrete = %tuple_copy.var] -// CHECK:STDOUT: name_binding_decl { -// CHECK:STDOUT: %struct_copy.patt: %pattern_type.8ae = binding_pattern struct_copy [concrete] -// CHECK:STDOUT: %struct_copy.var_patt: %pattern_type.8ae = var_pattern %struct_copy.patt [concrete] -// CHECK:STDOUT: } -// CHECK:STDOUT: %struct_copy.var: ref %struct_type.a.b.c = var %struct_copy.var_patt [concrete] -// CHECK:STDOUT: %.loc13: type = splice_block %struct_type.a.b.c [concrete = constants.%struct_type.a.b.c] { -// CHECK:STDOUT: %int_32.loc13_23: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] -// CHECK:STDOUT: %i32.loc13_23: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] -// CHECK:STDOUT: %int_32.loc13_32: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] -// CHECK:STDOUT: %i32.loc13_32: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] -// CHECK:STDOUT: %int_32.loc13_41: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] -// CHECK:STDOUT: %i32.loc13_41: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] -// CHECK:STDOUT: %struct_type.a.b.c: type = struct_type {.a: %i32, .b: %i32, .c: %i32} [concrete = constants.%struct_type.a.b.c] -// CHECK:STDOUT: } -// CHECK:STDOUT: %struct_copy: ref %struct_type.a.b.c = bind_name struct_copy, %struct_copy.var [concrete = %struct_copy.var] -// CHECK:STDOUT: name_binding_decl { -// CHECK:STDOUT: %tuple_index.patt: %pattern_type.a98 = binding_pattern tuple_index [concrete] -// CHECK:STDOUT: %tuple_index.var_patt: %pattern_type.a98 = var_pattern %tuple_index.patt [concrete] -// CHECK:STDOUT: } -// CHECK:STDOUT: %tuple_index.var: ref %array_type = var %tuple_index.var_patt [concrete] -// CHECK:STDOUT: %.loc15: type = splice_block %array_type.loc15 [concrete = constants.%array_type] { -// CHECK:STDOUT: %int_32.loc15: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] -// CHECK:STDOUT: %i32.loc15: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] -// CHECK:STDOUT: %int_1.loc15: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] -// CHECK:STDOUT: %array_type.loc15: type = array_type %int_1.loc15, %i32.loc15 [concrete = constants.%array_type] -// CHECK:STDOUT: } -// CHECK:STDOUT: %tuple_index: ref %array_type = bind_name tuple_index, %tuple_index.var [concrete = %tuple_index.var] -// CHECK:STDOUT: name_binding_decl { -// CHECK:STDOUT: %struct_access.patt: %pattern_type.a98 = binding_pattern struct_access [concrete] -// CHECK:STDOUT: %struct_access.var_patt: %pattern_type.a98 = var_pattern %struct_access.patt [concrete] -// CHECK:STDOUT: } -// CHECK:STDOUT: %struct_access.var: ref %array_type = var %struct_access.var_patt [concrete] -// CHECK:STDOUT: %.loc17: type = splice_block %array_type.loc17 [concrete = constants.%array_type] { -// CHECK:STDOUT: %int_32.loc17: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] -// CHECK:STDOUT: %i32.loc17: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] -// CHECK:STDOUT: %int_1.loc17: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] -// CHECK:STDOUT: %array_type.loc17: type = array_type %int_1.loc17, %i32.loc17 [concrete = constants.%array_type] -// CHECK:STDOUT: } -// CHECK:STDOUT: %struct_access: ref %array_type = bind_name struct_access, %struct_access.var [concrete = %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 [concrete = constants.%int_1.5b8] -// CHECK:STDOUT: %int_2.loc11: Core.IntLiteral = int_value 2 [concrete = 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 [concrete = constants.%int_32] -// CHECK:STDOUT: %i32.loc11_41: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] -// CHECK:STDOUT: %int_32.loc11_46: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] -// CHECK:STDOUT: %i32.loc11_46: type = class_type @Int, @Int(constants.%int_32) [concrete = 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.d07 [concrete = constants.%tuple.type.d07] -// CHECK:STDOUT: %impl.elem0.loc11_35.1: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] -// CHECK:STDOUT: %bound_method.loc11_35.1: = bound_method %int_1.loc11, %impl.elem0.loc11_35.1 [concrete = constants.%Convert.bound.ab5] -// CHECK:STDOUT: %specific_fn.loc11_35.1: = specific_function %impl.elem0.loc11_35.1, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] -// CHECK:STDOUT: %bound_method.loc11_35.2: = bound_method %int_1.loc11, %specific_fn.loc11_35.1 [concrete = constants.%bound_method.9a1] -// CHECK:STDOUT: %int.convert_checked.loc11_35.1: init %i32 = call %bound_method.loc11_35.2(%int_1.loc11) [concrete = constants.%int_1.5d2] -// CHECK:STDOUT: %.loc11_35.2: %i32 = value_of_initializer %int.convert_checked.loc11_35.1 [concrete = constants.%int_1.5d2] -// CHECK:STDOUT: %.loc11_35.3: %i32 = converted %int_1.loc11, %.loc11_35.2 [concrete = constants.%int_1.5d2] -// CHECK:STDOUT: %impl.elem0.loc11_35.2: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] -// CHECK:STDOUT: %bound_method.loc11_35.3: = bound_method %int_2.loc11, %impl.elem0.loc11_35.2 [concrete = constants.%Convert.bound.ef9] -// CHECK:STDOUT: %specific_fn.loc11_35.2: = specific_function %impl.elem0.loc11_35.2, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] -// CHECK:STDOUT: %bound_method.loc11_35.4: = bound_method %int_2.loc11, %specific_fn.loc11_35.2 [concrete = constants.%bound_method.b92] -// CHECK:STDOUT: %int.convert_checked.loc11_35.2: init %i32 = call %bound_method.loc11_35.4(%int_2.loc11) [concrete = constants.%int_2.ef8] -// CHECK:STDOUT: %.loc11_35.4: %i32 = value_of_initializer %int.convert_checked.loc11_35.2 [concrete = constants.%int_2.ef8] -// CHECK:STDOUT: %.loc11_35.5: %i32 = converted %int_2.loc11, %.loc11_35.4 [concrete = constants.%int_2.ef8] -// CHECK:STDOUT: %tuple.loc11: %tuple.type.d07 = tuple_value (%.loc11_35.3, %.loc11_35.5) [concrete = constants.%tuple.21c] -// CHECK:STDOUT: %.loc11_37.1: %tuple.type.d07 = converted %.loc11_35.1, %tuple.loc11 [concrete = constants.%tuple.21c] -// CHECK:STDOUT: %tuple.elem0.loc11_37.1: %i32 = tuple_access %.loc11_37.1, element0 [concrete = constants.%int_1.5d2] -// CHECK:STDOUT: %tuple.elem0.loc11_37.2: ref %i32 = tuple_access file.%tuple_copy.var, element0 [concrete = constants.%tuple.elem0] -// CHECK:STDOUT: %.loc11_37.2: init %i32 = initialize_from %tuple.elem0.loc11_37.1 to %tuple.elem0.loc11_37.2 [concrete = constants.%int_1.5d2] -// CHECK:STDOUT: %tuple.elem1.loc11_37.1: %i32 = tuple_access %.loc11_37.1, element1 [concrete = constants.%int_2.ef8] -// CHECK:STDOUT: %tuple.elem1.loc11_37.2: ref %i32 = tuple_access file.%tuple_copy.var, element1 [concrete = constants.%tuple.elem1] -// CHECK:STDOUT: %.loc11_37.3: init %i32 = initialize_from %tuple.elem1.loc11_37.1 to %tuple.elem1.loc11_37.2 [concrete = constants.%int_2.ef8] -// CHECK:STDOUT: %.loc11_37.4: init %tuple.type.d07 = tuple_init (%.loc11_37.2, %.loc11_37.3) to file.%tuple_copy.var [concrete = constants.%tuple.21c] -// CHECK:STDOUT: %.loc11_1: init %tuple.type.d07 = converted %.loc11_37.1, %.loc11_37.4 [concrete = constants.%tuple.21c] -// CHECK:STDOUT: assign file.%tuple_copy.var, %.loc11_1 -// CHECK:STDOUT: %int_3.loc13: Core.IntLiteral = int_value 3 [concrete = constants.%int_3.1ba] -// CHECK:STDOUT: %int_2.loc13: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc] -// CHECK:STDOUT: %int_1.loc13: Core.IntLiteral = int_value 1 [concrete = 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 [concrete = constants.%int_32] -// CHECK:STDOUT: %i32.loc13_81: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] -// CHECK:STDOUT: %int_32.loc13_90: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] -// CHECK:STDOUT: %i32.loc13_90: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] -// CHECK:STDOUT: %int_32.loc13_99: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] -// CHECK:STDOUT: %i32.loc13_99: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] -// CHECK:STDOUT: %struct_type.b.a.c: type = struct_type {.b: %i32, .a: %i32, .c: %i32} [concrete = constants.%struct_type.b.a.c] -// CHECK:STDOUT: %impl.elem0.loc13_71.1: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] -// CHECK:STDOUT: %bound_method.loc13_71.1: = bound_method %int_2.loc13, %impl.elem0.loc13_71.1 [concrete = constants.%Convert.bound.ef9] -// CHECK:STDOUT: %specific_fn.loc13_71.1: = specific_function %impl.elem0.loc13_71.1, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] -// CHECK:STDOUT: %bound_method.loc13_71.2: = bound_method %int_2.loc13, %specific_fn.loc13_71.1 [concrete = constants.%bound_method.b92] -// CHECK:STDOUT: %int.convert_checked.loc13_71.1: init %i32 = call %bound_method.loc13_71.2(%int_2.loc13) [concrete = constants.%int_2.ef8] -// CHECK:STDOUT: %.loc13_71.2: %i32 = value_of_initializer %int.convert_checked.loc13_71.1 [concrete = constants.%int_2.ef8] -// CHECK:STDOUT: %.loc13_71.3: %i32 = converted %int_2.loc13, %.loc13_71.2 [concrete = constants.%int_2.ef8] -// CHECK:STDOUT: %impl.elem0.loc13_71.2: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] -// CHECK:STDOUT: %bound_method.loc13_71.3: = bound_method %int_1.loc13, %impl.elem0.loc13_71.2 [concrete = constants.%Convert.bound.ab5] -// CHECK:STDOUT: %specific_fn.loc13_71.2: = specific_function %impl.elem0.loc13_71.2, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] -// CHECK:STDOUT: %bound_method.loc13_71.4: = bound_method %int_1.loc13, %specific_fn.loc13_71.2 [concrete = constants.%bound_method.9a1] -// CHECK:STDOUT: %int.convert_checked.loc13_71.2: init %i32 = call %bound_method.loc13_71.4(%int_1.loc13) [concrete = constants.%int_1.5d2] -// CHECK:STDOUT: %.loc13_71.4: %i32 = value_of_initializer %int.convert_checked.loc13_71.2 [concrete = constants.%int_1.5d2] -// CHECK:STDOUT: %.loc13_71.5: %i32 = converted %int_1.loc13, %.loc13_71.4 [concrete = constants.%int_1.5d2] -// CHECK:STDOUT: %impl.elem0.loc13_71.3: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] -// CHECK:STDOUT: %bound_method.loc13_71.5: = bound_method %int_3.loc13, %impl.elem0.loc13_71.3 [concrete = constants.%Convert.bound.b30] -// CHECK:STDOUT: %specific_fn.loc13_71.3: = specific_function %impl.elem0.loc13_71.3, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] -// CHECK:STDOUT: %bound_method.loc13_71.6: = bound_method %int_3.loc13, %specific_fn.loc13_71.3 [concrete = constants.%bound_method.047] -// CHECK:STDOUT: %int.convert_checked.loc13_71.3: init %i32 = call %bound_method.loc13_71.6(%int_3.loc13) [concrete = constants.%int_3.822] -// CHECK:STDOUT: %.loc13_71.6: %i32 = value_of_initializer %int.convert_checked.loc13_71.3 [concrete = constants.%int_3.822] -// CHECK:STDOUT: %.loc13_71.7: %i32 = converted %int_3.loc13, %.loc13_71.6 [concrete = constants.%int_3.822] -// CHECK:STDOUT: %struct.loc13: %struct_type.b.a.c = struct_value (%.loc13_71.3, %.loc13_71.5, %.loc13_71.7) [concrete = constants.%struct.21d] -// CHECK:STDOUT: %.loc13_73.1: %struct_type.b.a.c = converted %.loc13_71.1, %struct.loc13 [concrete = constants.%struct.21d] -// CHECK:STDOUT: %.loc13_73.2: %i32 = struct_access %.loc13_73.1, element1 [concrete = constants.%int_1.5d2] -// CHECK:STDOUT: %.loc13_73.3: ref %i32 = struct_access file.%struct_copy.var, element1 [concrete = constants.%.91e] -// CHECK:STDOUT: %.loc13_73.4: init %i32 = initialize_from %.loc13_73.2 to %.loc13_73.3 [concrete = constants.%int_1.5d2] -// CHECK:STDOUT: %.loc13_73.5: %i32 = struct_access %.loc13_73.1, element0 [concrete = constants.%int_2.ef8] -// CHECK:STDOUT: %.loc13_73.6: ref %i32 = struct_access file.%struct_copy.var, element0 [concrete = constants.%.657] -// CHECK:STDOUT: %.loc13_73.7: init %i32 = initialize_from %.loc13_73.5 to %.loc13_73.6 [concrete = constants.%int_2.ef8] -// CHECK:STDOUT: %.loc13_73.8: %i32 = struct_access %.loc13_73.1, element2 [concrete = constants.%int_3.822] -// CHECK:STDOUT: %.loc13_73.9: ref %i32 = struct_access file.%struct_copy.var, element2 [concrete = constants.%.8fb] -// CHECK:STDOUT: %.loc13_73.10: init %i32 = initialize_from %.loc13_73.8 to %.loc13_73.9 [concrete = constants.%int_3.822] -// 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 [concrete = constants.%struct.cff] -// CHECK:STDOUT: %.loc13_1: init %struct_type.a.b.c = converted %.loc13_73.1, %.loc13_73.11 [concrete = constants.%struct.cff] -// CHECK:STDOUT: assign file.%struct_copy.var, %.loc13_1 -// CHECK:STDOUT: %int_0.loc15_35: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] -// CHECK:STDOUT: %.loc15_37.1: %tuple.type.985 = tuple_literal (%int_0.loc15_35) -// CHECK:STDOUT: %int_32.loc15: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] -// CHECK:STDOUT: %i32.loc15: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] -// CHECK:STDOUT: %int_5: Core.IntLiteral = int_value 5 [concrete = constants.%int_5] -// CHECK:STDOUT: %int_7: Core.IntLiteral = int_value 7 [concrete = constants.%int_7] -// CHECK:STDOUT: %int_1.loc15: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] -// CHECK:STDOUT: %int_9: Core.IntLiteral = int_value 9 [concrete = constants.%int_9] -// CHECK:STDOUT: %.loc15_64.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 [concrete = constants.%int_2.ecc] -// CHECK:STDOUT: %tuple.loc15: %tuple.type.d46 = tuple_value (%int_5, %int_7, %int_1.loc15, %int_9) [concrete = constants.%tuple.869] -// CHECK:STDOUT: %.loc15_64.2: %tuple.type.d46 = converted %.loc15_64.1, %tuple.loc15 [concrete = constants.%tuple.869] -// CHECK:STDOUT: %tuple.elem2: Core.IntLiteral = tuple_access %.loc15_64.2, element2 [concrete = constants.%int_1.5b8] -// CHECK:STDOUT: %array_type.loc15: type = array_type %tuple.elem2, %i32.loc15 [concrete = constants.%array_type] -// CHECK:STDOUT: %impl.elem0.loc15: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] -// CHECK:STDOUT: %bound_method.loc15_37.1: = bound_method %int_0.loc15_35, %impl.elem0.loc15 [concrete = constants.%Convert.bound.d04] -// CHECK:STDOUT: %specific_fn.loc15: = specific_function %impl.elem0.loc15, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] -// CHECK:STDOUT: %bound_method.loc15_37.2: = bound_method %int_0.loc15_35, %specific_fn.loc15 [concrete = constants.%bound_method.b6e] -// CHECK:STDOUT: %int.convert_checked.loc15: init %i32 = call %bound_method.loc15_37.2(%int_0.loc15_35) [concrete = constants.%int_0.6a9] -// CHECK:STDOUT: %.loc15_37.2: init %i32 = converted %int_0.loc15_35, %int.convert_checked.loc15 [concrete = constants.%int_0.6a9] -// CHECK:STDOUT: %.loc15_1: ref %array_type = splice_block file.%tuple_index.var [concrete = file.%tuple_index.var] {} -// CHECK:STDOUT: %int_0.loc15_37: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] -// CHECK:STDOUT: %.loc15_37.3: ref %i32 = array_index %.loc15_1, %int_0.loc15_37 -// CHECK:STDOUT: %.loc15_37.4: init %i32 = initialize_from %.loc15_37.2 to %.loc15_37.3 [concrete = constants.%int_0.6a9] -// CHECK:STDOUT: %.loc15_37.5: init %array_type = array_init (%.loc15_37.4) to %.loc15_1 [concrete = constants.%array] -// CHECK:STDOUT: %.loc15_39: init %array_type = converted %.loc15_37.1, %.loc15_37.5 [concrete = constants.%array] -// CHECK:STDOUT: assign file.%tuple_index.var, %.loc15_39 -// CHECK:STDOUT: %int_0.loc17_37: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] -// CHECK:STDOUT: %.loc17_39.1: %tuple.type.985 = tuple_literal (%int_0.loc17_37) -// CHECK:STDOUT: %int_32.loc17: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] -// CHECK:STDOUT: %i32.loc17: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] -// CHECK:STDOUT: %int_3.loc17: Core.IntLiteral = int_value 3 [concrete = constants.%int_3.1ba] -// CHECK:STDOUT: %int_1.loc17: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] -// CHECK:STDOUT: %.loc17_70.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) [concrete = constants.%struct.a81] -// CHECK:STDOUT: %.loc17_70.2: %struct_type.a.b = converted %.loc17_70.1, %struct.loc17 [concrete = constants.%struct.a81] -// CHECK:STDOUT: %.loc17_71: Core.IntLiteral = struct_access %.loc17_70.2, element1 [concrete = constants.%int_1.5b8] -// CHECK:STDOUT: %array_type.loc17: type = array_type %.loc17_71, %i32.loc17 [concrete = constants.%array_type] -// CHECK:STDOUT: %impl.elem0.loc17: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] -// CHECK:STDOUT: %bound_method.loc17_39.1: = bound_method %int_0.loc17_37, %impl.elem0.loc17 [concrete = constants.%Convert.bound.d04] -// CHECK:STDOUT: %specific_fn.loc17: = specific_function %impl.elem0.loc17, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] -// CHECK:STDOUT: %bound_method.loc17_39.2: = bound_method %int_0.loc17_37, %specific_fn.loc17 [concrete = constants.%bound_method.b6e] -// CHECK:STDOUT: %int.convert_checked.loc17: init %i32 = call %bound_method.loc17_39.2(%int_0.loc17_37) [concrete = constants.%int_0.6a9] -// CHECK:STDOUT: %.loc17_39.2: init %i32 = converted %int_0.loc17_37, %int.convert_checked.loc17 [concrete = constants.%int_0.6a9] -// CHECK:STDOUT: %.loc17_1: ref %array_type = splice_block file.%struct_access.var [concrete = file.%struct_access.var] {} -// CHECK:STDOUT: %int_0.loc17_39: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] -// CHECK:STDOUT: %.loc17_39.3: ref %i32 = array_index %.loc17_1, %int_0.loc17_39 -// CHECK:STDOUT: %.loc17_39.4: init %i32 = initialize_from %.loc17_39.2 to %.loc17_39.3 [concrete = constants.%int_0.6a9] -// CHECK:STDOUT: %.loc17_39.5: init %array_type = array_init (%.loc17_39.4) to %.loc17_1 [concrete = constants.%array] -// CHECK:STDOUT: %.loc17_41: init %array_type = converted %.loc17_39.1, %.loc17_39.5 [concrete = constants.%array] -// CHECK:STDOUT: assign file.%struct_access.var, %.loc17_41 -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: diff --git a/toolchain/check/testdata/eval/fail_aggregate.carbon b/toolchain/check/testdata/eval/fail_aggregate.carbon deleted file mode 100644 index 5b159822359d..000000000000 --- a/toolchain/check/testdata/eval/fail_aggregate.carbon +++ /dev/null @@ -1,173 +0,0 @@ -// 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/fail_aggregate.carbon -// TIP: To dump output, run: -// TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/eval/fail_aggregate.carbon - -// TODO: This creates an array temporary, which we don't yet support evaluating. - -// CHECK:STDERR: fail_aggregate.carbon:[[@LINE+4]]:53: error: array bound is not a constant [InvalidArrayExpr] -// CHECK:STDERR: var array_index: array(i32, 1) = (0,) as array(i32, ((5, 7, 1, 9) as array(i32, 4))[2]); -// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// CHECK:STDERR: -var array_index: array(i32, 1) = (0,) as array(i32, ((5, 7, 1, 9) as array(i32, 4))[2]); - -// CHECK:STDOUT: --- fail_aggregate.carbon -// CHECK:STDOUT: -// CHECK:STDOUT: constants { -// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete] -// CHECK:STDOUT: %Int.type: type = generic_class_type @Int [concrete] -// CHECK:STDOUT: %Int.generic: %Int.type = struct_value () [concrete] -// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete] -// CHECK:STDOUT: %int_1.5b8: Core.IntLiteral = int_value 1 [concrete] -// CHECK:STDOUT: %array_type.0cb: type = array_type %int_1.5b8, %i32 [concrete] -// CHECK:STDOUT: %pattern_type.a98: type = pattern_type %array_type.0cb [concrete] -// CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete] -// CHECK:STDOUT: %tuple.type.985: type = tuple_type (Core.IntLiteral) [concrete] -// CHECK:STDOUT: %int_5.64b: Core.IntLiteral = int_value 5 [concrete] -// CHECK:STDOUT: %int_7.29f: Core.IntLiteral = int_value 7 [concrete] -// CHECK:STDOUT: %int_9.988: Core.IntLiteral = int_value 9 [concrete] -// CHECK:STDOUT: %tuple.type.d46: type = tuple_type (Core.IntLiteral, Core.IntLiteral, Core.IntLiteral, Core.IntLiteral) [concrete] -// CHECK:STDOUT: %int_4: Core.IntLiteral = int_value 4 [concrete] -// CHECK:STDOUT: %array_type.f32: type = array_type %int_4, %i32 [concrete] -// CHECK:STDOUT: %ImplicitAs.type.cc7: type = generic_interface_type @ImplicitAs [concrete] -// CHECK:STDOUT: %ImplicitAs.generic: %ImplicitAs.type.cc7 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] -// CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] -// CHECK:STDOUT: %To.c80: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] -// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.2, @impl.4f9(%To.c80) [symbolic] -// CHECK:STDOUT: %Convert.f06: %Convert.type.0f9 = struct_value () [symbolic] -// CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness imports.%ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] -// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] -// CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] -// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] -// CHECK:STDOUT: %Convert.bound.4e6: = bound_method %int_5.64b, %Convert.956 [concrete] -// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] -// CHECK:STDOUT: %bound_method.a25: = bound_method %int_5.64b, %Convert.specific_fn [concrete] -// CHECK:STDOUT: %int_5.0f6: %i32 = int_value 5 [concrete] -// CHECK:STDOUT: %Convert.bound.208: = bound_method %int_7.29f, %Convert.956 [concrete] -// CHECK:STDOUT: %bound_method.3bd: = bound_method %int_7.29f, %Convert.specific_fn [concrete] -// CHECK:STDOUT: %int_7.0b1: %i32 = int_value 7 [concrete] -// CHECK:STDOUT: %int_2.ecc: Core.IntLiteral = int_value 2 [concrete] -// CHECK:STDOUT: %Convert.bound.ab5: = bound_method %int_1.5b8, %Convert.956 [concrete] -// CHECK:STDOUT: %bound_method.9a1: = bound_method %int_1.5b8, %Convert.specific_fn [concrete] -// CHECK:STDOUT: %int_1.5d2: %i32 = int_value 1 [concrete] -// CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [concrete] -// CHECK:STDOUT: %Convert.bound.9e2: = bound_method %int_9.988, %Convert.956 [concrete] -// CHECK:STDOUT: %bound_method.cd3: = bound_method %int_9.988, %Convert.specific_fn [concrete] -// CHECK:STDOUT: %int_9.f88: %i32 = int_value 9 [concrete] -// CHECK:STDOUT: %array: %array_type.f32 = tuple_value (%int_5.0f6, %int_7.0b1, %int_1.5d2, %int_9.f88) [concrete] -// CHECK:STDOUT: %Convert.bound.ef9: = bound_method %int_2.ecc, %Convert.956 [concrete] -// CHECK:STDOUT: %bound_method.b92: = bound_method %int_2.ecc, %Convert.specific_fn [concrete] -// CHECK:STDOUT: %int_2.ef8: %i32 = int_value 2 [concrete] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: imports { -// CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { -// CHECK:STDOUT: .Int = %Core.Int -// CHECK:STDOUT: .ImplicitAs = %Core.ImplicitAs -// CHECK:STDOUT: import Core//prelude -// CHECK:STDOUT: import Core//prelude/... -// CHECK:STDOUT: } -// CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/types/int, Int, loaded [concrete = constants.%Int.generic] -// CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.cc7 = import_ref Core//prelude/operators/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic] -// CHECK:STDOUT: %Core.import_ref.a5b: @impl.4f9.%Convert.type (%Convert.type.0f9) = import_ref Core//prelude/types/int, loc19_39, loaded [symbolic = @impl.4f9.%Convert (constants.%Convert.f06)] -// CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (%Core.import_ref.a5b), @impl.4f9 [concrete] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: file { -// CHECK:STDOUT: package: = namespace [concrete] { -// CHECK:STDOUT: .Core = imports.%Core -// CHECK:STDOUT: .array_index = %array_index -// CHECK:STDOUT: } -// CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: name_binding_decl { -// CHECK:STDOUT: %array_index.patt: %pattern_type.a98 = binding_pattern array_index [concrete] -// CHECK:STDOUT: %array_index.var_patt: %pattern_type.a98 = var_pattern %array_index.patt [concrete] -// CHECK:STDOUT: } -// CHECK:STDOUT: %array_index.var: ref %array_type.0cb = var %array_index.var_patt [concrete] -// CHECK:STDOUT: %.loc17: type = splice_block %array_type [concrete = constants.%array_type.0cb] { -// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] -// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] -// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] -// CHECK:STDOUT: %array_type: type = array_type %int_1, %i32 [concrete = constants.%array_type.0cb] -// CHECK:STDOUT: } -// CHECK:STDOUT: %array_index: ref %array_type.0cb = bind_name array_index, %array_index.var [concrete = %array_index.var] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @__global_init() { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %int_0.loc17_35: Core.IntLiteral = int_value 0 [concrete = constants.%int_0] -// CHECK:STDOUT: %.loc17_37: %tuple.type.985 = tuple_literal (%int_0.loc17_35) -// CHECK:STDOUT: %int_32.loc17_48: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] -// CHECK:STDOUT: %i32.loc17_48: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] -// CHECK:STDOUT: %int_5: Core.IntLiteral = int_value 5 [concrete = constants.%int_5.64b] -// CHECK:STDOUT: %int_7: Core.IntLiteral = int_value 7 [concrete = constants.%int_7.29f] -// CHECK:STDOUT: %int_1.loc17_61: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] -// CHECK:STDOUT: %int_9: Core.IntLiteral = int_value 9 [concrete = constants.%int_9.988] -// CHECK:STDOUT: %.loc17_65.1: %tuple.type.d46 = tuple_literal (%int_5, %int_7, %int_1.loc17_61, %int_9) -// CHECK:STDOUT: %int_32.loc17_76: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] -// CHECK:STDOUT: %i32.loc17_76: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] -// CHECK:STDOUT: %int_4: Core.IntLiteral = int_value 4 [concrete = constants.%int_4] -// CHECK:STDOUT: %array_type: type = array_type %int_4, %i32.loc17_76 [concrete = constants.%array_type.f32] -// CHECK:STDOUT: %impl.elem0.loc17_65.1: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] -// CHECK:STDOUT: %bound_method.loc17_65.1: = bound_method %int_5, %impl.elem0.loc17_65.1 [concrete = constants.%Convert.bound.4e6] -// CHECK:STDOUT: %specific_fn.loc17_65.1: = specific_function %impl.elem0.loc17_65.1, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] -// CHECK:STDOUT: %bound_method.loc17_65.2: = bound_method %int_5, %specific_fn.loc17_65.1 [concrete = constants.%bound_method.a25] -// CHECK:STDOUT: %int.convert_checked.loc17_65.1: init %i32 = call %bound_method.loc17_65.2(%int_5) [concrete = constants.%int_5.0f6] -// CHECK:STDOUT: %.loc17_65.2: init %i32 = converted %int_5, %int.convert_checked.loc17_65.1 [concrete = constants.%int_5.0f6] -// CHECK:STDOUT: %.loc17_65.3: ref %array_type.f32 = temporary_storage -// CHECK:STDOUT: %int_0.loc17_65: Core.IntLiteral = int_value 0 [concrete = constants.%int_0] -// CHECK:STDOUT: %.loc17_65.4: ref %i32 = array_index %.loc17_65.3, %int_0.loc17_65 -// CHECK:STDOUT: %.loc17_65.5: init %i32 = initialize_from %.loc17_65.2 to %.loc17_65.4 [concrete = constants.%int_5.0f6] -// CHECK:STDOUT: %impl.elem0.loc17_65.2: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] -// CHECK:STDOUT: %bound_method.loc17_65.3: = bound_method %int_7, %impl.elem0.loc17_65.2 [concrete = constants.%Convert.bound.208] -// CHECK:STDOUT: %specific_fn.loc17_65.2: = specific_function %impl.elem0.loc17_65.2, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] -// CHECK:STDOUT: %bound_method.loc17_65.4: = bound_method %int_7, %specific_fn.loc17_65.2 [concrete = constants.%bound_method.3bd] -// CHECK:STDOUT: %int.convert_checked.loc17_65.2: init %i32 = call %bound_method.loc17_65.4(%int_7) [concrete = constants.%int_7.0b1] -// CHECK:STDOUT: %.loc17_65.6: init %i32 = converted %int_7, %int.convert_checked.loc17_65.2 [concrete = constants.%int_7.0b1] -// CHECK:STDOUT: %int_1.loc17_65: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] -// CHECK:STDOUT: %.loc17_65.7: ref %i32 = array_index %.loc17_65.3, %int_1.loc17_65 -// CHECK:STDOUT: %.loc17_65.8: init %i32 = initialize_from %.loc17_65.6 to %.loc17_65.7 [concrete = constants.%int_7.0b1] -// CHECK:STDOUT: %impl.elem0.loc17_65.3: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] -// CHECK:STDOUT: %bound_method.loc17_65.5: = bound_method %int_1.loc17_61, %impl.elem0.loc17_65.3 [concrete = constants.%Convert.bound.ab5] -// CHECK:STDOUT: %specific_fn.loc17_65.3: = specific_function %impl.elem0.loc17_65.3, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] -// CHECK:STDOUT: %bound_method.loc17_65.6: = bound_method %int_1.loc17_61, %specific_fn.loc17_65.3 [concrete = constants.%bound_method.9a1] -// CHECK:STDOUT: %int.convert_checked.loc17_65.3: init %i32 = call %bound_method.loc17_65.6(%int_1.loc17_61) [concrete = constants.%int_1.5d2] -// CHECK:STDOUT: %.loc17_65.9: init %i32 = converted %int_1.loc17_61, %int.convert_checked.loc17_65.3 [concrete = constants.%int_1.5d2] -// CHECK:STDOUT: %int_2.loc17_65: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc] -// CHECK:STDOUT: %.loc17_65.10: ref %i32 = array_index %.loc17_65.3, %int_2.loc17_65 -// CHECK:STDOUT: %.loc17_65.11: init %i32 = initialize_from %.loc17_65.9 to %.loc17_65.10 [concrete = constants.%int_1.5d2] -// CHECK:STDOUT: %impl.elem0.loc17_65.4: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] -// CHECK:STDOUT: %bound_method.loc17_65.7: = bound_method %int_9, %impl.elem0.loc17_65.4 [concrete = constants.%Convert.bound.9e2] -// CHECK:STDOUT: %specific_fn.loc17_65.4: = specific_function %impl.elem0.loc17_65.4, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] -// CHECK:STDOUT: %bound_method.loc17_65.8: = bound_method %int_9, %specific_fn.loc17_65.4 [concrete = constants.%bound_method.cd3] -// CHECK:STDOUT: %int.convert_checked.loc17_65.4: init %i32 = call %bound_method.loc17_65.8(%int_9) [concrete = constants.%int_9.f88] -// CHECK:STDOUT: %.loc17_65.12: init %i32 = converted %int_9, %int.convert_checked.loc17_65.4 [concrete = constants.%int_9.f88] -// CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [concrete = constants.%int_3] -// CHECK:STDOUT: %.loc17_65.13: ref %i32 = array_index %.loc17_65.3, %int_3 -// CHECK:STDOUT: %.loc17_65.14: init %i32 = initialize_from %.loc17_65.12 to %.loc17_65.13 [concrete = constants.%int_9.f88] -// CHECK:STDOUT: %.loc17_65.15: init %array_type.f32 = array_init (%.loc17_65.5, %.loc17_65.8, %.loc17_65.11, %.loc17_65.14) to %.loc17_65.3 [concrete = constants.%array] -// CHECK:STDOUT: %.loc17_67.1: init %array_type.f32 = converted %.loc17_65.1, %.loc17_65.15 [concrete = constants.%array] -// CHECK:STDOUT: %int_2.loc17_85: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc] -// CHECK:STDOUT: %.loc17_67.2: ref %array_type.f32 = temporary %.loc17_65.3, %.loc17_67.1 -// CHECK:STDOUT: %int_32.loc17_86: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] -// CHECK:STDOUT: %i32.loc17_86: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] -// CHECK:STDOUT: %impl.elem0.loc17_85: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] -// CHECK:STDOUT: %bound_method.loc17_85.1: = bound_method %int_2.loc17_85, %impl.elem0.loc17_85 [concrete = constants.%Convert.bound.ef9] -// CHECK:STDOUT: %specific_fn.loc17_85: = specific_function %impl.elem0.loc17_85, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] -// CHECK:STDOUT: %bound_method.loc17_85.2: = bound_method %int_2.loc17_85, %specific_fn.loc17_85 [concrete = constants.%bound_method.b92] -// CHECK:STDOUT: %int.convert_checked.loc17_85: init %i32 = call %bound_method.loc17_85.2(%int_2.loc17_85) [concrete = constants.%int_2.ef8] -// CHECK:STDOUT: %.loc17_85.1: %i32 = value_of_initializer %int.convert_checked.loc17_85 [concrete = constants.%int_2.ef8] -// CHECK:STDOUT: %.loc17_85.2: %i32 = converted %int_2.loc17_85, %.loc17_85.1 [concrete = constants.%int_2.ef8] -// CHECK:STDOUT: %.loc17_86.1: ref %i32 = array_index %.loc17_67.2, %.loc17_85.2 -// CHECK:STDOUT: %.loc17_86.2: %i32 = bind_value %.loc17_86.1 -// CHECK:STDOUT: assign file.%array_index.var, -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: diff --git a/toolchain/check/testdata/eval/min_prelude/aggregates.carbon b/toolchain/check/testdata/eval/min_prelude/aggregates.carbon new file mode 100644 index 000000000000..1bbbdd1cb49d --- /dev/null +++ b/toolchain/check/testdata/eval/min_prelude/aggregates.carbon @@ -0,0 +1,597 @@ +// 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 +// +// EXTRA-ARGS: --dump-sem-ir-ranges=only +// INCLUDE-FILE: toolchain/testing/min_prelude/int.carbon +// +// AUTOUPDATE +// TIP: To test this file alone, run: +// TIP: bazel test //toolchain/testing:file_test --test_arg=--file_tests=toolchain/check/testdata/eval/min_prelude/aggregates.carbon +// TIP: To dump output, run: +// TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/eval/min_prelude/aggregates.carbon + +// --- basics.carbon +library "[[@TEST_NAME]]"; + +//@dump-sem-ir-begin +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: array(i32, 1) = (0,) as array(i32, (5, 7, 1, 9).2); + +var struct_access: array(i32, 1) = (0,) as array(i32, {.a = 3, .b = 1}.b); +//@dump-sem-ir-end + +// --- fail_todo_array_temporary.carbon +library "[[@TEST_NAME]]"; + +// TODO: This creates an array temporary, which we don't yet support evaluating. +//@dump-sem-ir-begin +// CHECK:STDERR: fail_todo_array_temporary.carbon:[[@LINE+4]]:53: error: array bound is not a constant [InvalidArrayExpr] +// CHECK:STDERR: var array_index: array(i32, 1) = (0,) as array(i32, ((5, 7, 1, 9) as array(i32, 4))[2]); +// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// CHECK:STDERR: +var array_index: array(i32, 1) = (0,) as array(i32, ((5, 7, 1, 9) as array(i32, 4))[2]); +//@dump-sem-ir-end + +// --- symbolic.carbon +library "[[@TEST_NAME]]"; + +// Check that we propagate the `symbolic` tag through evaluations. +fn F(T:! type) { + //@dump-sem-ir-begin + var u: (T*, const T); + var v: {.a: T}; + var w: array(T, 5); + //@dump-sem-ir-end +} + +fn G(N:! i32) { + //@dump-sem-ir-begin + var k: array(i32, N); + //@dump-sem-ir-end +} + +// CHECK:STDOUT: --- basics.carbon +// CHECK:STDOUT: +// CHECK:STDOUT: constants { +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete] +// CHECK:STDOUT: %tuple.type.24b: type = tuple_type (type, type) [concrete] +// CHECK:STDOUT: %tuple.type.d07: type = tuple_type (%i32, %i32) [concrete] +// CHECK:STDOUT: %pattern_type.511: type = pattern_type %tuple.type.d07 [concrete] +// CHECK:STDOUT: %int_1.5b8: Core.IntLiteral = int_value 1 [concrete] +// CHECK:STDOUT: %int_2.ecc: Core.IntLiteral = int_value 2 [concrete] +// CHECK:STDOUT: %tuple.type.f94: type = tuple_type (Core.IntLiteral, Core.IntLiteral) [concrete] +// CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] +// CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] +// CHECK:STDOUT: %To: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] +// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.2, @impl.4f9(%To) [symbolic] +// CHECK:STDOUT: %Convert.f06: %Convert.type.0f9 = struct_value () [symbolic] +// CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness imports.%ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] +// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %Convert.bound.ab5: = bound_method %int_1.5b8, %Convert.956 [concrete] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] +// CHECK:STDOUT: %bound_method.9a1: = bound_method %int_1.5b8, %Convert.specific_fn [concrete] +// CHECK:STDOUT: %int_1.5d2: %i32 = int_value 1 [concrete] +// CHECK:STDOUT: %Convert.bound.ef9: = bound_method %int_2.ecc, %Convert.956 [concrete] +// CHECK:STDOUT: %bound_method.b92: = bound_method %int_2.ecc, %Convert.specific_fn [concrete] +// CHECK:STDOUT: %int_2.ef8: %i32 = int_value 2 [concrete] +// CHECK:STDOUT: %tuple.21c: %tuple.type.d07 = tuple_value (%int_1.5d2, %int_2.ef8) [concrete] +// CHECK:STDOUT: %tuple.elem0: ref %i32 = tuple_access file.%tuple_copy.var, element0 [concrete] +// CHECK:STDOUT: %tuple.elem1: ref %i32 = tuple_access file.%tuple_copy.var, element1 [concrete] +// CHECK:STDOUT: %struct_type.a.b.c: type = struct_type {.a: %i32, .b: %i32, .c: %i32} [concrete] +// CHECK:STDOUT: %pattern_type.8ae: type = pattern_type %struct_type.a.b.c [concrete] +// CHECK:STDOUT: %int_3.1ba: Core.IntLiteral = int_value 3 [concrete] +// CHECK:STDOUT: %struct_type.c.b.a: type = struct_type {.c: Core.IntLiteral, .b: Core.IntLiteral, .a: Core.IntLiteral} [concrete] +// CHECK:STDOUT: %struct_type.b.a.c: type = struct_type {.b: %i32, .a: %i32, .c: %i32} [concrete] +// CHECK:STDOUT: %Convert.bound.b30: = bound_method %int_3.1ba, %Convert.956 [concrete] +// CHECK:STDOUT: %bound_method.047: = bound_method %int_3.1ba, %Convert.specific_fn [concrete] +// CHECK:STDOUT: %int_3.822: %i32 = int_value 3 [concrete] +// CHECK:STDOUT: %struct.21d: %struct_type.b.a.c = struct_value (%int_2.ef8, %int_1.5d2, %int_3.822) [concrete] +// CHECK:STDOUT: %.91e: ref %i32 = struct_access file.%struct_copy.var, element1 [concrete] +// CHECK:STDOUT: %.657: ref %i32 = struct_access file.%struct_copy.var, element0 [concrete] +// CHECK:STDOUT: %.8fb: ref %i32 = struct_access file.%struct_copy.var, element2 [concrete] +// CHECK:STDOUT: %struct.cff: %struct_type.a.b.c = struct_value (%int_1.5d2, %int_2.ef8, %int_3.822) [concrete] +// CHECK:STDOUT: %array_type: type = array_type %int_1.5b8, %i32 [concrete] +// CHECK:STDOUT: %pattern_type.a98: type = pattern_type %array_type [concrete] +// CHECK:STDOUT: %int_0.5c6: Core.IntLiteral = int_value 0 [concrete] +// CHECK:STDOUT: %tuple.type.985: type = tuple_type (Core.IntLiteral) [concrete] +// CHECK:STDOUT: %int_5: Core.IntLiteral = int_value 5 [concrete] +// CHECK:STDOUT: %int_7: Core.IntLiteral = int_value 7 [concrete] +// CHECK:STDOUT: %int_9: Core.IntLiteral = int_value 9 [concrete] +// CHECK:STDOUT: %tuple.type.d46: type = tuple_type (Core.IntLiteral, Core.IntLiteral, Core.IntLiteral, Core.IntLiteral) [concrete] +// CHECK:STDOUT: %tuple.869: %tuple.type.d46 = tuple_value (%int_5, %int_7, %int_1.5b8, %int_9) [concrete] +// CHECK:STDOUT: %Convert.bound.d04: = bound_method %int_0.5c6, %Convert.956 [concrete] +// CHECK:STDOUT: %bound_method.b6e: = bound_method %int_0.5c6, %Convert.specific_fn [concrete] +// CHECK:STDOUT: %int_0.6a9: %i32 = int_value 0 [concrete] +// CHECK:STDOUT: %array: %array_type = tuple_value (%int_0.6a9) [concrete] +// CHECK:STDOUT: %struct_type.a.b: type = struct_type {.a: Core.IntLiteral, .b: Core.IntLiteral} [concrete] +// CHECK:STDOUT: %struct.a81: %struct_type.a.b = struct_value (%int_3.1ba, %int_1.5b8) [concrete] +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: imports { +// CHECK:STDOUT: %Core.import_ref.a5b: @impl.4f9.%Convert.type (%Convert.type.0f9) = import_ref Core//prelude, loc28_39, loaded [symbolic = @impl.4f9.%Convert (constants.%Convert.f06)] +// CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (%Core.import_ref.a5b), @impl.4f9 [concrete] +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: file { +// CHECK:STDOUT: name_binding_decl { +// CHECK:STDOUT: %tuple_copy.patt: %pattern_type.511 = binding_pattern tuple_copy [concrete] +// CHECK:STDOUT: %tuple_copy.var_patt: %pattern_type.511 = var_pattern %tuple_copy.patt [concrete] +// CHECK:STDOUT: } +// CHECK:STDOUT: %tuple_copy.var: ref %tuple.type.d07 = var %tuple_copy.var_patt [concrete] +// CHECK:STDOUT: %.loc4_26.1: type = splice_block %.loc4_26.3 [concrete = constants.%tuple.type.d07] { +// CHECK:STDOUT: %int_32.loc4_18: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] +// CHECK:STDOUT: %i32.loc4_18: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] +// CHECK:STDOUT: %int_32.loc4_23: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] +// CHECK:STDOUT: %i32.loc4_23: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] +// CHECK:STDOUT: %.loc4_26.2: %tuple.type.24b = tuple_literal (%i32.loc4_18, %i32.loc4_23) +// CHECK:STDOUT: %.loc4_26.3: type = converted %.loc4_26.2, constants.%tuple.type.d07 [concrete = constants.%tuple.type.d07] +// CHECK:STDOUT: } +// CHECK:STDOUT: %tuple_copy: ref %tuple.type.d07 = bind_name tuple_copy, %tuple_copy.var [concrete = %tuple_copy.var] +// CHECK:STDOUT: name_binding_decl { +// CHECK:STDOUT: %struct_copy.patt: %pattern_type.8ae = binding_pattern struct_copy [concrete] +// CHECK:STDOUT: %struct_copy.var_patt: %pattern_type.8ae = var_pattern %struct_copy.patt [concrete] +// CHECK:STDOUT: } +// CHECK:STDOUT: %struct_copy.var: ref %struct_type.a.b.c = var %struct_copy.var_patt [concrete] +// CHECK:STDOUT: %.loc6: type = splice_block %struct_type.a.b.c [concrete = constants.%struct_type.a.b.c] { +// CHECK:STDOUT: %int_32.loc6_23: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] +// CHECK:STDOUT: %i32.loc6_23: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] +// CHECK:STDOUT: %int_32.loc6_32: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] +// CHECK:STDOUT: %i32.loc6_32: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] +// CHECK:STDOUT: %int_32.loc6_41: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] +// CHECK:STDOUT: %i32.loc6_41: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] +// CHECK:STDOUT: %struct_type.a.b.c: type = struct_type {.a: %i32, .b: %i32, .c: %i32} [concrete = constants.%struct_type.a.b.c] +// CHECK:STDOUT: } +// CHECK:STDOUT: %struct_copy: ref %struct_type.a.b.c = bind_name struct_copy, %struct_copy.var [concrete = %struct_copy.var] +// CHECK:STDOUT: name_binding_decl { +// CHECK:STDOUT: %tuple_index.patt: %pattern_type.a98 = binding_pattern tuple_index [concrete] +// CHECK:STDOUT: %tuple_index.var_patt: %pattern_type.a98 = var_pattern %tuple_index.patt [concrete] +// CHECK:STDOUT: } +// CHECK:STDOUT: %tuple_index.var: ref %array_type = var %tuple_index.var_patt [concrete] +// CHECK:STDOUT: %.loc8: type = splice_block %array_type.loc8 [concrete = constants.%array_type] { +// CHECK:STDOUT: %int_32.loc8: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] +// CHECK:STDOUT: %i32.loc8: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] +// CHECK:STDOUT: %int_1.loc8: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] +// CHECK:STDOUT: %array_type.loc8: type = array_type %int_1.loc8, %i32.loc8 [concrete = constants.%array_type] +// CHECK:STDOUT: } +// CHECK:STDOUT: %tuple_index: ref %array_type = bind_name tuple_index, %tuple_index.var [concrete = %tuple_index.var] +// CHECK:STDOUT: name_binding_decl { +// CHECK:STDOUT: %struct_access.patt: %pattern_type.a98 = binding_pattern struct_access [concrete] +// CHECK:STDOUT: %struct_access.var_patt: %pattern_type.a98 = var_pattern %struct_access.patt [concrete] +// CHECK:STDOUT: } +// CHECK:STDOUT: %struct_access.var: ref %array_type = var %struct_access.var_patt [concrete] +// CHECK:STDOUT: %.loc10: type = splice_block %array_type.loc10 [concrete = constants.%array_type] { +// CHECK:STDOUT: %int_32.loc10: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] +// CHECK:STDOUT: %i32.loc10: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] +// CHECK:STDOUT: %int_1.loc10: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] +// CHECK:STDOUT: %array_type.loc10: type = array_type %int_1.loc10, %i32.loc10 [concrete = constants.%array_type] +// CHECK:STDOUT: } +// CHECK:STDOUT: %struct_access: ref %array_type = bind_name struct_access, %struct_access.var [concrete = %struct_access.var] +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: fn @__global_init() { +// CHECK:STDOUT: !entry: +// CHECK:STDOUT: %int_1.loc4: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] +// CHECK:STDOUT: %int_2.loc4: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc] +// CHECK:STDOUT: %.loc4_35.1: %tuple.type.f94 = tuple_literal (%int_1.loc4, %int_2.loc4) +// CHECK:STDOUT: %int_32.loc4_41: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] +// CHECK:STDOUT: %i32.loc4_41: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] +// CHECK:STDOUT: %int_32.loc4_46: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] +// CHECK:STDOUT: %i32.loc4_46: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] +// CHECK:STDOUT: %.loc4_49.1: %tuple.type.24b = tuple_literal (%i32.loc4_41, %i32.loc4_46) +// CHECK:STDOUT: %.loc4_49.2: type = converted %.loc4_49.1, constants.%tuple.type.d07 [concrete = constants.%tuple.type.d07] +// CHECK:STDOUT: %impl.elem0.loc4_35.1: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %bound_method.loc4_35.1: = bound_method %int_1.loc4, %impl.elem0.loc4_35.1 [concrete = constants.%Convert.bound.ab5] +// CHECK:STDOUT: %specific_fn.loc4_35.1: = specific_function %impl.elem0.loc4_35.1, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %bound_method.loc4_35.2: = bound_method %int_1.loc4, %specific_fn.loc4_35.1 [concrete = constants.%bound_method.9a1] +// CHECK:STDOUT: %int.convert_checked.loc4_35.1: init %i32 = call %bound_method.loc4_35.2(%int_1.loc4) [concrete = constants.%int_1.5d2] +// CHECK:STDOUT: %.loc4_35.2: %i32 = value_of_initializer %int.convert_checked.loc4_35.1 [concrete = constants.%int_1.5d2] +// CHECK:STDOUT: %.loc4_35.3: %i32 = converted %int_1.loc4, %.loc4_35.2 [concrete = constants.%int_1.5d2] +// CHECK:STDOUT: %impl.elem0.loc4_35.2: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %bound_method.loc4_35.3: = bound_method %int_2.loc4, %impl.elem0.loc4_35.2 [concrete = constants.%Convert.bound.ef9] +// CHECK:STDOUT: %specific_fn.loc4_35.2: = specific_function %impl.elem0.loc4_35.2, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %bound_method.loc4_35.4: = bound_method %int_2.loc4, %specific_fn.loc4_35.2 [concrete = constants.%bound_method.b92] +// CHECK:STDOUT: %int.convert_checked.loc4_35.2: init %i32 = call %bound_method.loc4_35.4(%int_2.loc4) [concrete = constants.%int_2.ef8] +// CHECK:STDOUT: %.loc4_35.4: %i32 = value_of_initializer %int.convert_checked.loc4_35.2 [concrete = constants.%int_2.ef8] +// CHECK:STDOUT: %.loc4_35.5: %i32 = converted %int_2.loc4, %.loc4_35.4 [concrete = constants.%int_2.ef8] +// CHECK:STDOUT: %tuple.loc4: %tuple.type.d07 = tuple_value (%.loc4_35.3, %.loc4_35.5) [concrete = constants.%tuple.21c] +// CHECK:STDOUT: %.loc4_37.1: %tuple.type.d07 = converted %.loc4_35.1, %tuple.loc4 [concrete = constants.%tuple.21c] +// CHECK:STDOUT: %tuple.elem0.loc4_37.1: %i32 = tuple_access %.loc4_37.1, element0 [concrete = constants.%int_1.5d2] +// CHECK:STDOUT: %tuple.elem0.loc4_37.2: ref %i32 = tuple_access file.%tuple_copy.var, element0 [concrete = constants.%tuple.elem0] +// CHECK:STDOUT: %.loc4_37.2: init %i32 = initialize_from %tuple.elem0.loc4_37.1 to %tuple.elem0.loc4_37.2 [concrete = constants.%int_1.5d2] +// CHECK:STDOUT: %tuple.elem1.loc4_37.1: %i32 = tuple_access %.loc4_37.1, element1 [concrete = constants.%int_2.ef8] +// CHECK:STDOUT: %tuple.elem1.loc4_37.2: ref %i32 = tuple_access file.%tuple_copy.var, element1 [concrete = constants.%tuple.elem1] +// CHECK:STDOUT: %.loc4_37.3: init %i32 = initialize_from %tuple.elem1.loc4_37.1 to %tuple.elem1.loc4_37.2 [concrete = constants.%int_2.ef8] +// CHECK:STDOUT: %.loc4_37.4: init %tuple.type.d07 = tuple_init (%.loc4_37.2, %.loc4_37.3) to file.%tuple_copy.var [concrete = constants.%tuple.21c] +// CHECK:STDOUT: %.loc4_1: init %tuple.type.d07 = converted %.loc4_37.1, %.loc4_37.4 [concrete = constants.%tuple.21c] +// CHECK:STDOUT: assign file.%tuple_copy.var, %.loc4_1 +// CHECK:STDOUT: %int_3.loc6: Core.IntLiteral = int_value 3 [concrete = constants.%int_3.1ba] +// CHECK:STDOUT: %int_2.loc6: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc] +// CHECK:STDOUT: %int_1.loc6: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] +// CHECK:STDOUT: %.loc6_71.1: %struct_type.c.b.a = struct_literal (%int_3.loc6, %int_2.loc6, %int_1.loc6) +// CHECK:STDOUT: %int_32.loc6_81: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] +// CHECK:STDOUT: %i32.loc6_81: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] +// CHECK:STDOUT: %int_32.loc6_90: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] +// CHECK:STDOUT: %i32.loc6_90: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] +// CHECK:STDOUT: %int_32.loc6_99: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] +// CHECK:STDOUT: %i32.loc6_99: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] +// CHECK:STDOUT: %struct_type.b.a.c: type = struct_type {.b: %i32, .a: %i32, .c: %i32} [concrete = constants.%struct_type.b.a.c] +// CHECK:STDOUT: %impl.elem0.loc6_71.1: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %bound_method.loc6_71.1: = bound_method %int_2.loc6, %impl.elem0.loc6_71.1 [concrete = constants.%Convert.bound.ef9] +// CHECK:STDOUT: %specific_fn.loc6_71.1: = specific_function %impl.elem0.loc6_71.1, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %bound_method.loc6_71.2: = bound_method %int_2.loc6, %specific_fn.loc6_71.1 [concrete = constants.%bound_method.b92] +// CHECK:STDOUT: %int.convert_checked.loc6_71.1: init %i32 = call %bound_method.loc6_71.2(%int_2.loc6) [concrete = constants.%int_2.ef8] +// CHECK:STDOUT: %.loc6_71.2: %i32 = value_of_initializer %int.convert_checked.loc6_71.1 [concrete = constants.%int_2.ef8] +// CHECK:STDOUT: %.loc6_71.3: %i32 = converted %int_2.loc6, %.loc6_71.2 [concrete = constants.%int_2.ef8] +// CHECK:STDOUT: %impl.elem0.loc6_71.2: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %bound_method.loc6_71.3: = bound_method %int_1.loc6, %impl.elem0.loc6_71.2 [concrete = constants.%Convert.bound.ab5] +// CHECK:STDOUT: %specific_fn.loc6_71.2: = specific_function %impl.elem0.loc6_71.2, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %bound_method.loc6_71.4: = bound_method %int_1.loc6, %specific_fn.loc6_71.2 [concrete = constants.%bound_method.9a1] +// CHECK:STDOUT: %int.convert_checked.loc6_71.2: init %i32 = call %bound_method.loc6_71.4(%int_1.loc6) [concrete = constants.%int_1.5d2] +// CHECK:STDOUT: %.loc6_71.4: %i32 = value_of_initializer %int.convert_checked.loc6_71.2 [concrete = constants.%int_1.5d2] +// CHECK:STDOUT: %.loc6_71.5: %i32 = converted %int_1.loc6, %.loc6_71.4 [concrete = constants.%int_1.5d2] +// CHECK:STDOUT: %impl.elem0.loc6_71.3: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %bound_method.loc6_71.5: = bound_method %int_3.loc6, %impl.elem0.loc6_71.3 [concrete = constants.%Convert.bound.b30] +// CHECK:STDOUT: %specific_fn.loc6_71.3: = specific_function %impl.elem0.loc6_71.3, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %bound_method.loc6_71.6: = bound_method %int_3.loc6, %specific_fn.loc6_71.3 [concrete = constants.%bound_method.047] +// CHECK:STDOUT: %int.convert_checked.loc6_71.3: init %i32 = call %bound_method.loc6_71.6(%int_3.loc6) [concrete = constants.%int_3.822] +// CHECK:STDOUT: %.loc6_71.6: %i32 = value_of_initializer %int.convert_checked.loc6_71.3 [concrete = constants.%int_3.822] +// CHECK:STDOUT: %.loc6_71.7: %i32 = converted %int_3.loc6, %.loc6_71.6 [concrete = constants.%int_3.822] +// CHECK:STDOUT: %struct.loc6: %struct_type.b.a.c = struct_value (%.loc6_71.3, %.loc6_71.5, %.loc6_71.7) [concrete = constants.%struct.21d] +// CHECK:STDOUT: %.loc6_73.1: %struct_type.b.a.c = converted %.loc6_71.1, %struct.loc6 [concrete = constants.%struct.21d] +// CHECK:STDOUT: %.loc6_73.2: %i32 = struct_access %.loc6_73.1, element1 [concrete = constants.%int_1.5d2] +// CHECK:STDOUT: %.loc6_73.3: ref %i32 = struct_access file.%struct_copy.var, element1 [concrete = constants.%.91e] +// CHECK:STDOUT: %.loc6_73.4: init %i32 = initialize_from %.loc6_73.2 to %.loc6_73.3 [concrete = constants.%int_1.5d2] +// CHECK:STDOUT: %.loc6_73.5: %i32 = struct_access %.loc6_73.1, element0 [concrete = constants.%int_2.ef8] +// CHECK:STDOUT: %.loc6_73.6: ref %i32 = struct_access file.%struct_copy.var, element0 [concrete = constants.%.657] +// CHECK:STDOUT: %.loc6_73.7: init %i32 = initialize_from %.loc6_73.5 to %.loc6_73.6 [concrete = constants.%int_2.ef8] +// CHECK:STDOUT: %.loc6_73.8: %i32 = struct_access %.loc6_73.1, element2 [concrete = constants.%int_3.822] +// CHECK:STDOUT: %.loc6_73.9: ref %i32 = struct_access file.%struct_copy.var, element2 [concrete = constants.%.8fb] +// CHECK:STDOUT: %.loc6_73.10: init %i32 = initialize_from %.loc6_73.8 to %.loc6_73.9 [concrete = constants.%int_3.822] +// CHECK:STDOUT: %.loc6_73.11: init %struct_type.a.b.c = struct_init (%.loc6_73.4, %.loc6_73.7, %.loc6_73.10) to file.%struct_copy.var [concrete = constants.%struct.cff] +// CHECK:STDOUT: %.loc6_1: init %struct_type.a.b.c = converted %.loc6_73.1, %.loc6_73.11 [concrete = constants.%struct.cff] +// CHECK:STDOUT: assign file.%struct_copy.var, %.loc6_1 +// CHECK:STDOUT: %int_0.loc8_35: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] +// CHECK:STDOUT: %.loc8_37.1: %tuple.type.985 = tuple_literal (%int_0.loc8_35) +// CHECK:STDOUT: %int_32.loc8: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] +// CHECK:STDOUT: %i32.loc8: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] +// CHECK:STDOUT: %int_5: Core.IntLiteral = int_value 5 [concrete = constants.%int_5] +// CHECK:STDOUT: %int_7: Core.IntLiteral = int_value 7 [concrete = constants.%int_7] +// CHECK:STDOUT: %int_1.loc8: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] +// CHECK:STDOUT: %int_9: Core.IntLiteral = int_value 9 [concrete = constants.%int_9] +// CHECK:STDOUT: %.loc8_64.1: %tuple.type.d46 = tuple_literal (%int_5, %int_7, %int_1.loc8, %int_9) +// CHECK:STDOUT: %int_2.loc8: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc] +// CHECK:STDOUT: %tuple.loc8: %tuple.type.d46 = tuple_value (%int_5, %int_7, %int_1.loc8, %int_9) [concrete = constants.%tuple.869] +// CHECK:STDOUT: %.loc8_64.2: %tuple.type.d46 = converted %.loc8_64.1, %tuple.loc8 [concrete = constants.%tuple.869] +// CHECK:STDOUT: %tuple.elem2: Core.IntLiteral = tuple_access %.loc8_64.2, element2 [concrete = constants.%int_1.5b8] +// CHECK:STDOUT: %array_type.loc8: type = array_type %tuple.elem2, %i32.loc8 [concrete = constants.%array_type] +// CHECK:STDOUT: %impl.elem0.loc8: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %bound_method.loc8_37.1: = bound_method %int_0.loc8_35, %impl.elem0.loc8 [concrete = constants.%Convert.bound.d04] +// CHECK:STDOUT: %specific_fn.loc8: = specific_function %impl.elem0.loc8, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %bound_method.loc8_37.2: = bound_method %int_0.loc8_35, %specific_fn.loc8 [concrete = constants.%bound_method.b6e] +// CHECK:STDOUT: %int.convert_checked.loc8: init %i32 = call %bound_method.loc8_37.2(%int_0.loc8_35) [concrete = constants.%int_0.6a9] +// CHECK:STDOUT: %.loc8_37.2: init %i32 = converted %int_0.loc8_35, %int.convert_checked.loc8 [concrete = constants.%int_0.6a9] +// CHECK:STDOUT: %.loc8_1: ref %array_type = splice_block file.%tuple_index.var [concrete = file.%tuple_index.var] {} +// CHECK:STDOUT: %int_0.loc8_37: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] +// CHECK:STDOUT: %.loc8_37.3: ref %i32 = array_index %.loc8_1, %int_0.loc8_37 +// CHECK:STDOUT: %.loc8_37.4: init %i32 = initialize_from %.loc8_37.2 to %.loc8_37.3 [concrete = constants.%int_0.6a9] +// CHECK:STDOUT: %.loc8_37.5: init %array_type = array_init (%.loc8_37.4) to %.loc8_1 [concrete = constants.%array] +// CHECK:STDOUT: %.loc8_39: init %array_type = converted %.loc8_37.1, %.loc8_37.5 [concrete = constants.%array] +// CHECK:STDOUT: assign file.%tuple_index.var, %.loc8_39 +// CHECK:STDOUT: %int_0.loc10_37: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] +// CHECK:STDOUT: %.loc10_39.1: %tuple.type.985 = tuple_literal (%int_0.loc10_37) +// CHECK:STDOUT: %int_32.loc10: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] +// CHECK:STDOUT: %i32.loc10: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] +// CHECK:STDOUT: %int_3.loc10: Core.IntLiteral = int_value 3 [concrete = constants.%int_3.1ba] +// CHECK:STDOUT: %int_1.loc10: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] +// CHECK:STDOUT: %.loc10_70.1: %struct_type.a.b = struct_literal (%int_3.loc10, %int_1.loc10) +// CHECK:STDOUT: %struct.loc10: %struct_type.a.b = struct_value (%int_3.loc10, %int_1.loc10) [concrete = constants.%struct.a81] +// CHECK:STDOUT: %.loc10_70.2: %struct_type.a.b = converted %.loc10_70.1, %struct.loc10 [concrete = constants.%struct.a81] +// CHECK:STDOUT: %.loc10_71: Core.IntLiteral = struct_access %.loc10_70.2, element1 [concrete = constants.%int_1.5b8] +// CHECK:STDOUT: %array_type.loc10: type = array_type %.loc10_71, %i32.loc10 [concrete = constants.%array_type] +// CHECK:STDOUT: %impl.elem0.loc10: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %bound_method.loc10_39.1: = bound_method %int_0.loc10_37, %impl.elem0.loc10 [concrete = constants.%Convert.bound.d04] +// CHECK:STDOUT: %specific_fn.loc10: = specific_function %impl.elem0.loc10, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %bound_method.loc10_39.2: = bound_method %int_0.loc10_37, %specific_fn.loc10 [concrete = constants.%bound_method.b6e] +// CHECK:STDOUT: %int.convert_checked.loc10: init %i32 = call %bound_method.loc10_39.2(%int_0.loc10_37) [concrete = constants.%int_0.6a9] +// CHECK:STDOUT: %.loc10_39.2: init %i32 = converted %int_0.loc10_37, %int.convert_checked.loc10 [concrete = constants.%int_0.6a9] +// CHECK:STDOUT: %.loc10_1: ref %array_type = splice_block file.%struct_access.var [concrete = file.%struct_access.var] {} +// CHECK:STDOUT: %int_0.loc10_39: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] +// CHECK:STDOUT: %.loc10_39.3: ref %i32 = array_index %.loc10_1, %int_0.loc10_39 +// CHECK:STDOUT: %.loc10_39.4: init %i32 = initialize_from %.loc10_39.2 to %.loc10_39.3 [concrete = constants.%int_0.6a9] +// CHECK:STDOUT: %.loc10_39.5: init %array_type = array_init (%.loc10_39.4) to %.loc10_1 [concrete = constants.%array] +// CHECK:STDOUT: %.loc10_41: init %array_type = converted %.loc10_39.1, %.loc10_39.5 [concrete = constants.%array] +// CHECK:STDOUT: assign file.%struct_access.var, %.loc10_41 +// CHECK:STDOUT: +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: --- fail_todo_array_temporary.carbon +// CHECK:STDOUT: +// CHECK:STDOUT: constants { +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete] +// CHECK:STDOUT: %int_1.5b8: Core.IntLiteral = int_value 1 [concrete] +// CHECK:STDOUT: %array_type.0cb: type = array_type %int_1.5b8, %i32 [concrete] +// CHECK:STDOUT: %pattern_type.a98: type = pattern_type %array_type.0cb [concrete] +// CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete] +// CHECK:STDOUT: %tuple.type.985: type = tuple_type (Core.IntLiteral) [concrete] +// CHECK:STDOUT: %int_5.64b: Core.IntLiteral = int_value 5 [concrete] +// CHECK:STDOUT: %int_7.29f: Core.IntLiteral = int_value 7 [concrete] +// CHECK:STDOUT: %int_9.988: Core.IntLiteral = int_value 9 [concrete] +// CHECK:STDOUT: %tuple.type.d46: type = tuple_type (Core.IntLiteral, Core.IntLiteral, Core.IntLiteral, Core.IntLiteral) [concrete] +// CHECK:STDOUT: %int_4: Core.IntLiteral = int_value 4 [concrete] +// CHECK:STDOUT: %array_type.f32: type = array_type %int_4, %i32 [concrete] +// CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] +// CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] +// CHECK:STDOUT: %To: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] +// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.2, @impl.4f9(%To) [symbolic] +// CHECK:STDOUT: %Convert.f06: %Convert.type.0f9 = struct_value () [symbolic] +// CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness imports.%ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] +// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %Convert.bound.4e6: = bound_method %int_5.64b, %Convert.956 [concrete] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] +// CHECK:STDOUT: %bound_method.a25: = bound_method %int_5.64b, %Convert.specific_fn [concrete] +// CHECK:STDOUT: %int_5.0f6: %i32 = int_value 5 [concrete] +// CHECK:STDOUT: %Convert.bound.208: = bound_method %int_7.29f, %Convert.956 [concrete] +// CHECK:STDOUT: %bound_method.3bd: = bound_method %int_7.29f, %Convert.specific_fn [concrete] +// CHECK:STDOUT: %int_7.0b1: %i32 = int_value 7 [concrete] +// CHECK:STDOUT: %int_2.ecc: Core.IntLiteral = int_value 2 [concrete] +// CHECK:STDOUT: %Convert.bound.ab5: = bound_method %int_1.5b8, %Convert.956 [concrete] +// CHECK:STDOUT: %bound_method.9a1: = bound_method %int_1.5b8, %Convert.specific_fn [concrete] +// CHECK:STDOUT: %int_1.5d2: %i32 = int_value 1 [concrete] +// CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [concrete] +// CHECK:STDOUT: %Convert.bound.9e2: = bound_method %int_9.988, %Convert.956 [concrete] +// CHECK:STDOUT: %bound_method.cd3: = bound_method %int_9.988, %Convert.specific_fn [concrete] +// CHECK:STDOUT: %int_9.f88: %i32 = int_value 9 [concrete] +// CHECK:STDOUT: %array: %array_type.f32 = tuple_value (%int_5.0f6, %int_7.0b1, %int_1.5d2, %int_9.f88) [concrete] +// CHECK:STDOUT: %Convert.bound.ef9: = bound_method %int_2.ecc, %Convert.956 [concrete] +// CHECK:STDOUT: %bound_method.b92: = bound_method %int_2.ecc, %Convert.specific_fn [concrete] +// CHECK:STDOUT: %int_2.ef8: %i32 = int_value 2 [concrete] +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: imports { +// CHECK:STDOUT: %Core.import_ref.a5b: @impl.4f9.%Convert.type (%Convert.type.0f9) = import_ref Core//prelude, loc28_39, loaded [symbolic = @impl.4f9.%Convert (constants.%Convert.f06)] +// CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (%Core.import_ref.a5b), @impl.4f9 [concrete] +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: file { +// CHECK:STDOUT: name_binding_decl { +// CHECK:STDOUT: %array_index.patt: %pattern_type.a98 = binding_pattern array_index [concrete] +// CHECK:STDOUT: %array_index.var_patt: %pattern_type.a98 = var_pattern %array_index.patt [concrete] +// CHECK:STDOUT: } +// CHECK:STDOUT: %array_index.var: ref %array_type.0cb = var %array_index.var_patt [concrete] +// CHECK:STDOUT: %.loc9: type = splice_block %array_type [concrete = constants.%array_type.0cb] { +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] +// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] +// CHECK:STDOUT: %array_type: type = array_type %int_1, %i32 [concrete = constants.%array_type.0cb] +// CHECK:STDOUT: } +// CHECK:STDOUT: %array_index: ref %array_type.0cb = bind_name array_index, %array_index.var [concrete = %array_index.var] +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: fn @__global_init() { +// CHECK:STDOUT: !entry: +// CHECK:STDOUT: %int_0.loc9_35: Core.IntLiteral = int_value 0 [concrete = constants.%int_0] +// CHECK:STDOUT: %.loc9_37: %tuple.type.985 = tuple_literal (%int_0.loc9_35) +// CHECK:STDOUT: %int_32.loc9_48: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] +// CHECK:STDOUT: %i32.loc9_48: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] +// CHECK:STDOUT: %int_5: Core.IntLiteral = int_value 5 [concrete = constants.%int_5.64b] +// CHECK:STDOUT: %int_7: Core.IntLiteral = int_value 7 [concrete = constants.%int_7.29f] +// CHECK:STDOUT: %int_1.loc9_61: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] +// CHECK:STDOUT: %int_9: Core.IntLiteral = int_value 9 [concrete = constants.%int_9.988] +// CHECK:STDOUT: %.loc9_65.1: %tuple.type.d46 = tuple_literal (%int_5, %int_7, %int_1.loc9_61, %int_9) +// CHECK:STDOUT: %int_32.loc9_76: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] +// CHECK:STDOUT: %i32.loc9_76: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] +// CHECK:STDOUT: %int_4: Core.IntLiteral = int_value 4 [concrete = constants.%int_4] +// CHECK:STDOUT: %array_type: type = array_type %int_4, %i32.loc9_76 [concrete = constants.%array_type.f32] +// CHECK:STDOUT: %impl.elem0.loc9_65.1: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %bound_method.loc9_65.1: = bound_method %int_5, %impl.elem0.loc9_65.1 [concrete = constants.%Convert.bound.4e6] +// CHECK:STDOUT: %specific_fn.loc9_65.1: = specific_function %impl.elem0.loc9_65.1, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %bound_method.loc9_65.2: = bound_method %int_5, %specific_fn.loc9_65.1 [concrete = constants.%bound_method.a25] +// CHECK:STDOUT: %int.convert_checked.loc9_65.1: init %i32 = call %bound_method.loc9_65.2(%int_5) [concrete = constants.%int_5.0f6] +// CHECK:STDOUT: %.loc9_65.2: init %i32 = converted %int_5, %int.convert_checked.loc9_65.1 [concrete = constants.%int_5.0f6] +// CHECK:STDOUT: %.loc9_65.3: ref %array_type.f32 = temporary_storage +// CHECK:STDOUT: %int_0.loc9_65: Core.IntLiteral = int_value 0 [concrete = constants.%int_0] +// CHECK:STDOUT: %.loc9_65.4: ref %i32 = array_index %.loc9_65.3, %int_0.loc9_65 +// CHECK:STDOUT: %.loc9_65.5: init %i32 = initialize_from %.loc9_65.2 to %.loc9_65.4 [concrete = constants.%int_5.0f6] +// CHECK:STDOUT: %impl.elem0.loc9_65.2: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %bound_method.loc9_65.3: = bound_method %int_7, %impl.elem0.loc9_65.2 [concrete = constants.%Convert.bound.208] +// CHECK:STDOUT: %specific_fn.loc9_65.2: = specific_function %impl.elem0.loc9_65.2, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %bound_method.loc9_65.4: = bound_method %int_7, %specific_fn.loc9_65.2 [concrete = constants.%bound_method.3bd] +// CHECK:STDOUT: %int.convert_checked.loc9_65.2: init %i32 = call %bound_method.loc9_65.4(%int_7) [concrete = constants.%int_7.0b1] +// CHECK:STDOUT: %.loc9_65.6: init %i32 = converted %int_7, %int.convert_checked.loc9_65.2 [concrete = constants.%int_7.0b1] +// CHECK:STDOUT: %int_1.loc9_65: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] +// CHECK:STDOUT: %.loc9_65.7: ref %i32 = array_index %.loc9_65.3, %int_1.loc9_65 +// CHECK:STDOUT: %.loc9_65.8: init %i32 = initialize_from %.loc9_65.6 to %.loc9_65.7 [concrete = constants.%int_7.0b1] +// CHECK:STDOUT: %impl.elem0.loc9_65.3: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %bound_method.loc9_65.5: = bound_method %int_1.loc9_61, %impl.elem0.loc9_65.3 [concrete = constants.%Convert.bound.ab5] +// CHECK:STDOUT: %specific_fn.loc9_65.3: = specific_function %impl.elem0.loc9_65.3, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %bound_method.loc9_65.6: = bound_method %int_1.loc9_61, %specific_fn.loc9_65.3 [concrete = constants.%bound_method.9a1] +// CHECK:STDOUT: %int.convert_checked.loc9_65.3: init %i32 = call %bound_method.loc9_65.6(%int_1.loc9_61) [concrete = constants.%int_1.5d2] +// CHECK:STDOUT: %.loc9_65.9: init %i32 = converted %int_1.loc9_61, %int.convert_checked.loc9_65.3 [concrete = constants.%int_1.5d2] +// CHECK:STDOUT: %int_2.loc9_65: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc] +// CHECK:STDOUT: %.loc9_65.10: ref %i32 = array_index %.loc9_65.3, %int_2.loc9_65 +// CHECK:STDOUT: %.loc9_65.11: init %i32 = initialize_from %.loc9_65.9 to %.loc9_65.10 [concrete = constants.%int_1.5d2] +// CHECK:STDOUT: %impl.elem0.loc9_65.4: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %bound_method.loc9_65.7: = bound_method %int_9, %impl.elem0.loc9_65.4 [concrete = constants.%Convert.bound.9e2] +// CHECK:STDOUT: %specific_fn.loc9_65.4: = specific_function %impl.elem0.loc9_65.4, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %bound_method.loc9_65.8: = bound_method %int_9, %specific_fn.loc9_65.4 [concrete = constants.%bound_method.cd3] +// CHECK:STDOUT: %int.convert_checked.loc9_65.4: init %i32 = call %bound_method.loc9_65.8(%int_9) [concrete = constants.%int_9.f88] +// CHECK:STDOUT: %.loc9_65.12: init %i32 = converted %int_9, %int.convert_checked.loc9_65.4 [concrete = constants.%int_9.f88] +// CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [concrete = constants.%int_3] +// CHECK:STDOUT: %.loc9_65.13: ref %i32 = array_index %.loc9_65.3, %int_3 +// CHECK:STDOUT: %.loc9_65.14: init %i32 = initialize_from %.loc9_65.12 to %.loc9_65.13 [concrete = constants.%int_9.f88] +// CHECK:STDOUT: %.loc9_65.15: init %array_type.f32 = array_init (%.loc9_65.5, %.loc9_65.8, %.loc9_65.11, %.loc9_65.14) to %.loc9_65.3 [concrete = constants.%array] +// CHECK:STDOUT: %.loc9_67.1: init %array_type.f32 = converted %.loc9_65.1, %.loc9_65.15 [concrete = constants.%array] +// CHECK:STDOUT: %int_2.loc9_85: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc] +// CHECK:STDOUT: %.loc9_67.2: ref %array_type.f32 = temporary %.loc9_65.3, %.loc9_67.1 +// CHECK:STDOUT: %int_32.loc9_86: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] +// CHECK:STDOUT: %i32.loc9_86: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] +// CHECK:STDOUT: %impl.elem0.loc9_85: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %bound_method.loc9_85.1: = bound_method %int_2.loc9_85, %impl.elem0.loc9_85 [concrete = constants.%Convert.bound.ef9] +// CHECK:STDOUT: %specific_fn.loc9_85: = specific_function %impl.elem0.loc9_85, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %bound_method.loc9_85.2: = bound_method %int_2.loc9_85, %specific_fn.loc9_85 [concrete = constants.%bound_method.b92] +// CHECK:STDOUT: %int.convert_checked.loc9_85: init %i32 = call %bound_method.loc9_85.2(%int_2.loc9_85) [concrete = constants.%int_2.ef8] +// CHECK:STDOUT: %.loc9_85.1: %i32 = value_of_initializer %int.convert_checked.loc9_85 [concrete = constants.%int_2.ef8] +// CHECK:STDOUT: %.loc9_85.2: %i32 = converted %int_2.loc9_85, %.loc9_85.1 [concrete = constants.%int_2.ef8] +// CHECK:STDOUT: %.loc9_86.1: ref %i32 = array_index %.loc9_67.2, %.loc9_85.2 +// CHECK:STDOUT: %.loc9_86.2: %i32 = bind_value %.loc9_86.1 +// CHECK:STDOUT: assign file.%array_index.var, +// CHECK:STDOUT: +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: --- symbolic.carbon +// CHECK:STDOUT: +// CHECK:STDOUT: constants { +// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] +// CHECK:STDOUT: %ptr.79f: type = ptr_type %T [symbolic] +// CHECK:STDOUT: %const: type = const_type %T [symbolic] +// CHECK:STDOUT: %tuple.type.24b: type = tuple_type (type, type) [concrete] +// CHECK:STDOUT: %tuple.type.4f2: type = tuple_type (%ptr.79f, %const) [symbolic] +// CHECK:STDOUT: %require_complete.155: = require_complete_type %tuple.type.4f2 [symbolic] +// CHECK:STDOUT: %pattern_type.973: type = pattern_type %tuple.type.4f2 [symbolic] +// CHECK:STDOUT: %struct_type.a: type = struct_type {.a: %T} [symbolic] +// CHECK:STDOUT: %require_complete.28a: = require_complete_type %struct_type.a [symbolic] +// CHECK:STDOUT: %pattern_type.95a: type = pattern_type %struct_type.a [symbolic] +// CHECK:STDOUT: %int_5: Core.IntLiteral = int_value 5 [concrete] +// CHECK:STDOUT: %array_type.ec2: type = array_type %int_5, %T [symbolic] +// CHECK:STDOUT: %require_complete.fe1: = require_complete_type %array_type.ec2 [symbolic] +// CHECK:STDOUT: %pattern_type.035: type = pattern_type %array_type.ec2 [symbolic] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete] +// CHECK:STDOUT: %N.51e: %i32 = bind_symbolic_name N, 0 [symbolic] +// CHECK:STDOUT: %ImplicitAs.type.2fd: type = facet_type <@ImplicitAs, @ImplicitAs(Core.IntLiteral)> [concrete] +// CHECK:STDOUT: %Convert.type.71e: type = fn_type @Convert.1, @ImplicitAs(Core.IntLiteral) [concrete] +// CHECK:STDOUT: %From: Core.IntLiteral = bind_symbolic_name From, 0 [symbolic] +// CHECK:STDOUT: %Convert.type.708: type = fn_type @Convert.3, @impl.971(%From) [symbolic] +// CHECK:STDOUT: %Convert.c68: %Convert.type.708 = struct_value () [symbolic] +// CHECK:STDOUT: %ImplicitAs.impl_witness.a11: = impl_witness imports.%ImplicitAs.impl_witness_table.1d9, @impl.971(%int_32) [concrete] +// CHECK:STDOUT: %Convert.type.4ad: type = fn_type @Convert.3, @impl.971(%int_32) [concrete] +// CHECK:STDOUT: %Convert.960: %Convert.type.4ad = struct_value () [concrete] +// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.2fd = facet_value %i32, (%ImplicitAs.impl_witness.a11) [concrete] +// CHECK:STDOUT: %.0ea: type = fn_type_with_self_type %Convert.type.71e, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %Convert.bound: = bound_method %N.51e, %Convert.960 [symbolic] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.960, @Convert.3(%int_32) [concrete] +// CHECK:STDOUT: %bound_method: = bound_method %N.51e, %Convert.specific_fn [symbolic] +// CHECK:STDOUT: %int.convert_checked: init Core.IntLiteral = call %bound_method(%N.51e) [symbolic] +// CHECK:STDOUT: %array_type.c7c: type = array_type %int.convert_checked, %i32 [symbolic] +// CHECK:STDOUT: %require_complete.7cb: = require_complete_type %array_type.c7c [symbolic] +// CHECK:STDOUT: %pattern_type.ccc: type = pattern_type %array_type.c7c [symbolic] +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: imports { +// CHECK:STDOUT: %Core.import_ref.85c: @impl.971.%Convert.type (%Convert.type.708) = import_ref Core//prelude, loc32_44, loaded [symbolic = @impl.971.%Convert (constants.%Convert.c68)] +// CHECK:STDOUT: %ImplicitAs.impl_witness_table.1d9 = impl_witness_table (%Core.import_ref.85c), @impl.971 [concrete] +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: generic fn @F(%T.loc4_6.1: type) { +// CHECK:STDOUT: +// CHECK:STDOUT: +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %ptr.loc6_12.2: type = ptr_type %T.loc4_6.2 [symbolic = %ptr.loc6_12.2 (constants.%ptr.79f)] +// CHECK:STDOUT: %const.loc6_15.2: type = const_type %T.loc4_6.2 [symbolic = %const.loc6_15.2 (constants.%const)] +// CHECK:STDOUT: %tuple.type: type = tuple_type (%ptr.loc6_12.2, %const.loc6_15.2) [symbolic = %tuple.type (constants.%tuple.type.4f2)] +// CHECK:STDOUT: %require_complete.loc6: = require_complete_type %tuple.type [symbolic = %require_complete.loc6 (constants.%require_complete.155)] +// CHECK:STDOUT: %pattern_type.loc6: type = pattern_type %tuple.type [symbolic = %pattern_type.loc6 (constants.%pattern_type.973)] +// CHECK:STDOUT: %struct_type.a.loc7_16.2: type = struct_type {.a: @F.%T.loc4_6.2 (%T)} [symbolic = %struct_type.a.loc7_16.2 (constants.%struct_type.a)] +// CHECK:STDOUT: %require_complete.loc7: = require_complete_type %struct_type.a.loc7_16.2 [symbolic = %require_complete.loc7 (constants.%require_complete.28a)] +// CHECK:STDOUT: %pattern_type.loc7: type = pattern_type %struct_type.a.loc7_16.2 [symbolic = %pattern_type.loc7 (constants.%pattern_type.95a)] +// CHECK:STDOUT: %array_type.loc8_20.2: type = array_type constants.%int_5, %T.loc4_6.2 [symbolic = %array_type.loc8_20.2 (constants.%array_type.ec2)] +// CHECK:STDOUT: %require_complete.loc8: = require_complete_type %array_type.loc8_20.2 [symbolic = %require_complete.loc8 (constants.%require_complete.fe1)] +// CHECK:STDOUT: %pattern_type.loc8: type = pattern_type %array_type.loc8_20.2 [symbolic = %pattern_type.loc8 (constants.%pattern_type.035)] +// CHECK:STDOUT: +// CHECK:STDOUT: fn() { +// CHECK:STDOUT: !entry: +// CHECK:STDOUT: name_binding_decl { +// CHECK:STDOUT: %u.patt: @F.%pattern_type.loc6 (%pattern_type.973) = binding_pattern u [concrete] +// CHECK:STDOUT: %u.var_patt: @F.%pattern_type.loc6 (%pattern_type.973) = var_pattern %u.patt [concrete] +// CHECK:STDOUT: } +// CHECK:STDOUT: %u.var: ref @F.%tuple.type (%tuple.type.4f2) = var %u.var_patt +// CHECK:STDOUT: %.loc6_22.1: type = splice_block %.loc6_22.3 [symbolic = %tuple.type (constants.%tuple.type.4f2)] { +// CHECK:STDOUT: %T.ref.loc6_11: type = name_ref T, %T.loc4_6.1 [symbolic = %T.loc4_6.2 (constants.%T)] +// CHECK:STDOUT: %ptr.loc6_12.1: type = ptr_type %T.ref.loc6_11 [symbolic = %ptr.loc6_12.2 (constants.%ptr.79f)] +// CHECK:STDOUT: %T.ref.loc6_21: type = name_ref T, %T.loc4_6.1 [symbolic = %T.loc4_6.2 (constants.%T)] +// CHECK:STDOUT: %const.loc6_15.1: type = const_type %T.ref.loc6_21 [symbolic = %const.loc6_15.2 (constants.%const)] +// CHECK:STDOUT: %.loc6_22.2: %tuple.type.24b = tuple_literal (%ptr.loc6_12.1, %const.loc6_15.1) +// CHECK:STDOUT: %.loc6_22.3: type = converted %.loc6_22.2, constants.%tuple.type.4f2 [symbolic = %tuple.type (constants.%tuple.type.4f2)] +// CHECK:STDOUT: } +// CHECK:STDOUT: %u: ref @F.%tuple.type (%tuple.type.4f2) = bind_name u, %u.var +// CHECK:STDOUT: name_binding_decl { +// CHECK:STDOUT: %v.patt: @F.%pattern_type.loc7 (%pattern_type.95a) = binding_pattern v [concrete] +// CHECK:STDOUT: %v.var_patt: @F.%pattern_type.loc7 (%pattern_type.95a) = var_pattern %v.patt [concrete] +// CHECK:STDOUT: } +// CHECK:STDOUT: %v.var: ref @F.%struct_type.a.loc7_16.2 (%struct_type.a) = var %v.var_patt +// CHECK:STDOUT: %.loc7: type = splice_block %struct_type.a.loc7_16.1 [symbolic = %struct_type.a.loc7_16.2 (constants.%struct_type.a)] { +// CHECK:STDOUT: %T.ref.loc7: type = name_ref T, %T.loc4_6.1 [symbolic = %T.loc4_6.2 (constants.%T)] +// CHECK:STDOUT: %struct_type.a.loc7_16.1: type = struct_type {.a: @F.%T.loc4_6.2 (%T)} [symbolic = %struct_type.a.loc7_16.2 (constants.%struct_type.a)] +// CHECK:STDOUT: } +// CHECK:STDOUT: %v: ref @F.%struct_type.a.loc7_16.2 (%struct_type.a) = bind_name v, %v.var +// CHECK:STDOUT: name_binding_decl { +// CHECK:STDOUT: %w.patt: @F.%pattern_type.loc8 (%pattern_type.035) = binding_pattern w [concrete] +// CHECK:STDOUT: %w.var_patt: @F.%pattern_type.loc8 (%pattern_type.035) = var_pattern %w.patt [concrete] +// CHECK:STDOUT: } +// CHECK:STDOUT: %w.var: ref @F.%array_type.loc8_20.2 (%array_type.ec2) = var %w.var_patt +// CHECK:STDOUT: %.loc8: type = splice_block %array_type.loc8_20.1 [symbolic = %array_type.loc8_20.2 (constants.%array_type.ec2)] { +// CHECK:STDOUT: %T.ref.loc8: type = name_ref T, %T.loc4_6.1 [symbolic = %T.loc4_6.2 (constants.%T)] +// CHECK:STDOUT: %int_5: Core.IntLiteral = int_value 5 [concrete = constants.%int_5] +// CHECK:STDOUT: %array_type.loc8_20.1: type = array_type %int_5, %T.ref.loc8 [symbolic = %array_type.loc8_20.2 (constants.%array_type.ec2)] +// CHECK:STDOUT: } +// CHECK:STDOUT: %w: ref @F.%array_type.loc8_20.2 (%array_type.ec2) = bind_name w, %w.var +// CHECK:STDOUT: +// CHECK:STDOUT: } +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: generic fn @G(%N.loc12_6.1: %i32) { +// CHECK:STDOUT: +// CHECK:STDOUT: +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Convert.bound: = bound_method %N.loc12_6.2, constants.%Convert.960 [symbolic = %Convert.bound (constants.%Convert.bound)] +// CHECK:STDOUT: %bound_method.loc14_21.3: = bound_method %N.loc12_6.2, constants.%Convert.specific_fn [symbolic = %bound_method.loc14_21.3 (constants.%bound_method)] +// CHECK:STDOUT: %int.convert_checked.loc14_21.2: init Core.IntLiteral = call %bound_method.loc14_21.3(%N.loc12_6.2) [symbolic = %int.convert_checked.loc14_21.2 (constants.%int.convert_checked)] +// CHECK:STDOUT: %array_type.loc14_22.2: type = array_type %int.convert_checked.loc14_21.2, constants.%i32 [symbolic = %array_type.loc14_22.2 (constants.%array_type.c7c)] +// CHECK:STDOUT: %require_complete: = require_complete_type %array_type.loc14_22.2 [symbolic = %require_complete (constants.%require_complete.7cb)] +// CHECK:STDOUT: %pattern_type: type = pattern_type %array_type.loc14_22.2 [symbolic = %pattern_type (constants.%pattern_type.ccc)] +// CHECK:STDOUT: +// CHECK:STDOUT: fn() { +// CHECK:STDOUT: !entry: +// CHECK:STDOUT: name_binding_decl { +// CHECK:STDOUT: %k.patt: @G.%pattern_type (%pattern_type.ccc) = binding_pattern k [concrete] +// CHECK:STDOUT: %k.var_patt: @G.%pattern_type (%pattern_type.ccc) = var_pattern %k.patt [concrete] +// CHECK:STDOUT: } +// CHECK:STDOUT: %k.var: ref @G.%array_type.loc14_22.2 (%array_type.c7c) = var %k.var_patt +// CHECK:STDOUT: %.loc14_22: type = splice_block %array_type.loc14_22.1 [symbolic = %array_type.loc14_22.2 (constants.%array_type.c7c)] { +// CHECK:STDOUT: %int_32.loc14: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] +// CHECK:STDOUT: %i32.loc14: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] +// CHECK:STDOUT: %N.ref: %i32 = name_ref N, %N.loc12_6.1 [symbolic = %N.loc12_6.2 (constants.%N.51e)] +// CHECK:STDOUT: %impl.elem0: %.0ea = impl_witness_access constants.%ImplicitAs.impl_witness.a11, element0 [concrete = constants.%Convert.960] +// CHECK:STDOUT: %bound_method.loc14_21.1: = bound_method %N.ref, %impl.elem0 [symbolic = %Convert.bound (constants.%Convert.bound)] +// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %bound_method.loc14_21.2: = bound_method %N.ref, %specific_fn [symbolic = %bound_method.loc14_21.3 (constants.%bound_method)] +// CHECK:STDOUT: %int.convert_checked.loc14_21.1: init Core.IntLiteral = call %bound_method.loc14_21.2(%N.ref) [symbolic = %int.convert_checked.loc14_21.2 (constants.%int.convert_checked)] +// CHECK:STDOUT: %.loc14_21.1: Core.IntLiteral = value_of_initializer %int.convert_checked.loc14_21.1 [symbolic = %int.convert_checked.loc14_21.2 (constants.%int.convert_checked)] +// CHECK:STDOUT: %.loc14_21.2: Core.IntLiteral = converted %N.ref, %.loc14_21.1 [symbolic = %int.convert_checked.loc14_21.2 (constants.%int.convert_checked)] +// CHECK:STDOUT: %array_type.loc14_22.1: type = array_type %.loc14_21.2, %i32.loc14 [symbolic = %array_type.loc14_22.2 (constants.%array_type.c7c)] +// CHECK:STDOUT: } +// CHECK:STDOUT: %k: ref @G.%array_type.loc14_22.2 (%array_type.c7c) = bind_name k, %k.var +// CHECK:STDOUT: +// CHECK:STDOUT: } +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @F(constants.%T) { +// CHECK:STDOUT: %T.loc4_6.2 => constants.%T +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @G(constants.%N.51e) { +// CHECK:STDOUT: %N.loc12_6.2 => constants.%N.51e +// CHECK:STDOUT: } +// CHECK:STDOUT: diff --git a/toolchain/check/testdata/eval/symbolic.carbon b/toolchain/check/testdata/eval/symbolic.carbon deleted file mode 100644 index 551e2e19ace5..000000000000 --- a/toolchain/check/testdata/eval/symbolic.carbon +++ /dev/null @@ -1,207 +0,0 @@ -// 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/symbolic.carbon -// TIP: To dump output, run: -// TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/eval/symbolic.carbon - -// Check that we propagate the `symbolic` tag through evaluations. -fn F(T:! type) { - var u: (T*, const T); - var v: {.a: T}; - var w: array(T, 5); -} - -fn G(N:! i32) { - var k: array(i32, N); -} - -// CHECK:STDOUT: --- symbolic.carbon -// CHECK:STDOUT: -// CHECK:STDOUT: constants { -// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] -// CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete] -// CHECK:STDOUT: %F.type: type = fn_type @F [concrete] -// CHECK:STDOUT: %F: %F.type = struct_value () [concrete] -// CHECK:STDOUT: %ptr.79f: type = ptr_type %T [symbolic] -// CHECK:STDOUT: %const: type = const_type %T [symbolic] -// CHECK:STDOUT: %tuple.type.24b: type = tuple_type (type, type) [concrete] -// CHECK:STDOUT: %tuple.type.4f2: type = tuple_type (%ptr.79f, %const) [symbolic] -// CHECK:STDOUT: %require_complete.155: = require_complete_type %tuple.type.4f2 [symbolic] -// CHECK:STDOUT: %pattern_type.973: type = pattern_type %tuple.type.4f2 [symbolic] -// CHECK:STDOUT: %struct_type.a: type = struct_type {.a: %T} [symbolic] -// CHECK:STDOUT: %require_complete.28a: = require_complete_type %struct_type.a [symbolic] -// CHECK:STDOUT: %pattern_type.95a: type = pattern_type %struct_type.a [symbolic] -// CHECK:STDOUT: %int_5: Core.IntLiteral = int_value 5 [concrete] -// CHECK:STDOUT: %array_type.ec2: type = array_type %int_5, %T [symbolic] -// CHECK:STDOUT: %require_complete.fe1: = require_complete_type %array_type.ec2 [symbolic] -// CHECK:STDOUT: %pattern_type.035: type = pattern_type %array_type.ec2 [symbolic] -// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete] -// CHECK:STDOUT: %Int.type: type = generic_class_type @Int [concrete] -// CHECK:STDOUT: %Int.generic: %Int.type = struct_value () [concrete] -// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete] -// CHECK:STDOUT: %N.51e: %i32 = bind_symbolic_name N, 0 [symbolic] -// CHECK:STDOUT: %pattern_type.7ce: type = pattern_type %i32 [concrete] -// CHECK:STDOUT: %G.type: type = fn_type @G [concrete] -// CHECK:STDOUT: %G: %G.type = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.type.cc7: type = generic_interface_type @ImplicitAs [concrete] -// CHECK:STDOUT: %ImplicitAs.generic: %ImplicitAs.type.cc7 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.type.2fd: type = facet_type <@ImplicitAs, @ImplicitAs(Core.IntLiteral)> [concrete] -// CHECK:STDOUT: %Convert.type.71e: type = fn_type @Convert.1, @ImplicitAs(Core.IntLiteral) [concrete] -// CHECK:STDOUT: %From: Core.IntLiteral = bind_symbolic_name From, 0 [symbolic] -// CHECK:STDOUT: %Convert.type.708: type = fn_type @Convert.3, @impl.971(%From) [symbolic] -// CHECK:STDOUT: %Convert.c68: %Convert.type.708 = struct_value () [symbolic] -// CHECK:STDOUT: %ImplicitAs.impl_witness.a11: = impl_witness imports.%ImplicitAs.impl_witness_table.1d9, @impl.971(%int_32) [concrete] -// CHECK:STDOUT: %Convert.type.4ad: type = fn_type @Convert.3, @impl.971(%int_32) [concrete] -// CHECK:STDOUT: %Convert.960: %Convert.type.4ad = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.2fd = facet_value %i32, (%ImplicitAs.impl_witness.a11) [concrete] -// CHECK:STDOUT: %.0ea: type = fn_type_with_self_type %Convert.type.71e, %ImplicitAs.facet [concrete] -// CHECK:STDOUT: %Convert.bound: = bound_method %N.51e, %Convert.960 [symbolic] -// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.960, @Convert.3(%int_32) [concrete] -// CHECK:STDOUT: %bound_method: = bound_method %N.51e, %Convert.specific_fn [symbolic] -// CHECK:STDOUT: %int.convert_checked: init Core.IntLiteral = call %bound_method(%N.51e) [symbolic] -// CHECK:STDOUT: %array_type.c7c: type = array_type %int.convert_checked, %i32 [symbolic] -// CHECK:STDOUT: %require_complete.7cb: = require_complete_type %array_type.c7c [symbolic] -// CHECK:STDOUT: %pattern_type.ccc: type = pattern_type %array_type.c7c [symbolic] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: imports { -// CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { -// CHECK:STDOUT: .Int = %Core.Int -// CHECK:STDOUT: .ImplicitAs = %Core.ImplicitAs -// CHECK:STDOUT: import Core//prelude -// CHECK:STDOUT: import Core//prelude/... -// CHECK:STDOUT: } -// CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/types/int, Int, loaded [concrete = constants.%Int.generic] -// CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.cc7 = import_ref Core//prelude/operators/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic] -// CHECK:STDOUT: %Core.import_ref.85c: @impl.971.%Convert.type (%Convert.type.708) = import_ref Core//prelude/types/int, loc23_44, loaded [symbolic = @impl.971.%Convert (constants.%Convert.c68)] -// CHECK:STDOUT: %ImplicitAs.impl_witness_table.1d9 = impl_witness_table (%Core.import_ref.85c), @impl.971 [concrete] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: file { -// CHECK:STDOUT: package: = namespace [concrete] { -// CHECK:STDOUT: .Core = imports.%Core -// CHECK:STDOUT: .F = %F.decl -// CHECK:STDOUT: .G = %G.decl -// CHECK:STDOUT: } -// CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] { -// CHECK:STDOUT: %T.patt: %pattern_type.98f = symbolic_binding_pattern T, 0 [concrete] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %T.loc12_6.1: type = bind_symbolic_name T, 0 [symbolic = %T.loc12_6.2 (constants.%T)] -// CHECK:STDOUT: } -// CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [concrete = constants.%G] { -// CHECK:STDOUT: %N.patt: %pattern_type.7ce = symbolic_binding_pattern N, 0 [concrete] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc18: type = splice_block %i32.loc18 [concrete = constants.%i32] { -// CHECK:STDOUT: %int_32.loc18: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] -// CHECK:STDOUT: %i32.loc18: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] -// CHECK:STDOUT: } -// CHECK:STDOUT: %N.loc18_6.1: %i32 = bind_symbolic_name N, 0 [symbolic = %N.loc18_6.2 (constants.%N.51e)] -// CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generic fn @F(%T.loc12_6.1: type) { -// CHECK:STDOUT: %T.loc12_6.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc12_6.2 (constants.%T)] -// CHECK:STDOUT: -// CHECK:STDOUT: !definition: -// CHECK:STDOUT: %ptr.loc13_12.2: type = ptr_type %T.loc12_6.2 [symbolic = %ptr.loc13_12.2 (constants.%ptr.79f)] -// CHECK:STDOUT: %const.loc13_15.2: type = const_type %T.loc12_6.2 [symbolic = %const.loc13_15.2 (constants.%const)] -// CHECK:STDOUT: %tuple.type: type = tuple_type (%ptr.loc13_12.2, %const.loc13_15.2) [symbolic = %tuple.type (constants.%tuple.type.4f2)] -// CHECK:STDOUT: %require_complete.loc13: = require_complete_type %tuple.type [symbolic = %require_complete.loc13 (constants.%require_complete.155)] -// CHECK:STDOUT: %pattern_type.loc13: type = pattern_type %tuple.type [symbolic = %pattern_type.loc13 (constants.%pattern_type.973)] -// CHECK:STDOUT: %struct_type.a.loc14_16.2: type = struct_type {.a: @F.%T.loc12_6.2 (%T)} [symbolic = %struct_type.a.loc14_16.2 (constants.%struct_type.a)] -// CHECK:STDOUT: %require_complete.loc14: = require_complete_type %struct_type.a.loc14_16.2 [symbolic = %require_complete.loc14 (constants.%require_complete.28a)] -// CHECK:STDOUT: %pattern_type.loc14: type = pattern_type %struct_type.a.loc14_16.2 [symbolic = %pattern_type.loc14 (constants.%pattern_type.95a)] -// CHECK:STDOUT: %array_type.loc15_20.2: type = array_type constants.%int_5, %T.loc12_6.2 [symbolic = %array_type.loc15_20.2 (constants.%array_type.ec2)] -// CHECK:STDOUT: %require_complete.loc15: = require_complete_type %array_type.loc15_20.2 [symbolic = %require_complete.loc15 (constants.%require_complete.fe1)] -// CHECK:STDOUT: %pattern_type.loc15: type = pattern_type %array_type.loc15_20.2 [symbolic = %pattern_type.loc15 (constants.%pattern_type.035)] -// CHECK:STDOUT: -// CHECK:STDOUT: fn() { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: name_binding_decl { -// CHECK:STDOUT: %u.patt: @F.%pattern_type.loc13 (%pattern_type.973) = binding_pattern u [concrete] -// CHECK:STDOUT: %u.var_patt: @F.%pattern_type.loc13 (%pattern_type.973) = var_pattern %u.patt [concrete] -// CHECK:STDOUT: } -// CHECK:STDOUT: %u.var: ref @F.%tuple.type (%tuple.type.4f2) = var %u.var_patt -// CHECK:STDOUT: %.loc13_22.1: type = splice_block %.loc13_22.3 [symbolic = %tuple.type (constants.%tuple.type.4f2)] { -// CHECK:STDOUT: %T.ref.loc13_11: type = name_ref T, %T.loc12_6.1 [symbolic = %T.loc12_6.2 (constants.%T)] -// CHECK:STDOUT: %ptr.loc13_12.1: type = ptr_type %T.ref.loc13_11 [symbolic = %ptr.loc13_12.2 (constants.%ptr.79f)] -// CHECK:STDOUT: %T.ref.loc13_21: type = name_ref T, %T.loc12_6.1 [symbolic = %T.loc12_6.2 (constants.%T)] -// CHECK:STDOUT: %const.loc13_15.1: type = const_type %T.ref.loc13_21 [symbolic = %const.loc13_15.2 (constants.%const)] -// CHECK:STDOUT: %.loc13_22.2: %tuple.type.24b = tuple_literal (%ptr.loc13_12.1, %const.loc13_15.1) -// CHECK:STDOUT: %.loc13_22.3: type = converted %.loc13_22.2, constants.%tuple.type.4f2 [symbolic = %tuple.type (constants.%tuple.type.4f2)] -// CHECK:STDOUT: } -// CHECK:STDOUT: %u: ref @F.%tuple.type (%tuple.type.4f2) = bind_name u, %u.var -// CHECK:STDOUT: name_binding_decl { -// CHECK:STDOUT: %v.patt: @F.%pattern_type.loc14 (%pattern_type.95a) = binding_pattern v [concrete] -// CHECK:STDOUT: %v.var_patt: @F.%pattern_type.loc14 (%pattern_type.95a) = var_pattern %v.patt [concrete] -// CHECK:STDOUT: } -// CHECK:STDOUT: %v.var: ref @F.%struct_type.a.loc14_16.2 (%struct_type.a) = var %v.var_patt -// CHECK:STDOUT: %.loc14: type = splice_block %struct_type.a.loc14_16.1 [symbolic = %struct_type.a.loc14_16.2 (constants.%struct_type.a)] { -// CHECK:STDOUT: %T.ref.loc14: type = name_ref T, %T.loc12_6.1 [symbolic = %T.loc12_6.2 (constants.%T)] -// CHECK:STDOUT: %struct_type.a.loc14_16.1: type = struct_type {.a: @F.%T.loc12_6.2 (%T)} [symbolic = %struct_type.a.loc14_16.2 (constants.%struct_type.a)] -// CHECK:STDOUT: } -// CHECK:STDOUT: %v: ref @F.%struct_type.a.loc14_16.2 (%struct_type.a) = bind_name v, %v.var -// CHECK:STDOUT: name_binding_decl { -// CHECK:STDOUT: %w.patt: @F.%pattern_type.loc15 (%pattern_type.035) = binding_pattern w [concrete] -// CHECK:STDOUT: %w.var_patt: @F.%pattern_type.loc15 (%pattern_type.035) = var_pattern %w.patt [concrete] -// CHECK:STDOUT: } -// CHECK:STDOUT: %w.var: ref @F.%array_type.loc15_20.2 (%array_type.ec2) = var %w.var_patt -// CHECK:STDOUT: %.loc15: type = splice_block %array_type.loc15_20.1 [symbolic = %array_type.loc15_20.2 (constants.%array_type.ec2)] { -// CHECK:STDOUT: %T.ref.loc15: type = name_ref T, %T.loc12_6.1 [symbolic = %T.loc12_6.2 (constants.%T)] -// CHECK:STDOUT: %int_5: Core.IntLiteral = int_value 5 [concrete = constants.%int_5] -// CHECK:STDOUT: %array_type.loc15_20.1: type = array_type %int_5, %T.ref.loc15 [symbolic = %array_type.loc15_20.2 (constants.%array_type.ec2)] -// CHECK:STDOUT: } -// CHECK:STDOUT: %w: ref @F.%array_type.loc15_20.2 (%array_type.ec2) = bind_name w, %w.var -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generic fn @G(%N.loc18_6.1: %i32) { -// CHECK:STDOUT: %N.loc18_6.2: %i32 = bind_symbolic_name N, 0 [symbolic = %N.loc18_6.2 (constants.%N.51e)] -// CHECK:STDOUT: -// CHECK:STDOUT: !definition: -// CHECK:STDOUT: %Convert.bound: = bound_method %N.loc18_6.2, constants.%Convert.960 [symbolic = %Convert.bound (constants.%Convert.bound)] -// CHECK:STDOUT: %bound_method.loc19_21.3: = bound_method %N.loc18_6.2, constants.%Convert.specific_fn [symbolic = %bound_method.loc19_21.3 (constants.%bound_method)] -// CHECK:STDOUT: %int.convert_checked.loc19_21.2: init Core.IntLiteral = call %bound_method.loc19_21.3(%N.loc18_6.2) [symbolic = %int.convert_checked.loc19_21.2 (constants.%int.convert_checked)] -// CHECK:STDOUT: %array_type.loc19_22.2: type = array_type %int.convert_checked.loc19_21.2, constants.%i32 [symbolic = %array_type.loc19_22.2 (constants.%array_type.c7c)] -// CHECK:STDOUT: %require_complete: = require_complete_type %array_type.loc19_22.2 [symbolic = %require_complete (constants.%require_complete.7cb)] -// CHECK:STDOUT: %pattern_type: type = pattern_type %array_type.loc19_22.2 [symbolic = %pattern_type (constants.%pattern_type.ccc)] -// CHECK:STDOUT: -// CHECK:STDOUT: fn() { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: name_binding_decl { -// CHECK:STDOUT: %k.patt: @G.%pattern_type (%pattern_type.ccc) = binding_pattern k [concrete] -// CHECK:STDOUT: %k.var_patt: @G.%pattern_type (%pattern_type.ccc) = var_pattern %k.patt [concrete] -// CHECK:STDOUT: } -// CHECK:STDOUT: %k.var: ref @G.%array_type.loc19_22.2 (%array_type.c7c) = var %k.var_patt -// CHECK:STDOUT: %.loc19_22: type = splice_block %array_type.loc19_22.1 [symbolic = %array_type.loc19_22.2 (constants.%array_type.c7c)] { -// CHECK:STDOUT: %int_32.loc19: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] -// CHECK:STDOUT: %i32.loc19: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] -// CHECK:STDOUT: %N.ref: %i32 = name_ref N, %N.loc18_6.1 [symbolic = %N.loc18_6.2 (constants.%N.51e)] -// CHECK:STDOUT: %impl.elem0: %.0ea = impl_witness_access constants.%ImplicitAs.impl_witness.a11, element0 [concrete = constants.%Convert.960] -// CHECK:STDOUT: %bound_method.loc19_21.1: = bound_method %N.ref, %impl.elem0 [symbolic = %Convert.bound (constants.%Convert.bound)] -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] -// CHECK:STDOUT: %bound_method.loc19_21.2: = bound_method %N.ref, %specific_fn [symbolic = %bound_method.loc19_21.3 (constants.%bound_method)] -// CHECK:STDOUT: %int.convert_checked.loc19_21.1: init Core.IntLiteral = call %bound_method.loc19_21.2(%N.ref) [symbolic = %int.convert_checked.loc19_21.2 (constants.%int.convert_checked)] -// CHECK:STDOUT: %.loc19_21.1: Core.IntLiteral = value_of_initializer %int.convert_checked.loc19_21.1 [symbolic = %int.convert_checked.loc19_21.2 (constants.%int.convert_checked)] -// CHECK:STDOUT: %.loc19_21.2: Core.IntLiteral = converted %N.ref, %.loc19_21.1 [symbolic = %int.convert_checked.loc19_21.2 (constants.%int.convert_checked)] -// CHECK:STDOUT: %array_type.loc19_22.1: type = array_type %.loc19_21.2, %i32.loc19 [symbolic = %array_type.loc19_22.2 (constants.%array_type.c7c)] -// CHECK:STDOUT: } -// CHECK:STDOUT: %k: ref @G.%array_type.loc19_22.2 (%array_type.c7c) = bind_name k, %k.var -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: specific @F(constants.%T) { -// CHECK:STDOUT: %T.loc12_6.2 => constants.%T -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: specific @G(constants.%N.51e) { -// CHECK:STDOUT: %N.loc18_6.2 => constants.%N.51e -// CHECK:STDOUT: } -// CHECK:STDOUT: