From 17411c5e78d16fb987db84ae7807b6c54f53f1e4 Mon Sep 17 00:00:00 2001 From: Richard Smith Date: Fri, 4 Oct 2024 16:06:24 -0700 Subject: [PATCH] Assign a name to `interface_type` instructions. (#4369) This matches what we do for `class_type` and `function_type`. --- .../testdata/array/fail_bound_overflow.carbon | 56 +-- .../testdata/array/fail_invalid_type.carbon | 56 +-- .../testdata/array/fail_type_mismatch.carbon | 94 ++--- .../testdata/as/adapter_conversion.carbon | 56 +-- .../testdata/as/fail_no_conversion.carbon | 58 +-- .../check/testdata/as/fail_not_type.carbon | 56 +-- toolchain/check/testdata/as/overloaded.carbon | 130 +++--- .../basics/fail_non_type_as_type.carbon | 56 +-- .../check/testdata/class/extend_adapt.carbon | 114 ++--- .../testdata/class/fail_adapt_bad_decl.carbon | 132 +++--- .../testdata/class/fail_addr_self.carbon | 56 +-- .../testdata/class/fail_base_bad_type.carbon | 388 +++++++++--------- .../class/fail_compound_type_mismatch.carbon | 58 +-- .../class/fail_derived_to_base.carbon | 102 ++--- .../check/testdata/class/fail_self.carbon | 56 +-- .../check/testdata/class/generic/call.carbon | 56 +-- .../testdata/class/generic/import.carbon | 56 +-- .../class/generic/member_access.carbon | 62 +-- .../check/testdata/class/init_adapt.carbon | 92 ++--- .../check/testdata/const/fail_collapse.carbon | 56 +-- .../testdata/function/builtin/method.carbon | 64 +-- .../no_prelude/call_from_operator.carbon | 122 +++--- .../function/call/fail_param_type.carbon | 56 +-- .../call/fail_return_type_mismatch.carbon | 56 +-- toolchain/check/testdata/impl/compound.carbon | 94 ++--- .../check/testdata/impl/declaration.carbon | 12 +- toolchain/check/testdata/impl/empty.carbon | 16 +- .../check/testdata/impl/extend_impl.carbon | 44 +- .../testdata/impl/fail_call_invalid.carbon | 28 +- .../impl/fail_extend_impl_forall.carbon | 54 +-- .../impl/fail_extend_impl_scope.carbon | 16 +- .../impl/fail_extend_impl_type_as.carbon | 32 +- ..._extend_partially_defined_interface.carbon | 22 +- .../fail_extend_undefined_interface.carbon | 12 +- .../testdata/impl/fail_impl_as_scope.carbon | 24 +- .../impl/fail_impl_bad_assoc_const.carbon | 18 +- .../impl/fail_impl_bad_assoc_fn.carbon | 252 ++++++------ .../impl/fail_impl_bad_interface.carbon | 56 +-- .../testdata/impl/fail_redefinition.carbon | 16 +- .../impl/fail_todo_impl_assoc_const.carbon | 28 +- toolchain/check/testdata/impl/impl_as.carbon | 34 +- .../check/testdata/impl/impl_forall.carbon | 24 +- .../check/testdata/impl/lookup/alias.carbon | 50 +-- .../lookup/fail_alias_impl_not_found.carbon | 36 +- .../lookup/fail_todo_undefined_impl.carbon | 36 +- .../check/testdata/impl/lookup/import.carbon | 66 +-- .../impl/lookup/instance_method.carbon | 40 +- .../impl/lookup/no_prelude/impl_forall.carbon | 194 ++++----- .../impl/lookup/no_prelude/import.carbon | 66 +-- .../testdata/impl/no_prelude/basic.carbon | 30 +- .../impl/no_prelude/fail_alias.carbon | 26 +- .../impl/no_prelude/fail_impl_bad_type.carbon | 20 +- .../no_prelude/generic_redeclaration.carbon | 274 ++++++------- .../impl/no_prelude/import_generic.carbon | 168 ++++---- .../impl/no_prelude/import_self.carbon | 54 +-- .../impl/no_prelude/interface_args.carbon | 386 ++++++++--------- .../no_definition_in_impl_file.carbon | 130 +++--- .../impl/no_prelude/self_in_class.carbon | 40 +- .../impl/no_prelude/self_in_signature.carbon | 190 ++++----- .../check/testdata/impl/redeclaration.carbon | 26 +- .../index/fail_array_non_int_indexing.carbon | 56 +-- .../index/fail_negative_indexing.carbon | 18 +- .../testdata/interface/assoc_const.carbon | 22 +- .../fail_assoc_const_bad_default.carbon | 78 ++-- .../fail_todo_assoc_const_default.carbon | 34 +- .../fail_todo_define_default_fn_inline.carbon | 26 +- ..._todo_define_default_fn_out_of_line.carbon | 64 +-- .../interface/no_prelude/as_type.carbon | 20 +- .../no_prelude/as_type_of_type.carbon | 28 +- .../no_prelude/assoc_const_in_generic.carbon | 56 +-- .../interface/no_prelude/basic.carbon | 28 +- .../interface/no_prelude/default_fn.carbon | 42 +- .../interface/no_prelude/export_name.carbon | 34 +- .../fail_add_member_outside_definition.carbon | 52 +-- .../fail_assoc_const_not_binding.carbon | 4 +- .../fail_assoc_const_not_constant.carbon | 14 +- .../fail_assoc_const_template.carbon | 4 +- .../fail_definition_imported.carbon | 16 +- .../no_prelude/fail_duplicate.carbon | 68 +-- .../fail_generic_redeclaration.carbon | 60 +-- .../no_prelude/fail_lookup_undefined.carbon | 36 +- .../no_prelude/fail_member_lookup.carbon | 32 +- .../no_prelude/fail_modifiers.carbon | 24 +- .../no_prelude/fail_redeclare_member.carbon | 24 +- .../no_prelude/fail_todo_facet_lookup.carbon | 54 +-- .../fail_todo_generic_default_fn.carbon | 66 +-- .../no_prelude/fail_todo_modifiers.carbon | 26 +- .../interface/no_prelude/generic.carbon | 200 ++++----- .../generic_binding_after_assoc_const.carbon | 32 +- .../no_prelude/generic_import.carbon | 78 ++-- .../no_prelude/generic_vs_params.carbon | 152 +++---- .../interface/no_prelude/import.carbon | 190 ++++----- .../interface/no_prelude/import_access.carbon | 72 ++-- .../no_prelude/import_interface_decl.carbon | 20 +- .../testdata/interface/no_prelude/self.carbon | 24 +- .../no_prelude/syntactic_merge.carbon | 194 ++++----- .../interface/todo_define_not_default.carbon | 50 +-- .../testdata/let/compile_time_bindings.carbon | 82 ++-- .../check/testdata/let/fail_generic.carbon | 76 ++-- .../builtin/fail_type_mismatch.carbon | 58 +-- .../fail_type_mismatch_assignment.carbon | 56 +-- .../builtin/fail_type_mismatch_once.carbon | 20 +- .../builtin/fail_unimplemented_op.carbon | 18 +- .../testdata/operators/overloaded/add.carbon | 96 ++--- .../operators/overloaded/bit_and.carbon | 96 ++--- .../overloaded/bit_complement.carbon | 30 +- .../operators/overloaded/bit_or.carbon | 96 ++--- .../operators/overloaded/bit_xor.carbon | 96 ++--- .../testdata/operators/overloaded/dec.carbon | 58 +-- .../testdata/operators/overloaded/div.carbon | 96 ++--- .../testdata/operators/overloaded/eq.carbon | 172 ++++---- .../overloaded/fail_assign_non_ref.carbon | 106 ++--- .../operators/overloaded/fail_no_impl.carbon | 88 ++-- .../overloaded/fail_no_impl_for_arg.carbon | 148 +++---- .../operators/overloaded/implicit_as.carbon | 130 +++--- .../testdata/operators/overloaded/inc.carbon | 58 +-- .../operators/overloaded/left_shift.carbon | 96 ++--- .../testdata/operators/overloaded/mod.carbon | 96 ++--- .../testdata/operators/overloaded/mul.carbon | 96 ++--- .../operators/overloaded/negate.carbon | 30 +- .../operators/overloaded/ordered.carbon | 126 +++--- .../operators/overloaded/right_shift.carbon | 96 ++--- .../testdata/operators/overloaded/sub.carbon | 96 ++--- .../pointer/fail_type_mismatch.carbon | 56 +-- .../testdata/return/fail_type_mismatch.carbon | 56 +-- .../testdata/struct/fail_type_assign.carbon | 56 +-- .../testdata/struct/fail_value_as_type.carbon | 58 +-- toolchain/check/testdata/struct/import.carbon | 56 +-- .../access/fail_negative_indexing.carbon | 18 +- .../tuple/access/fail_non_int_indexing.carbon | 56 +-- .../tuple/fail_element_type_mismatch.carbon | 56 +-- .../testdata/tuple/fail_type_assign.carbon | 56 +-- .../testdata/tuple/fail_value_as_type.carbon | 56 +-- toolchain/check/testdata/tuple/import.carbon | 56 +-- .../var/fail_storage_is_literal.carbon | 56 +-- .../testdata/where_expr/constraints.carbon | 308 +++++++------- .../where_expr/no_prelude/designator.carbon | 116 +++--- .../where_expr/no_prelude/non_generic.carbon | 40 +- .../testdata/while/fail_bad_condition.carbon | 56 +-- toolchain/sem_ir/inst_namer.cpp | 6 + 140 files changed, 5042 insertions(+), 5036 deletions(-) diff --git a/toolchain/check/testdata/array/fail_bound_overflow.carbon b/toolchain/check/testdata/array/fail_bound_overflow.carbon index a999ec0b412b7..4f2b59473f313 100644 --- a/toolchain/check/testdata/array/fail_bound_overflow.carbon +++ b/toolchain/check/testdata/array/fail_bound_overflow.carbon @@ -36,22 +36,22 @@ var b: [1; 39999999999999999993]; // CHECK:STDOUT: %.1: type = tuple_type () [template] // CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 1 [template] -// CHECK:STDOUT: %ImplicitAs.type: type = generic_interface_type @ImplicitAs [template] -// CHECK:STDOUT: %ImplicitAs: %ImplicitAs.type = struct_value () [template] +// CHECK:STDOUT: %ImplicitAs.type.1: type = generic_interface_type @ImplicitAs [template] +// CHECK:STDOUT: %ImplicitAs: %ImplicitAs.type.1 = struct_value () [template] // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic] -// CHECK:STDOUT: %.3: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic] -// CHECK:STDOUT: %Self.1: @ImplicitAs.%.1 (%.3) = bind_symbolic_name Self, 1 [symbolic] -// CHECK:STDOUT: %Self.2: %.3 = bind_symbolic_name Self, 1 [symbolic] +// CHECK:STDOUT: %ImplicitAs.type.2: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic] +// CHECK:STDOUT: %Self.1: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2) = bind_symbolic_name Self, 1 [symbolic] +// CHECK:STDOUT: %Self.2: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: %Convert.type.1: type = fn_type @Convert, @ImplicitAs(%Dest) [symbolic] // CHECK:STDOUT: %Convert.1: %Convert.type.1 = struct_value () [symbolic] -// CHECK:STDOUT: %.4: type = assoc_entity_type %.3, %Convert.type.1 [symbolic] -// CHECK:STDOUT: %.5: %.4 = assoc_entity element0, imports.%import_ref.6 [symbolic] -// CHECK:STDOUT: %.6: type = interface_type @ImplicitAs, @ImplicitAs(type) [template] +// CHECK:STDOUT: %.3: type = assoc_entity_type %ImplicitAs.type.2, %Convert.type.1 [symbolic] +// CHECK:STDOUT: %.4: %.3 = assoc_entity element0, imports.%import_ref.6 [symbolic] +// CHECK:STDOUT: %ImplicitAs.type.3: type = interface_type @ImplicitAs, @ImplicitAs(type) [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert, @ImplicitAs(type) [template] // CHECK:STDOUT: %Convert.2: %Convert.type.2 = struct_value () [template] -// CHECK:STDOUT: %.7: type = assoc_entity_type %.6, %Convert.type.2 [template] -// CHECK:STDOUT: %.8: %.7 = assoc_entity element0, imports.%import_ref.6 [template] -// CHECK:STDOUT: %.9: %.4 = assoc_entity element0, imports.%import_ref.7 [symbolic] +// CHECK:STDOUT: %.5: type = assoc_entity_type %ImplicitAs.type.3, %Convert.type.2 [template] +// CHECK:STDOUT: %.6: %.5 = assoc_entity element0, imports.%import_ref.6 [template] +// CHECK:STDOUT: %.7: %.3 = assoc_entity element0, imports.%import_ref.7 [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -68,9 +68,9 @@ var b: [1; 39999999999999999993]; // CHECK:STDOUT: import Core//prelude/types/bool // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref Core//prelude/types, inst+4, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.2: %ImplicitAs.type = import_ref Core//prelude/operators/as, inst+40, loaded [template = constants.%ImplicitAs] +// CHECK:STDOUT: %import_ref.2: %ImplicitAs.type.1 = import_ref Core//prelude/operators/as, inst+40, loaded [template = constants.%ImplicitAs] // CHECK:STDOUT: %import_ref.3 = import_ref Core//prelude/operators/as, inst+45, unloaded -// CHECK:STDOUT: %import_ref.4: @ImplicitAs.%.2 (%.4) = import_ref Core//prelude/operators/as, inst+63, loaded [symbolic = @ImplicitAs.%.3 (constants.%.9)] +// CHECK:STDOUT: %import_ref.4: @ImplicitAs.%.1 (%.3) = import_ref Core//prelude/operators/as, inst+63, loaded [symbolic = @ImplicitAs.%.2 (constants.%.7)] // CHECK:STDOUT: %import_ref.5 = import_ref Core//prelude/operators/as, inst+56, unloaded // CHECK:STDOUT: %import_ref.6 = import_ref Core//prelude/operators/as, inst+56, unloaded // CHECK:STDOUT: %import_ref.7 = import_ref Core//prelude/operators/as, inst+56, unloaded @@ -90,10 +90,10 @@ var b: [1; 39999999999999999993]; // CHECK:STDOUT: %a.var: ref = var a // CHECK:STDOUT: %a: ref = bind_name a, %a.var // CHECK:STDOUT: %.loc30_9.1: i32 = int_literal 1 [template = constants.%.2] -// CHECK:STDOUT: %.loc30_9.2: type = interface_type @ImplicitAs, @ImplicitAs(type) [template = constants.%.6] -// CHECK:STDOUT: %.loc30_9.3: %.7 = specific_constant imports.%import_ref.4, @ImplicitAs(type) [template = constants.%.8] -// CHECK:STDOUT: %Convert.ref: %.7 = name_ref Convert, %.loc30_9.3 [template = constants.%.8] -// CHECK:STDOUT: %.loc30_9.4: type = converted %.loc30_9.1, [template = ] +// CHECK:STDOUT: %ImplicitAs.type: type = interface_type @ImplicitAs, @ImplicitAs(type) [template = constants.%ImplicitAs.type.3] +// CHECK:STDOUT: %.loc30_9.2: %.5 = specific_constant imports.%import_ref.4, @ImplicitAs(type) [template = constants.%.6] +// CHECK:STDOUT: %Convert.ref: %.5 = name_ref Convert, %.loc30_9.2 [template = constants.%.6] +// CHECK:STDOUT: %.loc30_9.3: type = converted %.loc30_9.1, [template = ] // CHECK:STDOUT: %.loc30_32: type = array_type , [template = ] // CHECK:STDOUT: %b.var: ref = var b // CHECK:STDOUT: %b: ref = bind_name b, %b.var @@ -103,12 +103,12 @@ var b: [1; 39999999999999999993]; // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic = %Dest (constants.%Dest)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.1: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic = %.1 (constants.%.3)] -// CHECK:STDOUT: %Self: %.3 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] +// CHECK:STDOUT: %ImplicitAs.type: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.2)] +// CHECK:STDOUT: %Self: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] // CHECK:STDOUT: %Convert.type: type = fn_type @Convert, @ImplicitAs(%Dest) [symbolic = %Convert.type (constants.%Convert.type.1)] // CHECK:STDOUT: %Convert: @ImplicitAs.%Convert.type (%Convert.type.1) = struct_value () [symbolic = %Convert (constants.%Convert.1)] -// CHECK:STDOUT: %.2: type = assoc_entity_type @ImplicitAs.%.1 (%.3), @ImplicitAs.%Convert.type (%Convert.type.1) [symbolic = %.2 (constants.%.4)] -// CHECK:STDOUT: %.3: @ImplicitAs.%.2 (%.4) = assoc_entity element0, imports.%import_ref.6 [symbolic = %.3 (constants.%.5)] +// CHECK:STDOUT: %.1: type = assoc_entity_type @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2), @ImplicitAs.%Convert.type (%Convert.type.1) [symbolic = %.1 (constants.%.3)] +// CHECK:STDOUT: %.2: @ImplicitAs.%.1 (%.3) = assoc_entity element0, imports.%import_ref.6 [symbolic = %.2 (constants.%.4)] // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: !members: @@ -120,10 +120,10 @@ var b: [1; 39999999999999999993]; // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32"; // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @Convert(constants.%Dest: type, constants.%Self.1: @ImplicitAs.%.1 (%.3)) { +// CHECK:STDOUT: generic fn @Convert(constants.%Dest: type, constants.%Self.1: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2)) { // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic = %Dest (constants.%Dest)] -// CHECK:STDOUT: %.1: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic = %.1 (constants.%.3)] -// CHECK:STDOUT: %Self: %.3 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] +// CHECK:STDOUT: %ImplicitAs.type: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.2)] +// CHECK:STDOUT: %Self: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] // CHECK:STDOUT: // CHECK:STDOUT: fn[%self: @Convert.%Self (%Self.2)]() -> @Convert.%Dest (%Dest); // CHECK:STDOUT: } @@ -142,7 +142,7 @@ var b: [1; 39999999999999999993]; // CHECK:STDOUT: // CHECK:STDOUT: specific @Convert(constants.%Dest, constants.%Self.1) { // CHECK:STDOUT: %Dest => constants.%Dest -// CHECK:STDOUT: %.1 => constants.%.3 +// CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.2 // CHECK:STDOUT: %Self => constants.%Self.1 // CHECK:STDOUT: } // CHECK:STDOUT: @@ -150,11 +150,11 @@ var b: [1; 39999999999999999993]; // CHECK:STDOUT: %Dest => type // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.1 => constants.%.6 +// CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.3 // CHECK:STDOUT: %Self => constants.%Self.2 // CHECK:STDOUT: %Convert.type => constants.%Convert.type.2 // CHECK:STDOUT: %Convert => constants.%Convert.2 -// CHECK:STDOUT: %.2 => constants.%.7 -// CHECK:STDOUT: %.3 => constants.%.8 +// CHECK:STDOUT: %.1 => constants.%.5 +// CHECK:STDOUT: %.2 => constants.%.6 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/array/fail_invalid_type.carbon b/toolchain/check/testdata/array/fail_invalid_type.carbon index 4543f7524d70c..9088e63a542c1 100644 --- a/toolchain/check/testdata/array/fail_invalid_type.carbon +++ b/toolchain/check/testdata/array/fail_invalid_type.carbon @@ -20,23 +20,23 @@ var a: [1; 1]; // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %.1: i32 = int_literal 1 [template] -// CHECK:STDOUT: %ImplicitAs.type: type = generic_interface_type @ImplicitAs [template] +// CHECK:STDOUT: %ImplicitAs.type.1: type = generic_interface_type @ImplicitAs [template] // CHECK:STDOUT: %.2: type = tuple_type () [template] -// CHECK:STDOUT: %ImplicitAs: %ImplicitAs.type = struct_value () [template] +// CHECK:STDOUT: %ImplicitAs: %ImplicitAs.type.1 = struct_value () [template] // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic] -// CHECK:STDOUT: %.3: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic] -// CHECK:STDOUT: %Self.1: @ImplicitAs.%.1 (%.3) = bind_symbolic_name Self, 1 [symbolic] -// CHECK:STDOUT: %Self.2: %.3 = bind_symbolic_name Self, 1 [symbolic] +// CHECK:STDOUT: %ImplicitAs.type.2: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic] +// CHECK:STDOUT: %Self.1: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2) = bind_symbolic_name Self, 1 [symbolic] +// CHECK:STDOUT: %Self.2: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: %Convert.type.1: type = fn_type @Convert, @ImplicitAs(%Dest) [symbolic] // CHECK:STDOUT: %Convert.1: %Convert.type.1 = struct_value () [symbolic] -// CHECK:STDOUT: %.4: type = assoc_entity_type %.3, %Convert.type.1 [symbolic] -// CHECK:STDOUT: %.5: %.4 = assoc_entity element0, imports.%import_ref.5 [symbolic] -// CHECK:STDOUT: %.6: type = interface_type @ImplicitAs, @ImplicitAs(type) [template] +// CHECK:STDOUT: %.3: type = assoc_entity_type %ImplicitAs.type.2, %Convert.type.1 [symbolic] +// CHECK:STDOUT: %.4: %.3 = assoc_entity element0, imports.%import_ref.5 [symbolic] +// CHECK:STDOUT: %ImplicitAs.type.3: type = interface_type @ImplicitAs, @ImplicitAs(type) [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert, @ImplicitAs(type) [template] // CHECK:STDOUT: %Convert.2: %Convert.type.2 = struct_value () [template] -// CHECK:STDOUT: %.7: type = assoc_entity_type %.6, %Convert.type.2 [template] -// CHECK:STDOUT: %.8: %.7 = assoc_entity element0, imports.%import_ref.5 [template] -// CHECK:STDOUT: %.9: %.4 = assoc_entity element0, imports.%import_ref.6 [symbolic] +// CHECK:STDOUT: %.5: type = assoc_entity_type %ImplicitAs.type.3, %Convert.type.2 [template] +// CHECK:STDOUT: %.6: %.5 = assoc_entity element0, imports.%import_ref.5 [template] +// CHECK:STDOUT: %.7: %.3 = assoc_entity element0, imports.%import_ref.6 [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -51,9 +51,9 @@ var a: [1; 1]; // CHECK:STDOUT: import Core//prelude/operators/comparison // CHECK:STDOUT: import Core//prelude/types/bool // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.1: %ImplicitAs.type = import_ref Core//prelude/operators/as, inst+40, loaded [template = constants.%ImplicitAs] +// CHECK:STDOUT: %import_ref.1: %ImplicitAs.type.1 = import_ref Core//prelude/operators/as, inst+40, loaded [template = constants.%ImplicitAs] // CHECK:STDOUT: %import_ref.2 = import_ref Core//prelude/operators/as, inst+45, unloaded -// CHECK:STDOUT: %import_ref.3: @ImplicitAs.%.2 (%.4) = import_ref Core//prelude/operators/as, inst+63, loaded [symbolic = @ImplicitAs.%.3 (constants.%.9)] +// CHECK:STDOUT: %import_ref.3: @ImplicitAs.%.1 (%.3) = import_ref Core//prelude/operators/as, inst+63, loaded [symbolic = @ImplicitAs.%.2 (constants.%.7)] // CHECK:STDOUT: %import_ref.4 = import_ref Core//prelude/operators/as, inst+56, unloaded // CHECK:STDOUT: %import_ref.5 = import_ref Core//prelude/operators/as, inst+56, unloaded // CHECK:STDOUT: %import_ref.6 = import_ref Core//prelude/operators/as, inst+56, unloaded @@ -67,10 +67,10 @@ var a: [1; 1]; // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %.loc17_9.1: i32 = int_literal 1 [template = constants.%.1] // CHECK:STDOUT: %.loc17_12: i32 = int_literal 1 [template = constants.%.1] -// CHECK:STDOUT: %.loc17_9.2: type = interface_type @ImplicitAs, @ImplicitAs(type) [template = constants.%.6] -// CHECK:STDOUT: %.loc17_9.3: %.7 = specific_constant imports.%import_ref.3, @ImplicitAs(type) [template = constants.%.8] -// CHECK:STDOUT: %Convert.ref: %.7 = name_ref Convert, %.loc17_9.3 [template = constants.%.8] -// CHECK:STDOUT: %.loc17_9.4: type = converted %.loc17_9.1, [template = ] +// CHECK:STDOUT: %ImplicitAs.type: type = interface_type @ImplicitAs, @ImplicitAs(type) [template = constants.%ImplicitAs.type.3] +// CHECK:STDOUT: %.loc17_9.2: %.5 = specific_constant imports.%import_ref.3, @ImplicitAs(type) [template = constants.%.6] +// CHECK:STDOUT: %Convert.ref: %.5 = name_ref Convert, %.loc17_9.2 [template = constants.%.6] +// CHECK:STDOUT: %.loc17_9.3: type = converted %.loc17_9.1, [template = ] // CHECK:STDOUT: %.loc17_13: type = array_type %.loc17_12, [template = ] // CHECK:STDOUT: %a.var: ref = var a // CHECK:STDOUT: %a: ref = bind_name a, %a.var @@ -80,12 +80,12 @@ var a: [1; 1]; // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic = %Dest (constants.%Dest)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.1: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic = %.1 (constants.%.3)] -// CHECK:STDOUT: %Self: %.3 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] +// CHECK:STDOUT: %ImplicitAs.type: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.2)] +// CHECK:STDOUT: %Self: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] // CHECK:STDOUT: %Convert.type: type = fn_type @Convert, @ImplicitAs(%Dest) [symbolic = %Convert.type (constants.%Convert.type.1)] // CHECK:STDOUT: %Convert: @ImplicitAs.%Convert.type (%Convert.type.1) = struct_value () [symbolic = %Convert (constants.%Convert.1)] -// CHECK:STDOUT: %.2: type = assoc_entity_type @ImplicitAs.%.1 (%.3), @ImplicitAs.%Convert.type (%Convert.type.1) [symbolic = %.2 (constants.%.4)] -// CHECK:STDOUT: %.3: @ImplicitAs.%.2 (%.4) = assoc_entity element0, imports.%import_ref.5 [symbolic = %.3 (constants.%.5)] +// CHECK:STDOUT: %.1: type = assoc_entity_type @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2), @ImplicitAs.%Convert.type (%Convert.type.1) [symbolic = %.1 (constants.%.3)] +// CHECK:STDOUT: %.2: @ImplicitAs.%.1 (%.3) = assoc_entity element0, imports.%import_ref.5 [symbolic = %.2 (constants.%.4)] // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: !members: @@ -95,10 +95,10 @@ var a: [1; 1]; // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @Convert(constants.%Dest: type, constants.%Self.1: @ImplicitAs.%.1 (%.3)) { +// CHECK:STDOUT: generic fn @Convert(constants.%Dest: type, constants.%Self.1: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2)) { // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic = %Dest (constants.%Dest)] -// CHECK:STDOUT: %.1: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic = %.1 (constants.%.3)] -// CHECK:STDOUT: %Self: %.3 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] +// CHECK:STDOUT: %ImplicitAs.type: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.2)] +// CHECK:STDOUT: %Self: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] // CHECK:STDOUT: // CHECK:STDOUT: fn[%self: @Convert.%Self (%Self.2)]() -> @Convert.%Dest (%Dest); // CHECK:STDOUT: } @@ -117,7 +117,7 @@ var a: [1; 1]; // CHECK:STDOUT: // CHECK:STDOUT: specific @Convert(constants.%Dest, constants.%Self.1) { // CHECK:STDOUT: %Dest => constants.%Dest -// CHECK:STDOUT: %.1 => constants.%.3 +// CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.2 // CHECK:STDOUT: %Self => constants.%Self.1 // CHECK:STDOUT: } // CHECK:STDOUT: @@ -125,11 +125,11 @@ var a: [1; 1]; // CHECK:STDOUT: %Dest => type // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.1 => constants.%.6 +// CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.3 // CHECK:STDOUT: %Self => constants.%Self.2 // CHECK:STDOUT: %Convert.type => constants.%Convert.type.2 // CHECK:STDOUT: %Convert => constants.%Convert.2 -// CHECK:STDOUT: %.2 => constants.%.7 -// CHECK:STDOUT: %.3 => constants.%.8 +// CHECK:STDOUT: %.1 => constants.%.5 +// CHECK:STDOUT: %.2 => constants.%.6 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/array/fail_type_mismatch.carbon b/toolchain/check/testdata/array/fail_type_mismatch.carbon index be20d39b7b6a3..795af1a67cb91 100644 --- a/toolchain/check/testdata/array/fail_type_mismatch.carbon +++ b/toolchain/check/testdata/array/fail_type_mismatch.carbon @@ -54,29 +54,29 @@ var d: [i32; 3] = t2; // CHECK:STDOUT: %.8: String = string_literal "World" [template] // CHECK:STDOUT: %.9: type = tuple_type (i32, String, String) [template] // CHECK:STDOUT: %.10: i32 = int_literal 0 [template] -// CHECK:STDOUT: %ImplicitAs.type: type = generic_interface_type @ImplicitAs [template] -// CHECK:STDOUT: %ImplicitAs: %ImplicitAs.type = struct_value () [template] +// CHECK:STDOUT: %ImplicitAs.type.1: type = generic_interface_type @ImplicitAs [template] +// CHECK:STDOUT: %ImplicitAs: %ImplicitAs.type.1 = struct_value () [template] // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic] -// CHECK:STDOUT: %.11: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic] -// CHECK:STDOUT: %Self.1: @ImplicitAs.%.1 (%.11) = bind_symbolic_name Self, 1 [symbolic] -// CHECK:STDOUT: %Self.2: %.11 = bind_symbolic_name Self, 1 [symbolic] +// CHECK:STDOUT: %ImplicitAs.type.2: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic] +// CHECK:STDOUT: %Self.1: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2) = bind_symbolic_name Self, 1 [symbolic] +// CHECK:STDOUT: %Self.2: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: %Convert.type.1: type = fn_type @Convert, @ImplicitAs(%Dest) [symbolic] // CHECK:STDOUT: %Convert.1: %Convert.type.1 = struct_value () [symbolic] -// CHECK:STDOUT: %.12: type = assoc_entity_type %.11, %Convert.type.1 [symbolic] -// CHECK:STDOUT: %.13: %.12 = assoc_entity element0, imports.%import_ref.6 [symbolic] -// CHECK:STDOUT: %.14: type = interface_type @ImplicitAs, @ImplicitAs(i32) [template] +// CHECK:STDOUT: %.11: type = assoc_entity_type %ImplicitAs.type.2, %Convert.type.1 [symbolic] +// CHECK:STDOUT: %.12: %.11 = assoc_entity element0, imports.%import_ref.6 [symbolic] +// CHECK:STDOUT: %ImplicitAs.type.3: type = interface_type @ImplicitAs, @ImplicitAs(i32) [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert, @ImplicitAs(i32) [template] // CHECK:STDOUT: %Convert.2: %Convert.type.2 = struct_value () [template] -// CHECK:STDOUT: %.15: type = assoc_entity_type %.14, %Convert.type.2 [template] -// CHECK:STDOUT: %.16: %.15 = assoc_entity element0, imports.%import_ref.6 [template] -// CHECK:STDOUT: %.17: %.12 = assoc_entity element0, imports.%import_ref.7 [symbolic] -// CHECK:STDOUT: %.18: type = tuple_type (type, type, type) [template] -// CHECK:STDOUT: %.19: type = tuple_type (i32, %.6, %.6) [template] -// CHECK:STDOUT: %.20: type = ptr_type %.19 [template] -// CHECK:STDOUT: %.21: i32 = int_literal 2 [template] -// CHECK:STDOUT: %.22: type = tuple_type (i32, i32) [template] -// CHECK:STDOUT: %.23: type = tuple_type (type, type) [template] -// CHECK:STDOUT: %.24: type = ptr_type %.22 [template] +// CHECK:STDOUT: %.13: type = assoc_entity_type %ImplicitAs.type.3, %Convert.type.2 [template] +// CHECK:STDOUT: %.14: %.13 = assoc_entity element0, imports.%import_ref.6 [template] +// CHECK:STDOUT: %.15: %.11 = assoc_entity element0, imports.%import_ref.7 [symbolic] +// CHECK:STDOUT: %.16: type = tuple_type (type, type, type) [template] +// CHECK:STDOUT: %.17: type = tuple_type (i32, %.6, %.6) [template] +// CHECK:STDOUT: %.18: type = ptr_type %.17 [template] +// CHECK:STDOUT: %.19: i32 = int_literal 2 [template] +// CHECK:STDOUT: %.20: type = tuple_type (i32, i32) [template] +// CHECK:STDOUT: %.21: type = tuple_type (type, type) [template] +// CHECK:STDOUT: %.22: type = ptr_type %.20 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -93,9 +93,9 @@ var d: [i32; 3] = t2; // CHECK:STDOUT: import Core//prelude/types/bool // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref Core//prelude/types, inst+4, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.2: %ImplicitAs.type = import_ref Core//prelude/operators/as, inst+40, loaded [template = constants.%ImplicitAs] +// CHECK:STDOUT: %import_ref.2: %ImplicitAs.type.1 = import_ref Core//prelude/operators/as, inst+40, loaded [template = constants.%ImplicitAs] // CHECK:STDOUT: %import_ref.3 = import_ref Core//prelude/operators/as, inst+45, unloaded -// CHECK:STDOUT: %import_ref.4: @ImplicitAs.%.2 (%.12) = import_ref Core//prelude/operators/as, inst+63, loaded [symbolic = @ImplicitAs.%.3 (constants.%.17)] +// CHECK:STDOUT: %import_ref.4: @ImplicitAs.%.1 (%.11) = import_ref Core//prelude/operators/as, inst+63, loaded [symbolic = @ImplicitAs.%.2 (constants.%.15)] // CHECK:STDOUT: %import_ref.5 = import_ref Core//prelude/operators/as, inst+56, unloaded // CHECK:STDOUT: %import_ref.6 = import_ref Core//prelude/operators/as, inst+56, unloaded // CHECK:STDOUT: %import_ref.7 = import_ref Core//prelude/operators/as, inst+56, unloaded @@ -120,7 +120,7 @@ var d: [i32; 3] = t2; // CHECK:STDOUT: %a.var: ref %.3 = var a // CHECK:STDOUT: %a: ref %.3 = bind_name a, %a.var // CHECK:STDOUT: %int.make_type_32.loc20: init type = call constants.%Int32() [template = i32] -// CHECK:STDOUT: %.loc20_29.1: %.18 = tuple_literal (%int.make_type_32.loc20, String, String) +// CHECK:STDOUT: %.loc20_29.1: %.16 = tuple_literal (%int.make_type_32.loc20, String, String) // CHECK:STDOUT: %.loc20_29.2: type = value_of_initializer %int.make_type_32.loc20 [template = i32] // CHECK:STDOUT: %.loc20_29.3: type = converted %int.make_type_32.loc20, %.loc20_29.2 [template = i32] // CHECK:STDOUT: %.loc20_29.4: type = converted %.loc20_29.1, constants.%.9 [template = constants.%.9] @@ -142,14 +142,14 @@ var d: [i32; 3] = t2; // CHECK:STDOUT: %c: ref %.3 = bind_name c, %c.var // CHECK:STDOUT: %int.make_type_32.loc36_10: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %int.make_type_32.loc36_15: init type = call constants.%Int32() [template = i32] -// CHECK:STDOUT: %.loc36_18.1: %.23 = tuple_literal (%int.make_type_32.loc36_10, %int.make_type_32.loc36_15) +// CHECK:STDOUT: %.loc36_18.1: %.21 = tuple_literal (%int.make_type_32.loc36_10, %int.make_type_32.loc36_15) // CHECK:STDOUT: %.loc36_18.2: type = value_of_initializer %int.make_type_32.loc36_10 [template = i32] // CHECK:STDOUT: %.loc36_18.3: type = converted %int.make_type_32.loc36_10, %.loc36_18.2 [template = i32] // CHECK:STDOUT: %.loc36_18.4: type = value_of_initializer %int.make_type_32.loc36_15 [template = i32] // CHECK:STDOUT: %.loc36_18.5: type = converted %int.make_type_32.loc36_15, %.loc36_18.4 [template = i32] -// CHECK:STDOUT: %.loc36_18.6: type = converted %.loc36_18.1, constants.%.22 [template = constants.%.22] -// CHECK:STDOUT: %t2.var: ref %.22 = var t2 -// CHECK:STDOUT: %t2: ref %.22 = bind_name t2, %t2.var +// CHECK:STDOUT: %.loc36_18.6: type = converted %.loc36_18.1, constants.%.20 [template = constants.%.20] +// CHECK:STDOUT: %t2.var: ref %.20 = var t2 +// CHECK:STDOUT: %t2: ref %.20 = bind_name t2, %t2.var // CHECK:STDOUT: %int.make_type_32.loc40: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc40_14: i32 = int_literal 3 [template = constants.%.2] // CHECK:STDOUT: %.loc40_9.1: type = value_of_initializer %int.make_type_32.loc40 [template = i32] @@ -163,12 +163,12 @@ var d: [i32; 3] = t2; // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic = %Dest (constants.%Dest)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.1: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic = %.1 (constants.%.11)] -// CHECK:STDOUT: %Self: %.11 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] +// CHECK:STDOUT: %ImplicitAs.type: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.2)] +// CHECK:STDOUT: %Self: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] // CHECK:STDOUT: %Convert.type: type = fn_type @Convert, @ImplicitAs(%Dest) [symbolic = %Convert.type (constants.%Convert.type.1)] // CHECK:STDOUT: %Convert: @ImplicitAs.%Convert.type (%Convert.type.1) = struct_value () [symbolic = %Convert (constants.%Convert.1)] -// CHECK:STDOUT: %.2: type = assoc_entity_type @ImplicitAs.%.1 (%.11), @ImplicitAs.%Convert.type (%Convert.type.1) [symbolic = %.2 (constants.%.12)] -// CHECK:STDOUT: %.3: @ImplicitAs.%.2 (%.12) = assoc_entity element0, imports.%import_ref.6 [symbolic = %.3 (constants.%.13)] +// CHECK:STDOUT: %.1: type = assoc_entity_type @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2), @ImplicitAs.%Convert.type (%Convert.type.1) [symbolic = %.1 (constants.%.11)] +// CHECK:STDOUT: %.2: @ImplicitAs.%.1 (%.11) = assoc_entity element0, imports.%import_ref.6 [symbolic = %.2 (constants.%.12)] // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: !members: @@ -180,10 +180,10 @@ var d: [i32; 3] = t2; // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32"; // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @Convert(constants.%Dest: type, constants.%Self.1: @ImplicitAs.%.1 (%.11)) { +// CHECK:STDOUT: generic fn @Convert(constants.%Dest: type, constants.%Self.1: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2)) { // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic = %Dest (constants.%Dest)] -// CHECK:STDOUT: %.1: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic = %.1 (constants.%.11)] -// CHECK:STDOUT: %Self: %.11 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] +// CHECK:STDOUT: %ImplicitAs.type: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.2)] +// CHECK:STDOUT: %Self: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] // CHECK:STDOUT: // CHECK:STDOUT: fn[%self: @Convert.%Self (%Self.2)]() -> @Convert.%Dest (%Dest); // CHECK:STDOUT: } @@ -197,10 +197,10 @@ var d: [i32; 3] = t2; // CHECK:STDOUT: %.loc18_39.2: i32 = int_literal 0 [template = constants.%.10] // CHECK:STDOUT: %.loc18_39.3: ref i32 = array_index file.%a.var, %.loc18_39.2 // CHECK:STDOUT: %.loc18_39.4: init i32 = initialize_from %.loc18_20 to %.loc18_39.3 [template = constants.%.5] -// CHECK:STDOUT: %.loc18_39.5: type = interface_type @ImplicitAs, @ImplicitAs(i32) [template = constants.%.14] -// CHECK:STDOUT: %.loc18_39.6: %.15 = specific_constant imports.%import_ref.4, @ImplicitAs(i32) [template = constants.%.16] -// CHECK:STDOUT: %Convert.ref.loc18: %.15 = name_ref Convert, %.loc18_39.6 [template = constants.%.16] -// CHECK:STDOUT: %.loc18_39.7: i32 = converted %.loc18_23, [template = ] +// CHECK:STDOUT: %ImplicitAs.type.loc18: type = interface_type @ImplicitAs, @ImplicitAs(i32) [template = constants.%ImplicitAs.type.3] +// CHECK:STDOUT: %.loc18_39.5: %.13 = specific_constant imports.%import_ref.4, @ImplicitAs(i32) [template = constants.%.14] +// CHECK:STDOUT: %Convert.ref.loc18: %.13 = name_ref Convert, %.loc18_39.5 [template = constants.%.14] +// CHECK:STDOUT: %.loc18_39.6: i32 = converted %.loc18_23, [template = ] // CHECK:STDOUT: assign file.%a.var, // CHECK:STDOUT: %t1.ref: ref %.9 = name_ref t1, file.%t1 // CHECK:STDOUT: %.loc28_19.1: ref i32 = tuple_access %t1.ref, element0 @@ -209,16 +209,16 @@ var d: [i32; 3] = t2; // CHECK:STDOUT: %.loc28_19.4: ref i32 = array_index file.%b.var, %.loc28_19.3 // CHECK:STDOUT: %.loc28_19.5: init i32 = initialize_from %.loc28_19.2 to %.loc28_19.4 // CHECK:STDOUT: %.loc28_19.6: ref String = tuple_access %t1.ref, element1 -// CHECK:STDOUT: %.loc28_19.7: type = interface_type @ImplicitAs, @ImplicitAs(i32) [template = constants.%.14] -// CHECK:STDOUT: %.loc28_19.8: %.15 = specific_constant imports.%import_ref.4, @ImplicitAs(i32) [template = constants.%.16] -// CHECK:STDOUT: %Convert.ref.loc28: %.15 = name_ref Convert, %.loc28_19.8 [template = constants.%.16] -// CHECK:STDOUT: %.loc28_19.9: i32 = converted %.loc28_19.6, [template = ] +// CHECK:STDOUT: %ImplicitAs.type.loc28: type = interface_type @ImplicitAs, @ImplicitAs(i32) [template = constants.%ImplicitAs.type.3] +// CHECK:STDOUT: %.loc28_19.7: %.13 = specific_constant imports.%import_ref.4, @ImplicitAs(i32) [template = constants.%.14] +// CHECK:STDOUT: %Convert.ref.loc28: %.13 = name_ref Convert, %.loc28_19.7 [template = constants.%.14] +// CHECK:STDOUT: %.loc28_19.8: i32 = converted %.loc28_19.6, [template = ] // CHECK:STDOUT: assign file.%b.var, // CHECK:STDOUT: %.loc34_20: i32 = int_literal 1 [template = constants.%.5] -// CHECK:STDOUT: %.loc34_23: i32 = int_literal 2 [template = constants.%.21] -// CHECK:STDOUT: %.loc34_24: %.22 = tuple_literal (%.loc34_20, %.loc34_23) +// CHECK:STDOUT: %.loc34_23: i32 = int_literal 2 [template = constants.%.19] +// CHECK:STDOUT: %.loc34_24: %.20 = tuple_literal (%.loc34_20, %.loc34_23) // CHECK:STDOUT: assign file.%c.var, -// CHECK:STDOUT: %t2.ref: ref %.22 = name_ref t2, file.%t2 +// CHECK:STDOUT: %t2.ref: ref %.20 = name_ref t2, file.%t2 // CHECK:STDOUT: assign file.%d.var, // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -237,7 +237,7 @@ var d: [i32; 3] = t2; // CHECK:STDOUT: // CHECK:STDOUT: specific @Convert(constants.%Dest, constants.%Self.1) { // CHECK:STDOUT: %Dest => constants.%Dest -// CHECK:STDOUT: %.1 => constants.%.11 +// CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.2 // CHECK:STDOUT: %Self => constants.%Self.1 // CHECK:STDOUT: } // CHECK:STDOUT: @@ -245,11 +245,11 @@ var d: [i32; 3] = t2; // CHECK:STDOUT: %Dest => i32 // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.1 => constants.%.14 +// CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.3 // CHECK:STDOUT: %Self => constants.%Self.2 // CHECK:STDOUT: %Convert.type => constants.%Convert.type.2 // CHECK:STDOUT: %Convert => constants.%Convert.2 -// CHECK:STDOUT: %.2 => constants.%.15 -// CHECK:STDOUT: %.3 => constants.%.16 +// CHECK:STDOUT: %.1 => constants.%.13 +// CHECK:STDOUT: %.2 => constants.%.14 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/as/adapter_conversion.carbon b/toolchain/check/testdata/as/adapter_conversion.carbon index abec7553a4158..fdf2bce54d62b 100644 --- a/toolchain/check/testdata/as/adapter_conversion.carbon +++ b/toolchain/check/testdata/as/adapter_conversion.carbon @@ -544,22 +544,22 @@ var b: B = {.x = 1} as B; // CHECK:STDOUT: %.5: type = ptr_type %.3 [template] // CHECK:STDOUT: %.6: = complete_type_witness %A [template] // CHECK:STDOUT: %.7: i32 = int_literal 1 [template] -// CHECK:STDOUT: %As.type: type = generic_interface_type @As [template] -// CHECK:STDOUT: %As: %As.type = struct_value () [template] +// CHECK:STDOUT: %As.type.1: type = generic_interface_type @As [template] +// CHECK:STDOUT: %As: %As.type.1 = struct_value () [template] // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic] -// CHECK:STDOUT: %.8: type = interface_type @As, @As(%Dest) [symbolic] -// CHECK:STDOUT: %Self.1: @As.%.1 (%.8) = bind_symbolic_name Self, 1 [symbolic] -// CHECK:STDOUT: %Self.2: %.8 = bind_symbolic_name Self, 1 [symbolic] +// CHECK:STDOUT: %As.type.2: type = interface_type @As, @As(%Dest) [symbolic] +// CHECK:STDOUT: %Self.1: @As.%As.type (%As.type.2) = bind_symbolic_name Self, 1 [symbolic] +// CHECK:STDOUT: %Self.2: %As.type.2 = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: %Convert.type.1: type = fn_type @Convert, @As(%Dest) [symbolic] // CHECK:STDOUT: %Convert.1: %Convert.type.1 = struct_value () [symbolic] -// CHECK:STDOUT: %.9: type = assoc_entity_type %.8, %Convert.type.1 [symbolic] -// CHECK:STDOUT: %.10: %.9 = assoc_entity element0, imports.%import_ref.6 [symbolic] -// CHECK:STDOUT: %.11: type = interface_type @As, @As(%B) [template] +// CHECK:STDOUT: %.8: type = assoc_entity_type %As.type.2, %Convert.type.1 [symbolic] +// CHECK:STDOUT: %.9: %.8 = assoc_entity element0, imports.%import_ref.6 [symbolic] +// CHECK:STDOUT: %As.type.3: type = interface_type @As, @As(%B) [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert, @As(%B) [template] // CHECK:STDOUT: %Convert.2: %Convert.type.2 = struct_value () [template] -// CHECK:STDOUT: %.12: type = assoc_entity_type %.11, %Convert.type.2 [template] -// CHECK:STDOUT: %.13: %.12 = assoc_entity element0, imports.%import_ref.6 [template] -// CHECK:STDOUT: %.14: %.9 = assoc_entity element0, imports.%import_ref.7 [symbolic] +// CHECK:STDOUT: %.10: type = assoc_entity_type %As.type.3, %Convert.type.2 [template] +// CHECK:STDOUT: %.11: %.10 = assoc_entity element0, imports.%import_ref.6 [template] +// CHECK:STDOUT: %.12: %.8 = assoc_entity element0, imports.%import_ref.7 [symbolic] // CHECK:STDOUT: %struct: %.3 = struct_value (%.7) [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -577,9 +577,9 @@ var b: B = {.x = 1} as B; // CHECK:STDOUT: import Core//prelude/types/bool // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref Core//prelude/types, inst+4, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.2: %As.type = import_ref Core//prelude/operators/as, inst+5, loaded [template = constants.%As] +// CHECK:STDOUT: %import_ref.2: %As.type.1 = import_ref Core//prelude/operators/as, inst+5, loaded [template = constants.%As] // CHECK:STDOUT: %import_ref.3 = import_ref Core//prelude/operators/as, inst+11, unloaded -// CHECK:STDOUT: %import_ref.4: @As.%.2 (%.9) = import_ref Core//prelude/operators/as, inst+29, loaded [symbolic = @As.%.3 (constants.%.14)] +// CHECK:STDOUT: %import_ref.4: @As.%.1 (%.8) = import_ref Core//prelude/operators/as, inst+29, loaded [symbolic = @As.%.2 (constants.%.12)] // CHECK:STDOUT: %import_ref.5 = import_ref Core//prelude/operators/as, inst+22, unloaded // CHECK:STDOUT: %import_ref.6 = import_ref Core//prelude/operators/as, inst+22, unloaded // CHECK:STDOUT: %import_ref.7 = import_ref Core//prelude/operators/as, inst+22, unloaded @@ -604,12 +604,12 @@ var b: B = {.x = 1} as B; // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic = %Dest (constants.%Dest)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.1: type = interface_type @As, @As(%Dest) [symbolic = %.1 (constants.%.8)] -// CHECK:STDOUT: %Self: %.8 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] +// CHECK:STDOUT: %As.type: type = interface_type @As, @As(%Dest) [symbolic = %As.type (constants.%As.type.2)] +// CHECK:STDOUT: %Self: %As.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] // CHECK:STDOUT: %Convert.type: type = fn_type @Convert, @As(%Dest) [symbolic = %Convert.type (constants.%Convert.type.1)] // CHECK:STDOUT: %Convert: @As.%Convert.type (%Convert.type.1) = struct_value () [symbolic = %Convert (constants.%Convert.1)] -// CHECK:STDOUT: %.2: type = assoc_entity_type @As.%.1 (%.8), @As.%Convert.type (%Convert.type.1) [symbolic = %.2 (constants.%.9)] -// CHECK:STDOUT: %.3: @As.%.2 (%.9) = assoc_entity element0, imports.%import_ref.6 [symbolic = %.3 (constants.%.10)] +// CHECK:STDOUT: %.1: type = assoc_entity_type @As.%As.type (%As.type.2), @As.%Convert.type (%Convert.type.1) [symbolic = %.1 (constants.%.8)] +// CHECK:STDOUT: %.2: @As.%.1 (%.8) = assoc_entity element0, imports.%import_ref.6 [symbolic = %.2 (constants.%.9)] // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: !members: @@ -642,10 +642,10 @@ var b: B = {.x = 1} as B; // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32"; // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @Convert(constants.%Dest: type, constants.%Self.1: @As.%.1 (%.8)) { +// CHECK:STDOUT: generic fn @Convert(constants.%Dest: type, constants.%Self.1: @As.%As.type (%As.type.2)) { // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic = %Dest (constants.%Dest)] -// CHECK:STDOUT: %.1: type = interface_type @As, @As(%Dest) [symbolic = %.1 (constants.%.8)] -// CHECK:STDOUT: %Self: %.8 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] +// CHECK:STDOUT: %As.type: type = interface_type @As, @As(%Dest) [symbolic = %As.type (constants.%As.type.2)] +// CHECK:STDOUT: %Self: %As.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] // CHECK:STDOUT: // CHECK:STDOUT: fn[%self: @Convert.%Self (%Self.2)]() -> @Convert.%Dest (%Dest); // CHECK:STDOUT: } @@ -655,12 +655,12 @@ var b: B = {.x = 1} as B; // CHECK:STDOUT: %.loc21_18: i32 = int_literal 1 [template = constants.%.7] // CHECK:STDOUT: %.loc21_19.1: %.3 = struct_literal (%.loc21_18) // CHECK:STDOUT: %B.ref: type = name_ref B, file.%B.decl [template = constants.%B] -// CHECK:STDOUT: %.loc21_21.1: type = interface_type @As, @As(constants.%B) [template = constants.%.11] -// CHECK:STDOUT: %.loc21_21.2: %.12 = specific_constant imports.%import_ref.4, @As(constants.%B) [template = constants.%.13] -// CHECK:STDOUT: %Convert.ref: %.12 = name_ref Convert, %.loc21_21.2 [template = constants.%.13] +// CHECK:STDOUT: %As.type: type = interface_type @As, @As(constants.%B) [template = constants.%As.type.3] +// CHECK:STDOUT: %.loc21_21.1: %.10 = specific_constant imports.%import_ref.4, @As(constants.%B) [template = constants.%.11] +// CHECK:STDOUT: %Convert.ref: %.10 = name_ref Convert, %.loc21_21.1 [template = constants.%.11] // CHECK:STDOUT: %struct: %.3 = struct_value (%.loc21_18) [template = constants.%struct] // CHECK:STDOUT: %.loc21_19.2: %.3 = converted %.loc21_19.1, %struct [template = constants.%struct] -// CHECK:STDOUT: %.loc21_21.3: %B = converted %.loc21_19.1, [template = ] +// CHECK:STDOUT: %.loc21_21.2: %B = converted %.loc21_19.1, [template = ] // CHECK:STDOUT: assign file.%b.var, // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -679,7 +679,7 @@ var b: B = {.x = 1} as B; // CHECK:STDOUT: // CHECK:STDOUT: specific @Convert(constants.%Dest, constants.%Self.1) { // CHECK:STDOUT: %Dest => constants.%Dest -// CHECK:STDOUT: %.1 => constants.%.8 +// CHECK:STDOUT: %As.type => constants.%As.type.2 // CHECK:STDOUT: %Self => constants.%Self.1 // CHECK:STDOUT: } // CHECK:STDOUT: @@ -687,11 +687,11 @@ var b: B = {.x = 1} as B; // CHECK:STDOUT: %Dest => constants.%B // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.1 => constants.%.11 +// CHECK:STDOUT: %As.type => constants.%As.type.3 // CHECK:STDOUT: %Self => constants.%Self.2 // CHECK:STDOUT: %Convert.type => constants.%Convert.type.2 // CHECK:STDOUT: %Convert => constants.%Convert.2 -// CHECK:STDOUT: %.2 => constants.%.12 -// CHECK:STDOUT: %.3 => constants.%.13 +// CHECK:STDOUT: %.1 => constants.%.10 +// CHECK:STDOUT: %.2 => constants.%.11 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/as/fail_no_conversion.carbon b/toolchain/check/testdata/as/fail_no_conversion.carbon index ccb609e974ea2..a2ae2d7340989 100644 --- a/toolchain/check/testdata/as/fail_no_conversion.carbon +++ b/toolchain/check/testdata/as/fail_no_conversion.carbon @@ -26,22 +26,22 @@ let n: (i32, i32) = 1 as (i32, i32); // CHECK:STDOUT: %.3: type = tuple_type (i32, i32) [template] // CHECK:STDOUT: %.4: type = ptr_type %.3 [template] // CHECK:STDOUT: %.5: i32 = int_literal 1 [template] -// CHECK:STDOUT: %As.type: type = generic_interface_type @As [template] -// CHECK:STDOUT: %As: %As.type = struct_value () [template] +// CHECK:STDOUT: %As.type.1: type = generic_interface_type @As [template] +// CHECK:STDOUT: %As: %As.type.1 = struct_value () [template] // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic] -// CHECK:STDOUT: %.6: type = interface_type @As, @As(%Dest) [symbolic] -// CHECK:STDOUT: %Self.1: @As.%.1 (%.6) = bind_symbolic_name Self, 1 [symbolic] -// CHECK:STDOUT: %Self.2: %.6 = bind_symbolic_name Self, 1 [symbolic] +// CHECK:STDOUT: %As.type.2: type = interface_type @As, @As(%Dest) [symbolic] +// CHECK:STDOUT: %Self.1: @As.%As.type (%As.type.2) = bind_symbolic_name Self, 1 [symbolic] +// CHECK:STDOUT: %Self.2: %As.type.2 = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: %Convert.type.1: type = fn_type @Convert, @As(%Dest) [symbolic] // CHECK:STDOUT: %Convert.1: %Convert.type.1 = struct_value () [symbolic] -// CHECK:STDOUT: %.7: type = assoc_entity_type %.6, %Convert.type.1 [symbolic] -// CHECK:STDOUT: %.8: %.7 = assoc_entity element0, imports.%import_ref.6 [symbolic] -// CHECK:STDOUT: %.9: type = interface_type @As, @As(%.3) [template] +// CHECK:STDOUT: %.6: type = assoc_entity_type %As.type.2, %Convert.type.1 [symbolic] +// CHECK:STDOUT: %.7: %.6 = assoc_entity element0, imports.%import_ref.6 [symbolic] +// CHECK:STDOUT: %As.type.3: type = interface_type @As, @As(%.3) [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert, @As(%.3) [template] // CHECK:STDOUT: %Convert.2: %Convert.type.2 = struct_value () [template] -// CHECK:STDOUT: %.10: type = assoc_entity_type %.9, %Convert.type.2 [template] -// CHECK:STDOUT: %.11: %.10 = assoc_entity element0, imports.%import_ref.6 [template] -// CHECK:STDOUT: %.12: %.7 = assoc_entity element0, imports.%import_ref.7 [symbolic] +// CHECK:STDOUT: %.8: type = assoc_entity_type %As.type.3, %Convert.type.2 [template] +// CHECK:STDOUT: %.9: %.8 = assoc_entity element0, imports.%import_ref.6 [template] +// CHECK:STDOUT: %.10: %.6 = assoc_entity element0, imports.%import_ref.7 [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -58,9 +58,9 @@ let n: (i32, i32) = 1 as (i32, i32); // CHECK:STDOUT: import Core//prelude/types/bool // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref Core//prelude/types, inst+4, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.2: %As.type = import_ref Core//prelude/operators/as, inst+5, loaded [template = constants.%As] +// CHECK:STDOUT: %import_ref.2: %As.type.1 = import_ref Core//prelude/operators/as, inst+5, loaded [template = constants.%As] // CHECK:STDOUT: %import_ref.3 = import_ref Core//prelude/operators/as, inst+11, unloaded -// CHECK:STDOUT: %import_ref.4: @As.%.2 (%.7) = import_ref Core//prelude/operators/as, inst+29, loaded [symbolic = @As.%.3 (constants.%.12)] +// CHECK:STDOUT: %import_ref.4: @As.%.1 (%.6) = import_ref Core//prelude/operators/as, inst+29, loaded [symbolic = @As.%.2 (constants.%.10)] // CHECK:STDOUT: %import_ref.5 = import_ref Core//prelude/operators/as, inst+22, unloaded // CHECK:STDOUT: %import_ref.6 = import_ref Core//prelude/operators/as, inst+22, unloaded // CHECK:STDOUT: %import_ref.7 = import_ref Core//prelude/operators/as, inst+22, unloaded @@ -86,12 +86,12 @@ let n: (i32, i32) = 1 as (i32, i32); // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic = %Dest (constants.%Dest)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.1: type = interface_type @As, @As(%Dest) [symbolic = %.1 (constants.%.6)] -// CHECK:STDOUT: %Self: %.6 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] +// CHECK:STDOUT: %As.type: type = interface_type @As, @As(%Dest) [symbolic = %As.type (constants.%As.type.2)] +// CHECK:STDOUT: %Self: %As.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] // CHECK:STDOUT: %Convert.type: type = fn_type @Convert, @As(%Dest) [symbolic = %Convert.type (constants.%Convert.type.1)] // CHECK:STDOUT: %Convert: @As.%Convert.type (%Convert.type.1) = struct_value () [symbolic = %Convert (constants.%Convert.1)] -// CHECK:STDOUT: %.2: type = assoc_entity_type @As.%.1 (%.6), @As.%Convert.type (%Convert.type.1) [symbolic = %.2 (constants.%.7)] -// CHECK:STDOUT: %.3: @As.%.2 (%.7) = assoc_entity element0, imports.%import_ref.6 [symbolic = %.3 (constants.%.8)] +// CHECK:STDOUT: %.1: type = assoc_entity_type @As.%As.type (%As.type.2), @As.%Convert.type (%Convert.type.1) [symbolic = %.1 (constants.%.6)] +// CHECK:STDOUT: %.2: @As.%.1 (%.6) = assoc_entity element0, imports.%import_ref.6 [symbolic = %.2 (constants.%.7)] // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: !members: @@ -103,10 +103,10 @@ let n: (i32, i32) = 1 as (i32, i32); // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32"; // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @Convert(constants.%Dest: type, constants.%Self.1: @As.%.1 (%.6)) { +// CHECK:STDOUT: generic fn @Convert(constants.%Dest: type, constants.%Self.1: @As.%As.type (%As.type.2)) { // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic = %Dest (constants.%Dest)] -// CHECK:STDOUT: %.1: type = interface_type @As, @As(%Dest) [symbolic = %.1 (constants.%.6)] -// CHECK:STDOUT: %Self: %.6 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] +// CHECK:STDOUT: %As.type: type = interface_type @As, @As(%Dest) [symbolic = %As.type (constants.%As.type.2)] +// CHECK:STDOUT: %Self: %As.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] // CHECK:STDOUT: // CHECK:STDOUT: fn[%self: @Convert.%Self (%Self.2)]() -> @Convert.%Dest (%Dest); // CHECK:STDOUT: } @@ -122,11 +122,11 @@ let n: (i32, i32) = 1 as (i32, i32); // CHECK:STDOUT: %.loc17_35.4: type = value_of_initializer %int.make_type_32.loc17_32 [template = i32] // CHECK:STDOUT: %.loc17_35.5: type = converted %int.make_type_32.loc17_32, %.loc17_35.4 [template = i32] // CHECK:STDOUT: %.loc17_35.6: type = converted %.loc17_35.1, constants.%.3 [template = constants.%.3] -// CHECK:STDOUT: %.loc17_23.1: type = interface_type @As, @As(constants.%.3) [template = constants.%.9] -// CHECK:STDOUT: %.loc17_23.2: %.10 = specific_constant imports.%import_ref.4, @As(constants.%.3) [template = constants.%.11] -// CHECK:STDOUT: %Convert.ref: %.10 = name_ref Convert, %.loc17_23.2 [template = constants.%.11] -// CHECK:STDOUT: %.loc17_23.3: %.3 = converted %.loc17_21, [template = ] -// CHECK:STDOUT: %.loc17_23.4: i32 = tuple_access %.loc17_23.3, element0 [template = ] +// CHECK:STDOUT: %As.type: type = interface_type @As, @As(constants.%.3) [template = constants.%As.type.3] +// CHECK:STDOUT: %.loc17_23.1: %.8 = specific_constant imports.%import_ref.4, @As(constants.%.3) [template = constants.%.9] +// CHECK:STDOUT: %Convert.ref: %.8 = name_ref Convert, %.loc17_23.1 [template = constants.%.9] +// CHECK:STDOUT: %.loc17_23.2: %.3 = converted %.loc17_21, [template = ] +// CHECK:STDOUT: %.loc17_23.3: i32 = tuple_access %.loc17_23.2, element0 [template = ] // CHECK:STDOUT: %n: %.3 = bind_name n, // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -145,7 +145,7 @@ let n: (i32, i32) = 1 as (i32, i32); // CHECK:STDOUT: // CHECK:STDOUT: specific @Convert(constants.%Dest, constants.%Self.1) { // CHECK:STDOUT: %Dest => constants.%Dest -// CHECK:STDOUT: %.1 => constants.%.6 +// CHECK:STDOUT: %As.type => constants.%As.type.2 // CHECK:STDOUT: %Self => constants.%Self.1 // CHECK:STDOUT: } // CHECK:STDOUT: @@ -153,11 +153,11 @@ let n: (i32, i32) = 1 as (i32, i32); // CHECK:STDOUT: %Dest => constants.%.3 // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.1 => constants.%.9 +// CHECK:STDOUT: %As.type => constants.%As.type.3 // CHECK:STDOUT: %Self => constants.%Self.2 // CHECK:STDOUT: %Convert.type => constants.%Convert.type.2 // CHECK:STDOUT: %Convert => constants.%Convert.2 -// CHECK:STDOUT: %.2 => constants.%.10 -// CHECK:STDOUT: %.3 => constants.%.11 +// CHECK:STDOUT: %.1 => constants.%.8 +// CHECK:STDOUT: %.2 => constants.%.9 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/as/fail_not_type.carbon b/toolchain/check/testdata/as/fail_not_type.carbon index 5e13453064ab1..a2d41de9704ce 100644 --- a/toolchain/check/testdata/as/fail_not_type.carbon +++ b/toolchain/check/testdata/as/fail_not_type.carbon @@ -24,22 +24,22 @@ let n: i32 = 1 as 2; // CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 1 [template] // CHECK:STDOUT: %.3: i32 = int_literal 2 [template] -// CHECK:STDOUT: %ImplicitAs.type: type = generic_interface_type @ImplicitAs [template] -// CHECK:STDOUT: %ImplicitAs: %ImplicitAs.type = struct_value () [template] +// CHECK:STDOUT: %ImplicitAs.type.1: type = generic_interface_type @ImplicitAs [template] +// CHECK:STDOUT: %ImplicitAs: %ImplicitAs.type.1 = struct_value () [template] // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic] -// CHECK:STDOUT: %.4: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic] -// CHECK:STDOUT: %Self.1: @ImplicitAs.%.1 (%.4) = bind_symbolic_name Self, 1 [symbolic] -// CHECK:STDOUT: %Self.2: %.4 = bind_symbolic_name Self, 1 [symbolic] +// CHECK:STDOUT: %ImplicitAs.type.2: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic] +// CHECK:STDOUT: %Self.1: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2) = bind_symbolic_name Self, 1 [symbolic] +// CHECK:STDOUT: %Self.2: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: %Convert.type.1: type = fn_type @Convert, @ImplicitAs(%Dest) [symbolic] // CHECK:STDOUT: %Convert.1: %Convert.type.1 = struct_value () [symbolic] -// CHECK:STDOUT: %.5: type = assoc_entity_type %.4, %Convert.type.1 [symbolic] -// CHECK:STDOUT: %.6: %.5 = assoc_entity element0, imports.%import_ref.6 [symbolic] -// CHECK:STDOUT: %.7: type = interface_type @ImplicitAs, @ImplicitAs(type) [template] +// CHECK:STDOUT: %.4: type = assoc_entity_type %ImplicitAs.type.2, %Convert.type.1 [symbolic] +// CHECK:STDOUT: %.5: %.4 = assoc_entity element0, imports.%import_ref.6 [symbolic] +// CHECK:STDOUT: %ImplicitAs.type.3: type = interface_type @ImplicitAs, @ImplicitAs(type) [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert, @ImplicitAs(type) [template] // CHECK:STDOUT: %Convert.2: %Convert.type.2 = struct_value () [template] -// CHECK:STDOUT: %.8: type = assoc_entity_type %.7, %Convert.type.2 [template] -// CHECK:STDOUT: %.9: %.8 = assoc_entity element0, imports.%import_ref.6 [template] -// CHECK:STDOUT: %.10: %.5 = assoc_entity element0, imports.%import_ref.7 [symbolic] +// CHECK:STDOUT: %.6: type = assoc_entity_type %ImplicitAs.type.3, %Convert.type.2 [template] +// CHECK:STDOUT: %.7: %.6 = assoc_entity element0, imports.%import_ref.6 [template] +// CHECK:STDOUT: %.8: %.4 = assoc_entity element0, imports.%import_ref.7 [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -56,9 +56,9 @@ let n: i32 = 1 as 2; // CHECK:STDOUT: import Core//prelude/types/bool // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref Core//prelude/types, inst+4, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.2: %ImplicitAs.type = import_ref Core//prelude/operators/as, inst+40, loaded [template = constants.%ImplicitAs] +// CHECK:STDOUT: %import_ref.2: %ImplicitAs.type.1 = import_ref Core//prelude/operators/as, inst+40, loaded [template = constants.%ImplicitAs] // CHECK:STDOUT: %import_ref.3 = import_ref Core//prelude/operators/as, inst+45, unloaded -// CHECK:STDOUT: %import_ref.4: @ImplicitAs.%.2 (%.5) = import_ref Core//prelude/operators/as, inst+63, loaded [symbolic = @ImplicitAs.%.3 (constants.%.10)] +// CHECK:STDOUT: %import_ref.4: @ImplicitAs.%.1 (%.4) = import_ref Core//prelude/operators/as, inst+63, loaded [symbolic = @ImplicitAs.%.2 (constants.%.8)] // CHECK:STDOUT: %import_ref.5 = import_ref Core//prelude/operators/as, inst+56, unloaded // CHECK:STDOUT: %import_ref.6 = import_ref Core//prelude/operators/as, inst+56, unloaded // CHECK:STDOUT: %import_ref.7 = import_ref Core//prelude/operators/as, inst+56, unloaded @@ -79,12 +79,12 @@ let n: i32 = 1 as 2; // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic = %Dest (constants.%Dest)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.1: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic = %.1 (constants.%.4)] -// CHECK:STDOUT: %Self: %.4 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] +// CHECK:STDOUT: %ImplicitAs.type: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.2)] +// CHECK:STDOUT: %Self: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] // CHECK:STDOUT: %Convert.type: type = fn_type @Convert, @ImplicitAs(%Dest) [symbolic = %Convert.type (constants.%Convert.type.1)] // CHECK:STDOUT: %Convert: @ImplicitAs.%Convert.type (%Convert.type.1) = struct_value () [symbolic = %Convert (constants.%Convert.1)] -// CHECK:STDOUT: %.2: type = assoc_entity_type @ImplicitAs.%.1 (%.4), @ImplicitAs.%Convert.type (%Convert.type.1) [symbolic = %.2 (constants.%.5)] -// CHECK:STDOUT: %.3: @ImplicitAs.%.2 (%.5) = assoc_entity element0, imports.%import_ref.6 [symbolic = %.3 (constants.%.6)] +// CHECK:STDOUT: %.1: type = assoc_entity_type @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2), @ImplicitAs.%Convert.type (%Convert.type.1) [symbolic = %.1 (constants.%.4)] +// CHECK:STDOUT: %.2: @ImplicitAs.%.1 (%.4) = assoc_entity element0, imports.%import_ref.6 [symbolic = %.2 (constants.%.5)] // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: !members: @@ -96,10 +96,10 @@ let n: i32 = 1 as 2; // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32"; // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @Convert(constants.%Dest: type, constants.%Self.1: @ImplicitAs.%.1 (%.4)) { +// CHECK:STDOUT: generic fn @Convert(constants.%Dest: type, constants.%Self.1: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2)) { // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic = %Dest (constants.%Dest)] -// CHECK:STDOUT: %.1: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic = %.1 (constants.%.4)] -// CHECK:STDOUT: %Self: %.4 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] +// CHECK:STDOUT: %ImplicitAs.type: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.2)] +// CHECK:STDOUT: %Self: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] // CHECK:STDOUT: // CHECK:STDOUT: fn[%self: @Convert.%Self (%Self.2)]() -> @Convert.%Dest (%Dest); // CHECK:STDOUT: } @@ -108,10 +108,10 @@ let n: i32 = 1 as 2; // CHECK:STDOUT: !entry: // CHECK:STDOUT: %.loc17_14: i32 = int_literal 1 [template = constants.%.2] // CHECK:STDOUT: %.loc17_19.1: i32 = int_literal 2 [template = constants.%.3] -// CHECK:STDOUT: %.loc17_19.2: type = interface_type @ImplicitAs, @ImplicitAs(type) [template = constants.%.7] -// CHECK:STDOUT: %.loc17_19.3: %.8 = specific_constant imports.%import_ref.4, @ImplicitAs(type) [template = constants.%.9] -// CHECK:STDOUT: %Convert.ref: %.8 = name_ref Convert, %.loc17_19.3 [template = constants.%.9] -// CHECK:STDOUT: %.loc17_19.4: type = converted %.loc17_19.1, [template = ] +// CHECK:STDOUT: %ImplicitAs.type: type = interface_type @ImplicitAs, @ImplicitAs(type) [template = constants.%ImplicitAs.type.3] +// CHECK:STDOUT: %.loc17_19.2: %.6 = specific_constant imports.%import_ref.4, @ImplicitAs(type) [template = constants.%.7] +// CHECK:STDOUT: %Convert.ref: %.6 = name_ref Convert, %.loc17_19.2 [template = constants.%.7] +// CHECK:STDOUT: %.loc17_19.3: type = converted %.loc17_19.1, [template = ] // CHECK:STDOUT: %n: i32 = bind_name n, // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -130,7 +130,7 @@ let n: i32 = 1 as 2; // CHECK:STDOUT: // CHECK:STDOUT: specific @Convert(constants.%Dest, constants.%Self.1) { // CHECK:STDOUT: %Dest => constants.%Dest -// CHECK:STDOUT: %.1 => constants.%.4 +// CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.2 // CHECK:STDOUT: %Self => constants.%Self.1 // CHECK:STDOUT: } // CHECK:STDOUT: @@ -138,11 +138,11 @@ let n: i32 = 1 as 2; // CHECK:STDOUT: %Dest => type // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.1 => constants.%.7 +// CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.3 // CHECK:STDOUT: %Self => constants.%Self.2 // CHECK:STDOUT: %Convert.type => constants.%Convert.type.2 // CHECK:STDOUT: %Convert => constants.%Convert.2 -// CHECK:STDOUT: %.2 => constants.%.8 -// CHECK:STDOUT: %.3 => constants.%.9 +// CHECK:STDOUT: %.1 => constants.%.6 +// CHECK:STDOUT: %.2 => constants.%.7 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/as/overloaded.carbon b/toolchain/check/testdata/as/overloaded.carbon index 289781f59e5ee..cfa32a132c0a4 100644 --- a/toolchain/check/testdata/as/overloaded.carbon +++ b/toolchain/check/testdata/as/overloaded.carbon @@ -32,36 +32,36 @@ let n: i32 = ((4 as i32) as X) as i32; // CHECK:STDOUT: %.2: type = unbound_element_type %X, i32 [template] // CHECK:STDOUT: %.3: type = struct_type {.n: i32} [template] // CHECK:STDOUT: %.4: = complete_type_witness %.3 [template] -// CHECK:STDOUT: %As.type: type = generic_interface_type @As [template] -// CHECK:STDOUT: %As: %As.type = struct_value () [template] +// CHECK:STDOUT: %As.type.1: type = generic_interface_type @As [template] +// CHECK:STDOUT: %As: %As.type.1 = struct_value () [template] // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic] -// CHECK:STDOUT: %.5: type = interface_type @As, @As(%Dest) [symbolic] -// CHECK:STDOUT: %Self.1: @As.%.1 (%.5) = bind_symbolic_name Self, 1 [symbolic] -// CHECK:STDOUT: %Self.2: %.5 = bind_symbolic_name Self, 1 [symbolic] +// CHECK:STDOUT: %As.type.2: type = interface_type @As, @As(%Dest) [symbolic] +// CHECK:STDOUT: %Self.1: @As.%As.type (%As.type.2) = bind_symbolic_name Self, 1 [symbolic] +// CHECK:STDOUT: %Self.2: %As.type.2 = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: %Convert.type.1: type = fn_type @Convert.1, @As(%Dest) [symbolic] // CHECK:STDOUT: %Convert.1: %Convert.type.1 = struct_value () [symbolic] -// CHECK:STDOUT: %.6: type = assoc_entity_type %.5, %Convert.type.1 [symbolic] -// CHECK:STDOUT: %.7: %.6 = assoc_entity element0, imports.%import_ref.6 [symbolic] -// CHECK:STDOUT: %.8: type = interface_type @As, @As(%X) [template] +// CHECK:STDOUT: %.5: type = assoc_entity_type %As.type.2, %Convert.type.1 [symbolic] +// CHECK:STDOUT: %.6: %.5 = assoc_entity element0, imports.%import_ref.6 [symbolic] +// CHECK:STDOUT: %As.type.3: type = interface_type @As, @As(%X) [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.2 [template] // CHECK:STDOUT: %Convert.2: %Convert.type.2 = struct_value () [template] // CHECK:STDOUT: %Convert.type.3: type = fn_type @Convert.1, @As(%X) [template] // CHECK:STDOUT: %Convert.3: %Convert.type.3 = struct_value () [template] -// CHECK:STDOUT: %.9: type = assoc_entity_type %.8, %Convert.type.3 [template] -// CHECK:STDOUT: %.10: %.9 = assoc_entity element0, imports.%import_ref.6 [template] -// CHECK:STDOUT: %.11: = interface_witness (%Convert.2) [template] -// CHECK:STDOUT: %.12: type = ptr_type %.3 [template] -// CHECK:STDOUT: %.13: type = interface_type @As, @As(i32) [template] +// CHECK:STDOUT: %.7: type = assoc_entity_type %As.type.3, %Convert.type.3 [template] +// CHECK:STDOUT: %.8: %.7 = assoc_entity element0, imports.%import_ref.6 [template] +// CHECK:STDOUT: %.9: = interface_witness (%Convert.2) [template] +// CHECK:STDOUT: %.10: type = ptr_type %.3 [template] +// CHECK:STDOUT: %As.type.4: type = interface_type @As, @As(i32) [template] // CHECK:STDOUT: %Convert.type.4: type = fn_type @Convert.3 [template] // CHECK:STDOUT: %Convert.4: %Convert.type.4 = struct_value () [template] // CHECK:STDOUT: %Convert.type.5: type = fn_type @Convert.1, @As(i32) [template] // CHECK:STDOUT: %Convert.5: %Convert.type.5 = struct_value () [template] -// CHECK:STDOUT: %.14: type = assoc_entity_type %.13, %Convert.type.5 [template] -// CHECK:STDOUT: %.15: %.14 = assoc_entity element0, imports.%import_ref.6 [template] -// CHECK:STDOUT: %.16: = interface_witness (%Convert.4) [template] -// CHECK:STDOUT: %.17: i32 = int_literal 4 [template] -// CHECK:STDOUT: %.18: %.6 = assoc_entity element0, imports.%import_ref.7 [symbolic] -// CHECK:STDOUT: %.19: = bound_method %.17, %Convert.2 [template] +// CHECK:STDOUT: %.11: type = assoc_entity_type %As.type.4, %Convert.type.5 [template] +// CHECK:STDOUT: %.12: %.11 = assoc_entity element0, imports.%import_ref.6 [template] +// CHECK:STDOUT: %.13: = interface_witness (%Convert.4) [template] +// CHECK:STDOUT: %.14: i32 = int_literal 4 [template] +// CHECK:STDOUT: %.15: %.5 = assoc_entity element0, imports.%import_ref.7 [symbolic] +// CHECK:STDOUT: %.16: = bound_method %.14, %Convert.2 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -78,9 +78,9 @@ let n: i32 = ((4 as i32) as X) as i32; // CHECK:STDOUT: import Core//prelude/types/bool // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref Core//prelude/types, inst+4, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.2: %As.type = import_ref Core//prelude/operators/as, inst+5, loaded [template = constants.%As] +// CHECK:STDOUT: %import_ref.2: %As.type.1 = import_ref Core//prelude/operators/as, inst+5, loaded [template = constants.%As] // CHECK:STDOUT: %import_ref.3 = import_ref Core//prelude/operators/as, inst+11, unloaded -// CHECK:STDOUT: %import_ref.4: @As.%.2 (%.6) = import_ref Core//prelude/operators/as, inst+29, loaded [symbolic = @As.%.3 (constants.%.18)] +// CHECK:STDOUT: %import_ref.4: @As.%.1 (%.5) = import_ref Core//prelude/operators/as, inst+29, loaded [symbolic = @As.%.2 (constants.%.15)] // CHECK:STDOUT: %import_ref.5: @As.%Convert.type (%Convert.type.1) = import_ref Core//prelude/operators/as, inst+22, loaded [symbolic = @As.%Convert (constants.%Convert.1)] // CHECK:STDOUT: %import_ref.6 = import_ref Core//prelude/operators/as, inst+22, unloaded // CHECK:STDOUT: %import_ref.7 = import_ref Core//prelude/operators/as, inst+22, unloaded @@ -99,18 +99,18 @@ let n: i32 = ((4 as i32) as X) as i32; // CHECK:STDOUT: %.loc15_6.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc15_6.2: type = converted %int.make_type_32, %.loc15_6.1 [template = i32] // CHECK:STDOUT: %Core.ref: = name_ref Core, imports.%Core [template = imports.%Core] -// CHECK:STDOUT: %As.ref: %As.type = name_ref As, imports.%import_ref.2 [template = constants.%As] +// CHECK:STDOUT: %As.ref: %As.type.1 = name_ref As, imports.%import_ref.2 [template = constants.%As] // CHECK:STDOUT: %X.ref: type = name_ref X, file.%X.decl [template = constants.%X] -// CHECK:STDOUT: %.loc15_20: type = interface_type @As, @As(constants.%X) [template = constants.%.8] +// CHECK:STDOUT: %As.type: type = interface_type @As, @As(constants.%X) [template = constants.%As.type.3] // CHECK:STDOUT: } // CHECK:STDOUT: impl_decl @impl.2 [template] {} { // CHECK:STDOUT: %X.ref: type = name_ref X, file.%X.decl [template = constants.%X] // CHECK:STDOUT: %Core.ref: = name_ref Core, imports.%Core [template = imports.%Core] -// CHECK:STDOUT: %As.ref: %As.type = name_ref As, imports.%import_ref.2 [template = constants.%As] +// CHECK:STDOUT: %As.ref: %As.type.1 = name_ref As, imports.%import_ref.2 [template = constants.%As] // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc19_18.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc19_18.2: type = converted %int.make_type_32, %.loc19_18.1 [template = i32] -// CHECK:STDOUT: %.loc19_18.3: type = interface_type @As, @As(i32) [template = constants.%.13] +// CHECK:STDOUT: %As.type: type = interface_type @As, @As(i32) [template = constants.%As.type.4] // CHECK:STDOUT: } // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc23_8.1: type = value_of_initializer %int.make_type_32 [template = i32] @@ -121,12 +121,12 @@ let n: i32 = ((4 as i32) as X) as i32; // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic = %Dest (constants.%Dest)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.1: type = interface_type @As, @As(%Dest) [symbolic = %.1 (constants.%.5)] -// CHECK:STDOUT: %Self: %.5 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] +// CHECK:STDOUT: %As.type: type = interface_type @As, @As(%Dest) [symbolic = %As.type (constants.%As.type.2)] +// CHECK:STDOUT: %Self: %As.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.1, @As(%Dest) [symbolic = %Convert.type (constants.%Convert.type.1)] // CHECK:STDOUT: %Convert: @As.%Convert.type (%Convert.type.1) = struct_value () [symbolic = %Convert (constants.%Convert.1)] -// CHECK:STDOUT: %.2: type = assoc_entity_type @As.%.1 (%.5), @As.%Convert.type (%Convert.type.1) [symbolic = %.2 (constants.%.6)] -// CHECK:STDOUT: %.3: @As.%.2 (%.6) = assoc_entity element0, imports.%import_ref.6 [symbolic = %.3 (constants.%.7)] +// CHECK:STDOUT: %.1: type = assoc_entity_type @As.%As.type (%As.type.2), @As.%Convert.type (%Convert.type.1) [symbolic = %.1 (constants.%.5)] +// CHECK:STDOUT: %.2: @As.%.1 (%.5) = assoc_entity element0, imports.%import_ref.6 [symbolic = %.2 (constants.%.6)] // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: !members: @@ -136,7 +136,7 @@ let n: i32 = ((4 as i32) as X) as i32; // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: impl @impl.1: %.loc15_6.2 as %.loc15_20 { +// CHECK:STDOUT: impl @impl.1: %.loc15_6.2 as %As.type { // CHECK:STDOUT: %Convert.decl: %Convert.type.2 = fn_decl @Convert.2 [template = constants.%Convert.2] { // CHECK:STDOUT: %self.patt: i32 = binding_pattern self // CHECK:STDOUT: } { @@ -148,14 +148,14 @@ let n: i32 = ((4 as i32) as X) as i32; // CHECK:STDOUT: %X.ref: type = name_ref X, file.%X.decl [template = constants.%X] // CHECK:STDOUT: %return: ref %X = var // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc15_24: = interface_witness (%Convert.decl) [template = constants.%.11] +// CHECK:STDOUT: %.loc15_24: = interface_witness (%Convert.decl) [template = constants.%.9] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Convert = %Convert.decl // CHECK:STDOUT: witness = %.loc15_24 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: impl @impl.2: %X.ref as %.loc19_18.3 { +// CHECK:STDOUT: impl @impl.2: %X.ref as %As.type { // CHECK:STDOUT: %Convert.decl: %Convert.type.4 = fn_decl @Convert.3 [template = constants.%Convert.4] { // CHECK:STDOUT: %self.patt: %X = binding_pattern self // CHECK:STDOUT: } { @@ -167,7 +167,7 @@ let n: i32 = ((4 as i32) as X) as i32; // CHECK:STDOUT: %.loc20_28.2: type = converted %int.make_type_32, %.loc20_28.1 [template = i32] // CHECK:STDOUT: %return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc19_24: = interface_witness (%Convert.decl) [template = constants.%.16] +// CHECK:STDOUT: %.loc19_24: = interface_witness (%Convert.decl) [template = constants.%.13] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Convert = %Convert.decl @@ -188,10 +188,10 @@ let n: i32 = ((4 as i32) as X) as i32; // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32"; // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @Convert.1(constants.%Dest: type, constants.%Self.1: @As.%.1 (%.5)) { +// CHECK:STDOUT: generic fn @Convert.1(constants.%Dest: type, constants.%Self.1: @As.%As.type (%As.type.2)) { // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic = %Dest (constants.%Dest)] -// CHECK:STDOUT: %.1: type = interface_type @As, @As(%Dest) [symbolic = %.1 (constants.%.5)] -// CHECK:STDOUT: %Self: %.5 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] +// CHECK:STDOUT: %As.type: type = interface_type @As, @As(%Dest) [symbolic = %As.type (constants.%As.type.2)] +// CHECK:STDOUT: %Self: %As.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] // CHECK:STDOUT: // CHECK:STDOUT: fn[%self: @Convert.1.%Self (%Self.2)]() -> @Convert.1.%Dest (%Dest); // CHECK:STDOUT: } @@ -218,33 +218,33 @@ let n: i32 = ((4 as i32) as X) as i32; // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc23_16: i32 = int_literal 4 [template = constants.%.17] +// CHECK:STDOUT: %.loc23_16: i32 = int_literal 4 [template = constants.%.14] // CHECK:STDOUT: %int.make_type_32.loc23_21: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc23_21.1: type = value_of_initializer %int.make_type_32.loc23_21 [template = i32] // CHECK:STDOUT: %.loc23_21.2: type = converted %int.make_type_32.loc23_21, %.loc23_21.1 [template = i32] // CHECK:STDOUT: %X.ref: type = name_ref X, file.%X.decl [template = constants.%X] -// CHECK:STDOUT: %.loc23_26.1: type = interface_type @As, @As(constants.%X) [template = constants.%.8] -// CHECK:STDOUT: %.loc23_26.2: %.9 = specific_constant imports.%import_ref.4, @As(constants.%X) [template = constants.%.10] -// CHECK:STDOUT: %Convert.ref.loc23_26: %.9 = name_ref Convert, %.loc23_26.2 [template = constants.%.10] -// CHECK:STDOUT: %.loc23_26.3: %Convert.type.3 = interface_witness_access constants.%.11, element0 [template = constants.%Convert.2] -// CHECK:STDOUT: %.loc23_26.4: = bound_method %.loc23_16, %.loc23_26.3 [template = constants.%.19] -// CHECK:STDOUT: %.loc23_26.5: ref %X = temporary_storage -// CHECK:STDOUT: %Convert.call.loc23_26: init %X = call %.loc23_26.4(%.loc23_16) to %.loc23_26.5 -// CHECK:STDOUT: %.loc23_26.6: init %X = converted %.loc23_16, %Convert.call.loc23_26 +// CHECK:STDOUT: %As.type.loc23_26: type = interface_type @As, @As(constants.%X) [template = constants.%As.type.3] +// CHECK:STDOUT: %.loc23_26.1: %.7 = specific_constant imports.%import_ref.4, @As(constants.%X) [template = constants.%.8] +// CHECK:STDOUT: %Convert.ref.loc23_26: %.7 = name_ref Convert, %.loc23_26.1 [template = constants.%.8] +// CHECK:STDOUT: %.loc23_26.2: %Convert.type.3 = interface_witness_access constants.%.9, element0 [template = constants.%Convert.2] +// CHECK:STDOUT: %.loc23_26.3: = bound_method %.loc23_16, %.loc23_26.2 [template = constants.%.16] +// CHECK:STDOUT: %.loc23_26.4: ref %X = temporary_storage +// CHECK:STDOUT: %Convert.call.loc23_26: init %X = call %.loc23_26.3(%.loc23_16) to %.loc23_26.4 +// CHECK:STDOUT: %.loc23_26.5: init %X = converted %.loc23_16, %Convert.call.loc23_26 // CHECK:STDOUT: %int.make_type_32.loc23_35: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc23_35.1: type = value_of_initializer %int.make_type_32.loc23_35 [template = i32] // CHECK:STDOUT: %.loc23_35.2: type = converted %int.make_type_32.loc23_35, %.loc23_35.1 [template = i32] -// CHECK:STDOUT: %.loc23_32.1: type = interface_type @As, @As(i32) [template = constants.%.13] -// CHECK:STDOUT: %.loc23_32.2: %.14 = specific_constant imports.%import_ref.4, @As(i32) [template = constants.%.15] -// CHECK:STDOUT: %Convert.ref.loc23_32: %.14 = name_ref Convert, %.loc23_32.2 [template = constants.%.15] -// CHECK:STDOUT: %.loc23_26.7: ref %X = temporary %.loc23_26.5, %.loc23_26.6 -// CHECK:STDOUT: %.loc23_32.3: %Convert.type.5 = interface_witness_access constants.%.16, element0 [template = constants.%Convert.4] -// CHECK:STDOUT: %.loc23_32.4: = bound_method %.loc23_26.7, %.loc23_32.3 -// CHECK:STDOUT: %.loc23_26.8: %X = bind_value %.loc23_26.7 -// CHECK:STDOUT: %Convert.call.loc23_32: init i32 = call %.loc23_32.4(%.loc23_26.8) -// CHECK:STDOUT: %.loc23_32.5: init i32 = converted %.loc23_26.6, %Convert.call.loc23_32 -// CHECK:STDOUT: %.loc23_38.1: i32 = value_of_initializer %.loc23_32.5 -// CHECK:STDOUT: %.loc23_38.2: i32 = converted %.loc23_32.5, %.loc23_38.1 +// CHECK:STDOUT: %As.type.loc23_32: type = interface_type @As, @As(i32) [template = constants.%As.type.4] +// CHECK:STDOUT: %.loc23_32.1: %.11 = specific_constant imports.%import_ref.4, @As(i32) [template = constants.%.12] +// CHECK:STDOUT: %Convert.ref.loc23_32: %.11 = name_ref Convert, %.loc23_32.1 [template = constants.%.12] +// CHECK:STDOUT: %.loc23_26.6: ref %X = temporary %.loc23_26.4, %.loc23_26.5 +// CHECK:STDOUT: %.loc23_32.2: %Convert.type.5 = interface_witness_access constants.%.13, element0 [template = constants.%Convert.4] +// CHECK:STDOUT: %.loc23_32.3: = bound_method %.loc23_26.6, %.loc23_32.2 +// CHECK:STDOUT: %.loc23_26.7: %X = bind_value %.loc23_26.6 +// CHECK:STDOUT: %Convert.call.loc23_32: init i32 = call %.loc23_32.3(%.loc23_26.7) +// CHECK:STDOUT: %.loc23_32.4: init i32 = converted %.loc23_26.5, %Convert.call.loc23_32 +// CHECK:STDOUT: %.loc23_38.1: i32 = value_of_initializer %.loc23_32.4 +// CHECK:STDOUT: %.loc23_38.2: i32 = converted %.loc23_32.4, %.loc23_38.1 // CHECK:STDOUT: %n: i32 = bind_name n, %.loc23_38.2 // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -263,7 +263,7 @@ let n: i32 = ((4 as i32) as X) as i32; // CHECK:STDOUT: // CHECK:STDOUT: specific @Convert.1(constants.%Dest, constants.%Self.1) { // CHECK:STDOUT: %Dest => constants.%Dest -// CHECK:STDOUT: %.1 => constants.%.5 +// CHECK:STDOUT: %As.type => constants.%As.type.2 // CHECK:STDOUT: %Self => constants.%Self.1 // CHECK:STDOUT: } // CHECK:STDOUT: @@ -271,17 +271,17 @@ let n: i32 = ((4 as i32) as X) as i32; // CHECK:STDOUT: %Dest => constants.%X // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.1 => constants.%.8 +// CHECK:STDOUT: %As.type => constants.%As.type.3 // CHECK:STDOUT: %Self => constants.%Self.2 // CHECK:STDOUT: %Convert.type => constants.%Convert.type.3 // CHECK:STDOUT: %Convert => constants.%Convert.3 -// CHECK:STDOUT: %.2 => constants.%.9 -// CHECK:STDOUT: %.3 => constants.%.10 +// CHECK:STDOUT: %.1 => constants.%.7 +// CHECK:STDOUT: %.2 => constants.%.8 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Convert.1(constants.%X, i32) { // CHECK:STDOUT: %Dest => constants.%X -// CHECK:STDOUT: %.1 => constants.%.8 +// CHECK:STDOUT: %As.type => constants.%As.type.3 // CHECK:STDOUT: %Self => i32 // CHECK:STDOUT: } // CHECK:STDOUT: @@ -289,17 +289,17 @@ let n: i32 = ((4 as i32) as X) as i32; // CHECK:STDOUT: %Dest => i32 // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.1 => constants.%.13 +// CHECK:STDOUT: %As.type => constants.%As.type.4 // CHECK:STDOUT: %Self => constants.%Self.2 // CHECK:STDOUT: %Convert.type => constants.%Convert.type.5 // CHECK:STDOUT: %Convert => constants.%Convert.5 -// CHECK:STDOUT: %.2 => constants.%.14 -// CHECK:STDOUT: %.3 => constants.%.15 +// CHECK:STDOUT: %.1 => constants.%.11 +// CHECK:STDOUT: %.2 => constants.%.12 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Convert.1(i32, constants.%X) { // CHECK:STDOUT: %Dest => i32 -// CHECK:STDOUT: %.1 => constants.%.13 +// CHECK:STDOUT: %As.type => constants.%As.type.4 // CHECK:STDOUT: %Self => constants.%X // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/basics/fail_non_type_as_type.carbon b/toolchain/check/testdata/basics/fail_non_type_as_type.carbon index 7eb23375bd0dd..20a874536f596 100644 --- a/toolchain/check/testdata/basics/fail_non_type_as_type.carbon +++ b/toolchain/check/testdata/basics/fail_non_type_as_type.carbon @@ -20,23 +20,23 @@ var x: type = 42; // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %.1: i32 = int_literal 42 [template] -// CHECK:STDOUT: %ImplicitAs.type: type = generic_interface_type @ImplicitAs [template] +// CHECK:STDOUT: %ImplicitAs.type.1: type = generic_interface_type @ImplicitAs [template] // CHECK:STDOUT: %.2: type = tuple_type () [template] -// CHECK:STDOUT: %ImplicitAs: %ImplicitAs.type = struct_value () [template] +// CHECK:STDOUT: %ImplicitAs: %ImplicitAs.type.1 = struct_value () [template] // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic] -// CHECK:STDOUT: %.3: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic] -// CHECK:STDOUT: %Self.1: @ImplicitAs.%.1 (%.3) = bind_symbolic_name Self, 1 [symbolic] -// CHECK:STDOUT: %Self.2: %.3 = bind_symbolic_name Self, 1 [symbolic] +// CHECK:STDOUT: %ImplicitAs.type.2: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic] +// CHECK:STDOUT: %Self.1: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2) = bind_symbolic_name Self, 1 [symbolic] +// CHECK:STDOUT: %Self.2: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: %Convert.type.1: type = fn_type @Convert, @ImplicitAs(%Dest) [symbolic] // CHECK:STDOUT: %Convert.1: %Convert.type.1 = struct_value () [symbolic] -// CHECK:STDOUT: %.4: type = assoc_entity_type %.3, %Convert.type.1 [symbolic] -// CHECK:STDOUT: %.5: %.4 = assoc_entity element0, imports.%import_ref.5 [symbolic] -// CHECK:STDOUT: %.6: type = interface_type @ImplicitAs, @ImplicitAs(type) [template] +// CHECK:STDOUT: %.3: type = assoc_entity_type %ImplicitAs.type.2, %Convert.type.1 [symbolic] +// CHECK:STDOUT: %.4: %.3 = assoc_entity element0, imports.%import_ref.5 [symbolic] +// CHECK:STDOUT: %ImplicitAs.type.3: type = interface_type @ImplicitAs, @ImplicitAs(type) [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert, @ImplicitAs(type) [template] // CHECK:STDOUT: %Convert.2: %Convert.type.2 = struct_value () [template] -// CHECK:STDOUT: %.7: type = assoc_entity_type %.6, %Convert.type.2 [template] -// CHECK:STDOUT: %.8: %.7 = assoc_entity element0, imports.%import_ref.5 [template] -// CHECK:STDOUT: %.9: %.4 = assoc_entity element0, imports.%import_ref.6 [symbolic] +// CHECK:STDOUT: %.5: type = assoc_entity_type %ImplicitAs.type.3, %Convert.type.2 [template] +// CHECK:STDOUT: %.6: %.5 = assoc_entity element0, imports.%import_ref.5 [template] +// CHECK:STDOUT: %.7: %.3 = assoc_entity element0, imports.%import_ref.6 [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -51,9 +51,9 @@ var x: type = 42; // CHECK:STDOUT: import Core//prelude/operators/comparison // CHECK:STDOUT: import Core//prelude/types/bool // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.1: %ImplicitAs.type = import_ref Core//prelude/operators/as, inst+40, loaded [template = constants.%ImplicitAs] +// CHECK:STDOUT: %import_ref.1: %ImplicitAs.type.1 = import_ref Core//prelude/operators/as, inst+40, loaded [template = constants.%ImplicitAs] // CHECK:STDOUT: %import_ref.2 = import_ref Core//prelude/operators/as, inst+45, unloaded -// CHECK:STDOUT: %import_ref.3: @ImplicitAs.%.2 (%.4) = import_ref Core//prelude/operators/as, inst+63, loaded [symbolic = @ImplicitAs.%.3 (constants.%.9)] +// CHECK:STDOUT: %import_ref.3: @ImplicitAs.%.1 (%.3) = import_ref Core//prelude/operators/as, inst+63, loaded [symbolic = @ImplicitAs.%.2 (constants.%.7)] // CHECK:STDOUT: %import_ref.4 = import_ref Core//prelude/operators/as, inst+56, unloaded // CHECK:STDOUT: %import_ref.5 = import_ref Core//prelude/operators/as, inst+56, unloaded // CHECK:STDOUT: %import_ref.6 = import_ref Core//prelude/operators/as, inst+56, unloaded @@ -73,12 +73,12 @@ var x: type = 42; // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic = %Dest (constants.%Dest)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.1: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic = %.1 (constants.%.3)] -// CHECK:STDOUT: %Self: %.3 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] +// CHECK:STDOUT: %ImplicitAs.type: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.2)] +// CHECK:STDOUT: %Self: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] // CHECK:STDOUT: %Convert.type: type = fn_type @Convert, @ImplicitAs(%Dest) [symbolic = %Convert.type (constants.%Convert.type.1)] // CHECK:STDOUT: %Convert: @ImplicitAs.%Convert.type (%Convert.type.1) = struct_value () [symbolic = %Convert (constants.%Convert.1)] -// CHECK:STDOUT: %.2: type = assoc_entity_type @ImplicitAs.%.1 (%.3), @ImplicitAs.%Convert.type (%Convert.type.1) [symbolic = %.2 (constants.%.4)] -// CHECK:STDOUT: %.3: @ImplicitAs.%.2 (%.4) = assoc_entity element0, imports.%import_ref.5 [symbolic = %.3 (constants.%.5)] +// CHECK:STDOUT: %.1: type = assoc_entity_type @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2), @ImplicitAs.%Convert.type (%Convert.type.1) [symbolic = %.1 (constants.%.3)] +// CHECK:STDOUT: %.2: @ImplicitAs.%.1 (%.3) = assoc_entity element0, imports.%import_ref.5 [symbolic = %.2 (constants.%.4)] // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: !members: @@ -88,10 +88,10 @@ var x: type = 42; // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @Convert(constants.%Dest: type, constants.%Self.1: @ImplicitAs.%.1 (%.3)) { +// CHECK:STDOUT: generic fn @Convert(constants.%Dest: type, constants.%Self.1: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2)) { // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic = %Dest (constants.%Dest)] -// CHECK:STDOUT: %.1: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic = %.1 (constants.%.3)] -// CHECK:STDOUT: %Self: %.3 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] +// CHECK:STDOUT: %ImplicitAs.type: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.2)] +// CHECK:STDOUT: %Self: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] // CHECK:STDOUT: // CHECK:STDOUT: fn[%self: @Convert.%Self (%Self.2)]() -> @Convert.%Dest (%Dest); // CHECK:STDOUT: } @@ -99,10 +99,10 @@ var x: type = 42; // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %.loc17_15: i32 = int_literal 42 [template = constants.%.1] -// CHECK:STDOUT: %.loc17_17.1: type = interface_type @ImplicitAs, @ImplicitAs(type) [template = constants.%.6] -// CHECK:STDOUT: %.loc17_17.2: %.7 = specific_constant imports.%import_ref.3, @ImplicitAs(type) [template = constants.%.8] -// CHECK:STDOUT: %Convert.ref: %.7 = name_ref Convert, %.loc17_17.2 [template = constants.%.8] -// CHECK:STDOUT: %.loc17_17.3: type = converted %.loc17_15, [template = ] +// CHECK:STDOUT: %ImplicitAs.type: type = interface_type @ImplicitAs, @ImplicitAs(type) [template = constants.%ImplicitAs.type.3] +// CHECK:STDOUT: %.loc17_17.1: %.5 = specific_constant imports.%import_ref.3, @ImplicitAs(type) [template = constants.%.6] +// CHECK:STDOUT: %Convert.ref: %.5 = name_ref Convert, %.loc17_17.1 [template = constants.%.6] +// CHECK:STDOUT: %.loc17_17.2: type = converted %.loc17_15, [template = ] // CHECK:STDOUT: assign file.%x.var, // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -121,7 +121,7 @@ var x: type = 42; // CHECK:STDOUT: // CHECK:STDOUT: specific @Convert(constants.%Dest, constants.%Self.1) { // CHECK:STDOUT: %Dest => constants.%Dest -// CHECK:STDOUT: %.1 => constants.%.3 +// CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.2 // CHECK:STDOUT: %Self => constants.%Self.1 // CHECK:STDOUT: } // CHECK:STDOUT: @@ -129,11 +129,11 @@ var x: type = 42; // CHECK:STDOUT: %Dest => type // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.1 => constants.%.6 +// CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.3 // CHECK:STDOUT: %Self => constants.%Self.2 // CHECK:STDOUT: %Convert.type => constants.%Convert.type.2 // CHECK:STDOUT: %Convert => constants.%Convert.2 -// CHECK:STDOUT: %.2 => constants.%.7 -// CHECK:STDOUT: %.3 => constants.%.8 +// CHECK:STDOUT: %.1 => constants.%.5 +// CHECK:STDOUT: %.2 => constants.%.6 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/extend_adapt.carbon b/toolchain/check/testdata/class/extend_adapt.carbon index 9c8db8e1f74d4..55dc2469f62fa 100644 --- a/toolchain/check/testdata/class/extend_adapt.carbon +++ b/toolchain/check/testdata/class/extend_adapt.carbon @@ -236,22 +236,22 @@ class StructAdapter { // CHECK:STDOUT: %.5: = complete_type_witness %SomeClass [template] // CHECK:STDOUT: %F.type.2: type = fn_type @F.2 [template] // CHECK:STDOUT: %F.2: %F.type.2 = struct_value () [template] -// CHECK:STDOUT: %ImplicitAs.type: type = generic_interface_type @ImplicitAs [template] -// CHECK:STDOUT: %ImplicitAs: %ImplicitAs.type = struct_value () [template] +// CHECK:STDOUT: %ImplicitAs.type.1: type = generic_interface_type @ImplicitAs [template] +// CHECK:STDOUT: %ImplicitAs: %ImplicitAs.type.1 = struct_value () [template] // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic] -// CHECK:STDOUT: %.6: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic] -// CHECK:STDOUT: %Self.1: @ImplicitAs.%.1 (%.6) = bind_symbolic_name Self, 1 [symbolic] -// CHECK:STDOUT: %Self.2: %.6 = bind_symbolic_name Self, 1 [symbolic] +// CHECK:STDOUT: %ImplicitAs.type.2: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic] +// CHECK:STDOUT: %Self.1: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2) = bind_symbolic_name Self, 1 [symbolic] +// CHECK:STDOUT: %Self.2: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: %Convert.type.1: type = fn_type @Convert, @ImplicitAs(%Dest) [symbolic] // CHECK:STDOUT: %Convert.1: %Convert.type.1 = struct_value () [symbolic] -// CHECK:STDOUT: %.7: type = assoc_entity_type %.6, %Convert.type.1 [symbolic] -// CHECK:STDOUT: %.8: %.7 = assoc_entity element0, imports.%import_ref.5 [symbolic] -// CHECK:STDOUT: %.9: type = interface_type @ImplicitAs, @ImplicitAs(%SomeClass) [template] +// CHECK:STDOUT: %.6: type = assoc_entity_type %ImplicitAs.type.2, %Convert.type.1 [symbolic] +// CHECK:STDOUT: %.7: %.6 = assoc_entity element0, imports.%import_ref.5 [symbolic] +// CHECK:STDOUT: %ImplicitAs.type.3: type = interface_type @ImplicitAs, @ImplicitAs(%SomeClass) [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert, @ImplicitAs(%SomeClass) [template] // CHECK:STDOUT: %Convert.2: %Convert.type.2 = struct_value () [template] -// CHECK:STDOUT: %.10: type = assoc_entity_type %.9, %Convert.type.2 [template] -// CHECK:STDOUT: %.11: %.10 = assoc_entity element0, imports.%import_ref.5 [template] -// CHECK:STDOUT: %.12: %.7 = assoc_entity element0, imports.%import_ref.6 [symbolic] +// CHECK:STDOUT: %.8: type = assoc_entity_type %ImplicitAs.type.3, %Convert.type.2 [template] +// CHECK:STDOUT: %.9: %.8 = assoc_entity element0, imports.%import_ref.5 [template] +// CHECK:STDOUT: %.10: %.6 = assoc_entity element0, imports.%import_ref.6 [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -266,9 +266,9 @@ class StructAdapter { // CHECK:STDOUT: import Core//prelude/operators/comparison // CHECK:STDOUT: import Core//prelude/types/bool // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.1: %ImplicitAs.type = import_ref Core//prelude/operators/as, inst+40, loaded [template = constants.%ImplicitAs] +// CHECK:STDOUT: %import_ref.1: %ImplicitAs.type.1 = import_ref Core//prelude/operators/as, inst+40, loaded [template = constants.%ImplicitAs] // CHECK:STDOUT: %import_ref.2 = import_ref Core//prelude/operators/as, inst+45, unloaded -// CHECK:STDOUT: %import_ref.3: @ImplicitAs.%.2 (%.7) = import_ref Core//prelude/operators/as, inst+63, loaded [symbolic = @ImplicitAs.%.3 (constants.%.12)] +// CHECK:STDOUT: %import_ref.3: @ImplicitAs.%.1 (%.6) = import_ref Core//prelude/operators/as, inst+63, loaded [symbolic = @ImplicitAs.%.2 (constants.%.10)] // CHECK:STDOUT: %import_ref.4 = import_ref Core//prelude/operators/as, inst+56, unloaded // CHECK:STDOUT: %import_ref.5 = import_ref Core//prelude/operators/as, inst+56, unloaded // CHECK:STDOUT: %import_ref.6 = import_ref Core//prelude/operators/as, inst+56, unloaded @@ -297,12 +297,12 @@ class StructAdapter { // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic = %Dest (constants.%Dest)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.1: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic = %.1 (constants.%.6)] -// CHECK:STDOUT: %Self: %.6 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] +// CHECK:STDOUT: %ImplicitAs.type: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.2)] +// CHECK:STDOUT: %Self: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] // CHECK:STDOUT: %Convert.type: type = fn_type @Convert, @ImplicitAs(%Dest) [symbolic = %Convert.type (constants.%Convert.type.1)] // CHECK:STDOUT: %Convert: @ImplicitAs.%Convert.type (%Convert.type.1) = struct_value () [symbolic = %Convert (constants.%Convert.1)] -// CHECK:STDOUT: %.2: type = assoc_entity_type @ImplicitAs.%.1 (%.6), @ImplicitAs.%Convert.type (%Convert.type.1) [symbolic = %.2 (constants.%.7)] -// CHECK:STDOUT: %.3: @ImplicitAs.%.2 (%.7) = assoc_entity element0, imports.%import_ref.5 [symbolic = %.3 (constants.%.8)] +// CHECK:STDOUT: %.1: type = assoc_entity_type @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2), @ImplicitAs.%Convert.type (%Convert.type.1) [symbolic = %.1 (constants.%.6)] +// CHECK:STDOUT: %.2: @ImplicitAs.%.1 (%.6) = assoc_entity element0, imports.%import_ref.5 [symbolic = %.2 (constants.%.7)] // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: !members: @@ -344,18 +344,18 @@ class StructAdapter { // CHECK:STDOUT: %a.ref: %SomeClassAdapter = name_ref a, %a // CHECK:STDOUT: %F.ref: %F.type.1 = name_ref F, @SomeClass.%F.decl [template = constants.%F.1] // CHECK:STDOUT: %.loc23_4: = bound_method %a.ref, %F.ref -// CHECK:STDOUT: %.loc23_6.1: type = interface_type @ImplicitAs, @ImplicitAs(constants.%SomeClass) [template = constants.%.9] -// CHECK:STDOUT: %.loc23_6.2: %.10 = specific_constant imports.%import_ref.3, @ImplicitAs(constants.%SomeClass) [template = constants.%.11] -// CHECK:STDOUT: %Convert.ref: %.10 = name_ref Convert, %.loc23_6.2 [template = constants.%.11] -// CHECK:STDOUT: %.loc23_6.3: %SomeClass = converted %a.ref, [template = ] +// CHECK:STDOUT: %ImplicitAs.type: type = interface_type @ImplicitAs, @ImplicitAs(constants.%SomeClass) [template = constants.%ImplicitAs.type.3] +// CHECK:STDOUT: %.loc23_6.1: %.8 = specific_constant imports.%import_ref.3, @ImplicitAs(constants.%SomeClass) [template = constants.%.9] +// CHECK:STDOUT: %Convert.ref: %.8 = name_ref Convert, %.loc23_6.1 [template = constants.%.9] +// CHECK:STDOUT: %.loc23_6.2: %SomeClass = converted %a.ref, [template = ] // CHECK:STDOUT: %F.call: init %.1 = call %.loc23_4() [template = ] // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @Convert(constants.%Dest: type, constants.%Self.1: @ImplicitAs.%.1 (%.6)) { +// CHECK:STDOUT: generic fn @Convert(constants.%Dest: type, constants.%Self.1: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2)) { // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic = %Dest (constants.%Dest)] -// CHECK:STDOUT: %.1: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic = %.1 (constants.%.6)] -// CHECK:STDOUT: %Self: %.6 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] +// CHECK:STDOUT: %ImplicitAs.type: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.2)] +// CHECK:STDOUT: %Self: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] // CHECK:STDOUT: // CHECK:STDOUT: fn[%self: @Convert.%Self (%Self.2)]() -> @Convert.%Dest (%Dest); // CHECK:STDOUT: } @@ -374,7 +374,7 @@ class StructAdapter { // CHECK:STDOUT: // CHECK:STDOUT: specific @Convert(constants.%Dest, constants.%Self.1) { // CHECK:STDOUT: %Dest => constants.%Dest -// CHECK:STDOUT: %.1 => constants.%.6 +// CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.2 // CHECK:STDOUT: %Self => constants.%Self.1 // CHECK:STDOUT: } // CHECK:STDOUT: @@ -382,12 +382,12 @@ class StructAdapter { // CHECK:STDOUT: %Dest => constants.%SomeClass // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.1 => constants.%.9 +// CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.3 // CHECK:STDOUT: %Self => constants.%Self.2 // CHECK:STDOUT: %Convert.type => constants.%Convert.type.2 // CHECK:STDOUT: %Convert => constants.%Convert.2 -// CHECK:STDOUT: %.2 => constants.%.10 -// CHECK:STDOUT: %.3 => constants.%.11 +// CHECK:STDOUT: %.1 => constants.%.8 +// CHECK:STDOUT: %.2 => constants.%.9 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- fail_todo_field_access.carbon @@ -405,22 +405,22 @@ class StructAdapter { // CHECK:STDOUT: %.6: = complete_type_witness %SomeClass [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %ImplicitAs.type: type = generic_interface_type @ImplicitAs [template] -// CHECK:STDOUT: %ImplicitAs: %ImplicitAs.type = struct_value () [template] +// CHECK:STDOUT: %ImplicitAs.type.1: type = generic_interface_type @ImplicitAs [template] +// CHECK:STDOUT: %ImplicitAs: %ImplicitAs.type.1 = struct_value () [template] // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic] -// CHECK:STDOUT: %.7: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic] -// CHECK:STDOUT: %Self.1: @ImplicitAs.%.1 (%.7) = bind_symbolic_name Self, 1 [symbolic] -// CHECK:STDOUT: %Self.2: %.7 = bind_symbolic_name Self, 1 [symbolic] +// CHECK:STDOUT: %ImplicitAs.type.2: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic] +// CHECK:STDOUT: %Self.1: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2) = bind_symbolic_name Self, 1 [symbolic] +// CHECK:STDOUT: %Self.2: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: %Convert.type.1: type = fn_type @Convert, @ImplicitAs(%Dest) [symbolic] // CHECK:STDOUT: %Convert.1: %Convert.type.1 = struct_value () [symbolic] -// CHECK:STDOUT: %.8: type = assoc_entity_type %.7, %Convert.type.1 [symbolic] -// CHECK:STDOUT: %.9: %.8 = assoc_entity element0, imports.%import_ref.6 [symbolic] -// CHECK:STDOUT: %.10: type = interface_type @ImplicitAs, @ImplicitAs(%SomeClass) [template] +// CHECK:STDOUT: %.7: type = assoc_entity_type %ImplicitAs.type.2, %Convert.type.1 [symbolic] +// CHECK:STDOUT: %.8: %.7 = assoc_entity element0, imports.%import_ref.6 [symbolic] +// CHECK:STDOUT: %ImplicitAs.type.3: type = interface_type @ImplicitAs, @ImplicitAs(%SomeClass) [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert, @ImplicitAs(%SomeClass) [template] // CHECK:STDOUT: %Convert.2: %Convert.type.2 = struct_value () [template] -// CHECK:STDOUT: %.11: type = assoc_entity_type %.10, %Convert.type.2 [template] -// CHECK:STDOUT: %.12: %.11 = assoc_entity element0, imports.%import_ref.6 [template] -// CHECK:STDOUT: %.13: %.8 = assoc_entity element0, imports.%import_ref.7 [symbolic] +// CHECK:STDOUT: %.9: type = assoc_entity_type %ImplicitAs.type.3, %Convert.type.2 [template] +// CHECK:STDOUT: %.10: %.9 = assoc_entity element0, imports.%import_ref.6 [template] +// CHECK:STDOUT: %.11: %.7 = assoc_entity element0, imports.%import_ref.7 [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -437,9 +437,9 @@ class StructAdapter { // CHECK:STDOUT: import Core//prelude/types/bool // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref Core//prelude/types, inst+4, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.2: %ImplicitAs.type = import_ref Core//prelude/operators/as, inst+40, loaded [template = constants.%ImplicitAs] +// CHECK:STDOUT: %import_ref.2: %ImplicitAs.type.1 = import_ref Core//prelude/operators/as, inst+40, loaded [template = constants.%ImplicitAs] // CHECK:STDOUT: %import_ref.3 = import_ref Core//prelude/operators/as, inst+45, unloaded -// CHECK:STDOUT: %import_ref.4: @ImplicitAs.%.2 (%.8) = import_ref Core//prelude/operators/as, inst+63, loaded [symbolic = @ImplicitAs.%.3 (constants.%.13)] +// CHECK:STDOUT: %import_ref.4: @ImplicitAs.%.1 (%.7) = import_ref Core//prelude/operators/as, inst+63, loaded [symbolic = @ImplicitAs.%.2 (constants.%.11)] // CHECK:STDOUT: %import_ref.5 = import_ref Core//prelude/operators/as, inst+56, unloaded // CHECK:STDOUT: %import_ref.6 = import_ref Core//prelude/operators/as, inst+56, unloaded // CHECK:STDOUT: %import_ref.7 = import_ref Core//prelude/operators/as, inst+56, unloaded @@ -472,12 +472,12 @@ class StructAdapter { // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic = %Dest (constants.%Dest)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.1: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic = %.1 (constants.%.7)] -// CHECK:STDOUT: %Self: %.7 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] +// CHECK:STDOUT: %ImplicitAs.type: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.2)] +// CHECK:STDOUT: %Self: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] // CHECK:STDOUT: %Convert.type: type = fn_type @Convert, @ImplicitAs(%Dest) [symbolic = %Convert.type (constants.%Convert.type.1)] // CHECK:STDOUT: %Convert: @ImplicitAs.%Convert.type (%Convert.type.1) = struct_value () [symbolic = %Convert (constants.%Convert.1)] -// CHECK:STDOUT: %.2: type = assoc_entity_type @ImplicitAs.%.1 (%.7), @ImplicitAs.%Convert.type (%Convert.type.1) [symbolic = %.2 (constants.%.8)] -// CHECK:STDOUT: %.3: @ImplicitAs.%.2 (%.8) = assoc_entity element0, imports.%import_ref.6 [symbolic = %.3 (constants.%.9)] +// CHECK:STDOUT: %.1: type = assoc_entity_type @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2), @ImplicitAs.%Convert.type (%Convert.type.1) [symbolic = %.1 (constants.%.7)] +// CHECK:STDOUT: %.2: @ImplicitAs.%.1 (%.7) = assoc_entity element0, imports.%import_ref.6 [symbolic = %.2 (constants.%.8)] // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: !members: @@ -520,18 +520,18 @@ class StructAdapter { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: %SomeClassAdapter = name_ref a, %a // CHECK:STDOUT: %b.ref: %.2 = name_ref b, @SomeClass.%.loc6_8 [template = @SomeClass.%.loc6_8] -// CHECK:STDOUT: %.loc21_11.1: type = interface_type @ImplicitAs, @ImplicitAs(constants.%SomeClass) [template = constants.%.10] -// CHECK:STDOUT: %.loc21_11.2: %.11 = specific_constant imports.%import_ref.4, @ImplicitAs(constants.%SomeClass) [template = constants.%.12] -// CHECK:STDOUT: %Convert.ref: %.11 = name_ref Convert, %.loc21_11.2 [template = constants.%.12] -// CHECK:STDOUT: %.loc21_11.3: %SomeClass = converted %a.ref, [template = ] -// CHECK:STDOUT: %.loc21_11.4: i32 = class_element_access , element1 [template = ] +// CHECK:STDOUT: %ImplicitAs.type: type = interface_type @ImplicitAs, @ImplicitAs(constants.%SomeClass) [template = constants.%ImplicitAs.type.3] +// CHECK:STDOUT: %.loc21_11.1: %.9 = specific_constant imports.%import_ref.4, @ImplicitAs(constants.%SomeClass) [template = constants.%.10] +// CHECK:STDOUT: %Convert.ref: %.9 = name_ref Convert, %.loc21_11.1 [template = constants.%.10] +// CHECK:STDOUT: %.loc21_11.2: %SomeClass = converted %a.ref, [template = ] +// CHECK:STDOUT: %.loc21_11.3: i32 = class_element_access , element1 [template = ] // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @Convert(constants.%Dest: type, constants.%Self.1: @ImplicitAs.%.1 (%.7)) { +// CHECK:STDOUT: generic fn @Convert(constants.%Dest: type, constants.%Self.1: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2)) { // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic = %Dest (constants.%Dest)] -// CHECK:STDOUT: %.1: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic = %.1 (constants.%.7)] -// CHECK:STDOUT: %Self: %.7 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] +// CHECK:STDOUT: %ImplicitAs.type: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.2)] +// CHECK:STDOUT: %Self: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] // CHECK:STDOUT: // CHECK:STDOUT: fn[%self: @Convert.%Self (%Self.2)]() -> @Convert.%Dest (%Dest); // CHECK:STDOUT: } @@ -550,7 +550,7 @@ class StructAdapter { // CHECK:STDOUT: // CHECK:STDOUT: specific @Convert(constants.%Dest, constants.%Self.1) { // CHECK:STDOUT: %Dest => constants.%Dest -// CHECK:STDOUT: %.1 => constants.%.7 +// CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.2 // CHECK:STDOUT: %Self => constants.%Self.1 // CHECK:STDOUT: } // CHECK:STDOUT: @@ -558,12 +558,12 @@ class StructAdapter { // CHECK:STDOUT: %Dest => constants.%SomeClass // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.1 => constants.%.10 +// CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.3 // CHECK:STDOUT: %Self => constants.%Self.2 // CHECK:STDOUT: %Convert.type => constants.%Convert.type.2 // CHECK:STDOUT: %Convert => constants.%Convert.2 -// CHECK:STDOUT: %.2 => constants.%.11 -// CHECK:STDOUT: %.3 => constants.%.12 +// CHECK:STDOUT: %.1 => constants.%.9 +// CHECK:STDOUT: %.2 => constants.%.10 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- fail_todo_adapt_non_class.carbon diff --git a/toolchain/check/testdata/class/fail_adapt_bad_decl.carbon b/toolchain/check/testdata/class/fail_adapt_bad_decl.carbon index 78d083fde79c4..46c76f75b4be3 100644 --- a/toolchain/check/testdata/class/fail_adapt_bad_decl.carbon +++ b/toolchain/check/testdata/class/fail_adapt_bad_decl.carbon @@ -107,23 +107,23 @@ class C { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Bad: type = class_type @Bad [template] // CHECK:STDOUT: %.1: i32 = int_literal 100 [template] -// CHECK:STDOUT: %ImplicitAs.type: type = generic_interface_type @ImplicitAs [template] +// CHECK:STDOUT: %ImplicitAs.type.1: type = generic_interface_type @ImplicitAs [template] // CHECK:STDOUT: %.2: type = tuple_type () [template] -// CHECK:STDOUT: %ImplicitAs: %ImplicitAs.type = struct_value () [template] +// CHECK:STDOUT: %ImplicitAs: %ImplicitAs.type.1 = struct_value () [template] // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic] -// CHECK:STDOUT: %.3: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic] -// CHECK:STDOUT: %Self.1: @ImplicitAs.%.1 (%.3) = bind_symbolic_name Self, 1 [symbolic] -// CHECK:STDOUT: %Self.2: %.3 = bind_symbolic_name Self, 1 [symbolic] +// CHECK:STDOUT: %ImplicitAs.type.2: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic] +// CHECK:STDOUT: %Self.1: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2) = bind_symbolic_name Self, 1 [symbolic] +// CHECK:STDOUT: %Self.2: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: %Convert.type.1: type = fn_type @Convert, @ImplicitAs(%Dest) [symbolic] // CHECK:STDOUT: %Convert.1: %Convert.type.1 = struct_value () [symbolic] -// CHECK:STDOUT: %.4: type = assoc_entity_type %.3, %Convert.type.1 [symbolic] -// CHECK:STDOUT: %.5: %.4 = assoc_entity element0, imports.%import_ref.5 [symbolic] -// CHECK:STDOUT: %.6: type = interface_type @ImplicitAs, @ImplicitAs(type) [template] +// CHECK:STDOUT: %.3: type = assoc_entity_type %ImplicitAs.type.2, %Convert.type.1 [symbolic] +// CHECK:STDOUT: %.4: %.3 = assoc_entity element0, imports.%import_ref.5 [symbolic] +// CHECK:STDOUT: %ImplicitAs.type.3: type = interface_type @ImplicitAs, @ImplicitAs(type) [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert, @ImplicitAs(type) [template] // CHECK:STDOUT: %Convert.2: %Convert.type.2 = struct_value () [template] -// CHECK:STDOUT: %.7: type = assoc_entity_type %.6, %Convert.type.2 [template] -// CHECK:STDOUT: %.8: %.7 = assoc_entity element0, imports.%import_ref.5 [template] -// CHECK:STDOUT: %.9: %.4 = assoc_entity element0, imports.%import_ref.6 [symbolic] +// CHECK:STDOUT: %.5: type = assoc_entity_type %ImplicitAs.type.3, %Convert.type.2 [template] +// CHECK:STDOUT: %.6: %.5 = assoc_entity element0, imports.%import_ref.5 [template] +// CHECK:STDOUT: %.7: %.3 = assoc_entity element0, imports.%import_ref.6 [symbolic] // CHECK:STDOUT: %Use.type: type = fn_type @Use [template] // CHECK:STDOUT: %Use: %Use.type = struct_value () [template] // CHECK:STDOUT: } @@ -140,9 +140,9 @@ class C { // CHECK:STDOUT: import Core//prelude/operators/comparison // CHECK:STDOUT: import Core//prelude/types/bool // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.1: %ImplicitAs.type = import_ref Core//prelude/operators/as, inst+40, loaded [template = constants.%ImplicitAs] +// CHECK:STDOUT: %import_ref.1: %ImplicitAs.type.1 = import_ref Core//prelude/operators/as, inst+40, loaded [template = constants.%ImplicitAs] // CHECK:STDOUT: %import_ref.2 = import_ref Core//prelude/operators/as, inst+45, unloaded -// CHECK:STDOUT: %import_ref.3: @ImplicitAs.%.2 (%.4) = import_ref Core//prelude/operators/as, inst+63, loaded [symbolic = @ImplicitAs.%.3 (constants.%.9)] +// CHECK:STDOUT: %import_ref.3: @ImplicitAs.%.1 (%.3) = import_ref Core//prelude/operators/as, inst+63, loaded [symbolic = @ImplicitAs.%.2 (constants.%.7)] // CHECK:STDOUT: %import_ref.4 = import_ref Core//prelude/operators/as, inst+56, unloaded // CHECK:STDOUT: %import_ref.5 = import_ref Core//prelude/operators/as, inst+56, unloaded // CHECK:STDOUT: %import_ref.6 = import_ref Core//prelude/operators/as, inst+56, unloaded @@ -169,12 +169,12 @@ class C { // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic = %Dest (constants.%Dest)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.1: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic = %.1 (constants.%.3)] -// CHECK:STDOUT: %Self: %.3 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] +// CHECK:STDOUT: %ImplicitAs.type: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.2)] +// CHECK:STDOUT: %Self: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] // CHECK:STDOUT: %Convert.type: type = fn_type @Convert, @ImplicitAs(%Dest) [symbolic = %Convert.type (constants.%Convert.type.1)] // CHECK:STDOUT: %Convert: @ImplicitAs.%Convert.type (%Convert.type.1) = struct_value () [symbolic = %Convert (constants.%Convert.1)] -// CHECK:STDOUT: %.2: type = assoc_entity_type @ImplicitAs.%.1 (%.3), @ImplicitAs.%Convert.type (%Convert.type.1) [symbolic = %.2 (constants.%.4)] -// CHECK:STDOUT: %.3: @ImplicitAs.%.2 (%.4) = assoc_entity element0, imports.%import_ref.5 [symbolic = %.3 (constants.%.5)] +// CHECK:STDOUT: %.1: type = assoc_entity_type @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2), @ImplicitAs.%Convert.type (%Convert.type.1) [symbolic = %.1 (constants.%.3)] +// CHECK:STDOUT: %.2: @ImplicitAs.%.1 (%.3) = assoc_entity element0, imports.%import_ref.5 [symbolic = %.2 (constants.%.4)] // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: !members: @@ -186,10 +186,10 @@ class C { // CHECK:STDOUT: // CHECK:STDOUT: class @Bad { // CHECK:STDOUT: %.loc12_9: i32 = int_literal 100 [template = constants.%.1] -// CHECK:STDOUT: %.loc12_12.1: type = interface_type @ImplicitAs, @ImplicitAs(type) [template = constants.%.6] -// CHECK:STDOUT: %.loc12_12.2: %.7 = specific_constant imports.%import_ref.3, @ImplicitAs(type) [template = constants.%.8] -// CHECK:STDOUT: %Convert.ref: %.7 = name_ref Convert, %.loc12_12.2 [template = constants.%.8] -// CHECK:STDOUT: %.loc12_12.3: type = converted %.loc12_9, [template = ] +// CHECK:STDOUT: %ImplicitAs.type: type = interface_type @ImplicitAs, @ImplicitAs(type) [template = constants.%ImplicitAs.type.3] +// CHECK:STDOUT: %.loc12_12.1: %.5 = specific_constant imports.%import_ref.3, @ImplicitAs(type) [template = constants.%.6] +// CHECK:STDOUT: %Convert.ref: %.5 = name_ref Convert, %.loc12_12.1 [template = constants.%.6] +// CHECK:STDOUT: %.loc12_12.2: type = converted %.loc12_9, [template = ] // CHECK:STDOUT: adapt_decl // CHECK:STDOUT: %.loc13: = complete_type_witness [template = ] // CHECK:STDOUT: @@ -197,10 +197,10 @@ class C { // CHECK:STDOUT: .Self = constants.%Bad // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @Convert(constants.%Dest: type, constants.%Self.1: @ImplicitAs.%.1 (%.3)) { +// CHECK:STDOUT: generic fn @Convert(constants.%Dest: type, constants.%Self.1: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2)) { // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic = %Dest (constants.%Dest)] -// CHECK:STDOUT: %.1: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic = %.1 (constants.%.3)] -// CHECK:STDOUT: %Self: %.3 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] +// CHECK:STDOUT: %ImplicitAs.type: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.2)] +// CHECK:STDOUT: %Self: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] // CHECK:STDOUT: // CHECK:STDOUT: fn[%self: @Convert.%Self (%Self.2)]() -> @Convert.%Dest (%Dest); // CHECK:STDOUT: } @@ -226,7 +226,7 @@ class C { // CHECK:STDOUT: // CHECK:STDOUT: specific @Convert(constants.%Dest, constants.%Self.1) { // CHECK:STDOUT: %Dest => constants.%Dest -// CHECK:STDOUT: %.1 => constants.%.3 +// CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.2 // CHECK:STDOUT: %Self => constants.%Self.1 // CHECK:STDOUT: } // CHECK:STDOUT: @@ -234,12 +234,12 @@ class C { // CHECK:STDOUT: %Dest => type // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.1 => constants.%.6 +// CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.3 // CHECK:STDOUT: %Self => constants.%Self.2 // CHECK:STDOUT: %Convert.type => constants.%Convert.type.2 // CHECK:STDOUT: %Convert => constants.%Convert.2 -// CHECK:STDOUT: %.2 => constants.%.7 -// CHECK:STDOUT: %.3 => constants.%.8 +// CHECK:STDOUT: %.1 => constants.%.5 +// CHECK:STDOUT: %.2 => constants.%.6 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- fail_extend_not_type.carbon @@ -247,23 +247,23 @@ class C { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Bad: type = class_type @Bad [template] // CHECK:STDOUT: %.1: i32 = int_literal 100 [template] -// CHECK:STDOUT: %ImplicitAs.type: type = generic_interface_type @ImplicitAs [template] +// CHECK:STDOUT: %ImplicitAs.type.1: type = generic_interface_type @ImplicitAs [template] // CHECK:STDOUT: %.2: type = tuple_type () [template] -// CHECK:STDOUT: %ImplicitAs: %ImplicitAs.type = struct_value () [template] +// CHECK:STDOUT: %ImplicitAs: %ImplicitAs.type.1 = struct_value () [template] // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic] -// CHECK:STDOUT: %.3: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic] -// CHECK:STDOUT: %Self.1: @ImplicitAs.%.1 (%.3) = bind_symbolic_name Self, 1 [symbolic] -// CHECK:STDOUT: %Self.2: %.3 = bind_symbolic_name Self, 1 [symbolic] +// CHECK:STDOUT: %ImplicitAs.type.2: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic] +// CHECK:STDOUT: %Self.1: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2) = bind_symbolic_name Self, 1 [symbolic] +// CHECK:STDOUT: %Self.2: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: %Convert.type.1: type = fn_type @Convert, @ImplicitAs(%Dest) [symbolic] // CHECK:STDOUT: %Convert.1: %Convert.type.1 = struct_value () [symbolic] -// CHECK:STDOUT: %.4: type = assoc_entity_type %.3, %Convert.type.1 [symbolic] -// CHECK:STDOUT: %.5: %.4 = assoc_entity element0, imports.%import_ref.5 [symbolic] -// CHECK:STDOUT: %.6: type = interface_type @ImplicitAs, @ImplicitAs(type) [template] +// CHECK:STDOUT: %.3: type = assoc_entity_type %ImplicitAs.type.2, %Convert.type.1 [symbolic] +// CHECK:STDOUT: %.4: %.3 = assoc_entity element0, imports.%import_ref.5 [symbolic] +// CHECK:STDOUT: %ImplicitAs.type.3: type = interface_type @ImplicitAs, @ImplicitAs(type) [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert, @ImplicitAs(type) [template] // CHECK:STDOUT: %Convert.2: %Convert.type.2 = struct_value () [template] -// CHECK:STDOUT: %.7: type = assoc_entity_type %.6, %Convert.type.2 [template] -// CHECK:STDOUT: %.8: %.7 = assoc_entity element0, imports.%import_ref.5 [template] -// CHECK:STDOUT: %.9: %.4 = assoc_entity element0, imports.%import_ref.6 [symbolic] +// CHECK:STDOUT: %.5: type = assoc_entity_type %ImplicitAs.type.3, %Convert.type.2 [template] +// CHECK:STDOUT: %.6: %.5 = assoc_entity element0, imports.%import_ref.5 [template] +// CHECK:STDOUT: %.7: %.3 = assoc_entity element0, imports.%import_ref.6 [symbolic] // CHECK:STDOUT: %Use.type: type = fn_type @Use [template] // CHECK:STDOUT: %Use: %Use.type = struct_value () [template] // CHECK:STDOUT: } @@ -280,9 +280,9 @@ class C { // CHECK:STDOUT: import Core//prelude/operators/comparison // CHECK:STDOUT: import Core//prelude/types/bool // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.1: %ImplicitAs.type = import_ref Core//prelude/operators/as, inst+40, loaded [template = constants.%ImplicitAs] +// CHECK:STDOUT: %import_ref.1: %ImplicitAs.type.1 = import_ref Core//prelude/operators/as, inst+40, loaded [template = constants.%ImplicitAs] // CHECK:STDOUT: %import_ref.2 = import_ref Core//prelude/operators/as, inst+45, unloaded -// CHECK:STDOUT: %import_ref.3: @ImplicitAs.%.2 (%.4) = import_ref Core//prelude/operators/as, inst+63, loaded [symbolic = @ImplicitAs.%.3 (constants.%.9)] +// CHECK:STDOUT: %import_ref.3: @ImplicitAs.%.1 (%.3) = import_ref Core//prelude/operators/as, inst+63, loaded [symbolic = @ImplicitAs.%.2 (constants.%.7)] // CHECK:STDOUT: %import_ref.4 = import_ref Core//prelude/operators/as, inst+56, unloaded // CHECK:STDOUT: %import_ref.5 = import_ref Core//prelude/operators/as, inst+56, unloaded // CHECK:STDOUT: %import_ref.6 = import_ref Core//prelude/operators/as, inst+56, unloaded @@ -309,12 +309,12 @@ class C { // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic = %Dest (constants.%Dest)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.1: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic = %.1 (constants.%.3)] -// CHECK:STDOUT: %Self: %.3 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] +// CHECK:STDOUT: %ImplicitAs.type: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.2)] +// CHECK:STDOUT: %Self: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] // CHECK:STDOUT: %Convert.type: type = fn_type @Convert, @ImplicitAs(%Dest) [symbolic = %Convert.type (constants.%Convert.type.1)] // CHECK:STDOUT: %Convert: @ImplicitAs.%Convert.type (%Convert.type.1) = struct_value () [symbolic = %Convert (constants.%Convert.1)] -// CHECK:STDOUT: %.2: type = assoc_entity_type @ImplicitAs.%.1 (%.3), @ImplicitAs.%Convert.type (%Convert.type.1) [symbolic = %.2 (constants.%.4)] -// CHECK:STDOUT: %.3: @ImplicitAs.%.2 (%.4) = assoc_entity element0, imports.%import_ref.5 [symbolic = %.3 (constants.%.5)] +// CHECK:STDOUT: %.1: type = assoc_entity_type @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2), @ImplicitAs.%Convert.type (%Convert.type.1) [symbolic = %.1 (constants.%.3)] +// CHECK:STDOUT: %.2: @ImplicitAs.%.1 (%.3) = assoc_entity element0, imports.%import_ref.5 [symbolic = %.2 (constants.%.4)] // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: !members: @@ -326,10 +326,10 @@ class C { // CHECK:STDOUT: // CHECK:STDOUT: class @Bad { // CHECK:STDOUT: %.loc12_16: i32 = int_literal 100 [template = constants.%.1] -// CHECK:STDOUT: %.loc12_19.1: type = interface_type @ImplicitAs, @ImplicitAs(type) [template = constants.%.6] -// CHECK:STDOUT: %.loc12_19.2: %.7 = specific_constant imports.%import_ref.3, @ImplicitAs(type) [template = constants.%.8] -// CHECK:STDOUT: %Convert.ref: %.7 = name_ref Convert, %.loc12_19.2 [template = constants.%.8] -// CHECK:STDOUT: %.loc12_19.3: type = converted %.loc12_16, [template = ] +// CHECK:STDOUT: %ImplicitAs.type: type = interface_type @ImplicitAs, @ImplicitAs(type) [template = constants.%ImplicitAs.type.3] +// CHECK:STDOUT: %.loc12_19.1: %.5 = specific_constant imports.%import_ref.3, @ImplicitAs(type) [template = constants.%.6] +// CHECK:STDOUT: %Convert.ref: %.5 = name_ref Convert, %.loc12_19.1 [template = constants.%.6] +// CHECK:STDOUT: %.loc12_19.2: type = converted %.loc12_16, [template = ] // CHECK:STDOUT: adapt_decl // CHECK:STDOUT: %.loc13: = complete_type_witness [template = ] // CHECK:STDOUT: @@ -338,10 +338,10 @@ class C { // CHECK:STDOUT: has_error // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @Convert(constants.%Dest: type, constants.%Self.1: @ImplicitAs.%.1 (%.3)) { +// CHECK:STDOUT: generic fn @Convert(constants.%Dest: type, constants.%Self.1: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2)) { // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic = %Dest (constants.%Dest)] -// CHECK:STDOUT: %.1: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic = %.1 (constants.%.3)] -// CHECK:STDOUT: %Self: %.3 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] +// CHECK:STDOUT: %ImplicitAs.type: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.2)] +// CHECK:STDOUT: %Self: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] // CHECK:STDOUT: // CHECK:STDOUT: fn[%self: @Convert.%Self (%Self.2)]() -> @Convert.%Dest (%Dest); // CHECK:STDOUT: } @@ -367,7 +367,7 @@ class C { // CHECK:STDOUT: // CHECK:STDOUT: specific @Convert(constants.%Dest, constants.%Self.1) { // CHECK:STDOUT: %Dest => constants.%Dest -// CHECK:STDOUT: %.1 => constants.%.3 +// CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.2 // CHECK:STDOUT: %Self => constants.%Self.1 // CHECK:STDOUT: } // CHECK:STDOUT: @@ -375,12 +375,12 @@ class C { // CHECK:STDOUT: %Dest => type // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.1 => constants.%.6 +// CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.3 // CHECK:STDOUT: %Self => constants.%Self.2 // CHECK:STDOUT: %Convert.type => constants.%Convert.type.2 // CHECK:STDOUT: %Convert => constants.%Convert.2 -// CHECK:STDOUT: %.2 => constants.%.7 -// CHECK:STDOUT: %.3 => constants.%.8 +// CHECK:STDOUT: %.1 => constants.%.5 +// CHECK:STDOUT: %.2 => constants.%.6 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- fail_repeated.carbon @@ -443,12 +443,12 @@ class C { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: type = interface_type @I.1 [template] -// CHECK:STDOUT: %Self.1: %.2 = bind_symbolic_name Self, 0 [symbolic] +// CHECK:STDOUT: %I.type.1: type = interface_type @I.1 [template] +// CHECK:STDOUT: %Self.1: %I.type.1 = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.3: type = interface_type @I.2 [template] -// CHECK:STDOUT: %Self.2: %.3 = bind_symbolic_name Self, 0 [symbolic] -// CHECK:STDOUT: %.4: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %I.type.2: type = interface_type @I.2 [template] +// CHECK:STDOUT: %Self.2: %I.type.2 = bind_symbolic_name Self, 0 [symbolic] +// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -472,12 +472,12 @@ class C { // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %.loc8: %.1 = struct_literal () -// CHECK:STDOUT: %I.decl: type = interface_decl @I.1 [template = constants.%.2] {} {} +// CHECK:STDOUT: %I.decl: type = interface_decl @I.1 [template = constants.%I.type.1] {} {} // CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {} {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @I.1 { -// CHECK:STDOUT: %Self: %.2 = bind_symbolic_name Self, 0 [symbolic = constants.%Self.1] +// CHECK:STDOUT: %Self: %I.type.1 = bind_symbolic_name Self, 0 [symbolic = constants.%Self.1] // CHECK:STDOUT: %.loc15: %.1 = struct_literal () // CHECK:STDOUT: // CHECK:STDOUT: !members: @@ -486,7 +486,7 @@ class C { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @I.2 { -// CHECK:STDOUT: %Self: %.3 = bind_symbolic_name Self, 0 [symbolic = constants.%Self.2] +// CHECK:STDOUT: %Self: %I.type.2 = bind_symbolic_name Self, 0 [symbolic = constants.%Self.2] // CHECK:STDOUT: %.loc23: %.1 = struct_literal () // CHECK:STDOUT: // CHECK:STDOUT: !members: @@ -495,8 +495,8 @@ class C { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { -// CHECK:STDOUT: %I.decl: type = interface_decl @I.2 [template = constants.%.3] {} {} -// CHECK:STDOUT: %.loc25: = complete_type_witness %.1 [template = constants.%.4] +// CHECK:STDOUT: %I.decl: type = interface_decl @I.2 [template = constants.%I.type.2] {} {} +// CHECK:STDOUT: %.loc25: = complete_type_witness %.1 [template = constants.%.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C diff --git a/toolchain/check/testdata/class/fail_addr_self.carbon b/toolchain/check/testdata/class/fail_addr_self.carbon index f81fd7d510908..19abf7921133c 100644 --- a/toolchain/check/testdata/class/fail_addr_self.carbon +++ b/toolchain/check/testdata/class/fail_addr_self.carbon @@ -62,22 +62,22 @@ fn F(c: Class, p: Class*) { // CHECK:STDOUT: %F.type.2: type = fn_type @F.2 [template] // CHECK:STDOUT: %F.2: %F.type.2 = struct_value () [template] // CHECK:STDOUT: %.5: type = ptr_type %.3 [template] -// CHECK:STDOUT: %ImplicitAs.type: type = generic_interface_type @ImplicitAs [template] -// CHECK:STDOUT: %ImplicitAs: %ImplicitAs.type = struct_value () [template] +// CHECK:STDOUT: %ImplicitAs.type.1: type = generic_interface_type @ImplicitAs [template] +// CHECK:STDOUT: %ImplicitAs: %ImplicitAs.type.1 = struct_value () [template] // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic] -// CHECK:STDOUT: %.6: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic] -// CHECK:STDOUT: %Self.1: @ImplicitAs.%.1 (%.6) = bind_symbolic_name Self, 1 [symbolic] -// CHECK:STDOUT: %Self.2: %.6 = bind_symbolic_name Self, 1 [symbolic] +// CHECK:STDOUT: %ImplicitAs.type.2: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic] +// CHECK:STDOUT: %Self.1: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2) = bind_symbolic_name Self, 1 [symbolic] +// CHECK:STDOUT: %Self.2: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: %Convert.type.1: type = fn_type @Convert, @ImplicitAs(%Dest) [symbolic] // CHECK:STDOUT: %Convert.1: %Convert.type.1 = struct_value () [symbolic] -// CHECK:STDOUT: %.7: type = assoc_entity_type %.6, %Convert.type.1 [symbolic] -// CHECK:STDOUT: %.8: %.7 = assoc_entity element0, imports.%import_ref.5 [symbolic] -// CHECK:STDOUT: %.9: type = interface_type @ImplicitAs, @ImplicitAs(%Class) [template] +// CHECK:STDOUT: %.6: type = assoc_entity_type %ImplicitAs.type.2, %Convert.type.1 [symbolic] +// CHECK:STDOUT: %.7: %.6 = assoc_entity element0, imports.%import_ref.5 [symbolic] +// CHECK:STDOUT: %ImplicitAs.type.3: type = interface_type @ImplicitAs, @ImplicitAs(%Class) [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert, @ImplicitAs(%Class) [template] // CHECK:STDOUT: %Convert.2: %Convert.type.2 = struct_value () [template] -// CHECK:STDOUT: %.10: type = assoc_entity_type %.9, %Convert.type.2 [template] -// CHECK:STDOUT: %.11: %.10 = assoc_entity element0, imports.%import_ref.5 [template] -// CHECK:STDOUT: %.12: %.7 = assoc_entity element0, imports.%import_ref.6 [symbolic] +// CHECK:STDOUT: %.8: type = assoc_entity_type %ImplicitAs.type.3, %Convert.type.2 [template] +// CHECK:STDOUT: %.9: %.8 = assoc_entity element0, imports.%import_ref.5 [template] +// CHECK:STDOUT: %.10: %.6 = assoc_entity element0, imports.%import_ref.6 [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -92,9 +92,9 @@ fn F(c: Class, p: Class*) { // CHECK:STDOUT: import Core//prelude/operators/comparison // CHECK:STDOUT: import Core//prelude/types/bool // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.1: %ImplicitAs.type = import_ref Core//prelude/operators/as, inst+40, loaded [template = constants.%ImplicitAs] +// CHECK:STDOUT: %import_ref.1: %ImplicitAs.type.1 = import_ref Core//prelude/operators/as, inst+40, loaded [template = constants.%ImplicitAs] // CHECK:STDOUT: %import_ref.2 = import_ref Core//prelude/operators/as, inst+45, unloaded -// CHECK:STDOUT: %import_ref.3: @ImplicitAs.%.2 (%.7) = import_ref Core//prelude/operators/as, inst+63, loaded [symbolic = @ImplicitAs.%.3 (constants.%.12)] +// CHECK:STDOUT: %import_ref.3: @ImplicitAs.%.1 (%.6) = import_ref Core//prelude/operators/as, inst+63, loaded [symbolic = @ImplicitAs.%.2 (constants.%.10)] // CHECK:STDOUT: %import_ref.4 = import_ref Core//prelude/operators/as, inst+56, unloaded // CHECK:STDOUT: %import_ref.5 = import_ref Core//prelude/operators/as, inst+56, unloaded // CHECK:STDOUT: %import_ref.6 = import_ref Core//prelude/operators/as, inst+56, unloaded @@ -126,12 +126,12 @@ fn F(c: Class, p: Class*) { // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic = %Dest (constants.%Dest)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.1: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic = %.1 (constants.%.6)] -// CHECK:STDOUT: %Self: %.6 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] +// CHECK:STDOUT: %ImplicitAs.type: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.2)] +// CHECK:STDOUT: %Self: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] // CHECK:STDOUT: %Convert.type: type = fn_type @Convert, @ImplicitAs(%Dest) [symbolic = %Convert.type (constants.%Convert.type.1)] // CHECK:STDOUT: %Convert: @ImplicitAs.%Convert.type (%Convert.type.1) = struct_value () [symbolic = %Convert (constants.%Convert.1)] -// CHECK:STDOUT: %.2: type = assoc_entity_type @ImplicitAs.%.1 (%.6), @ImplicitAs.%Convert.type (%Convert.type.1) [symbolic = %.2 (constants.%.7)] -// CHECK:STDOUT: %.3: @ImplicitAs.%.2 (%.7) = assoc_entity element0, imports.%import_ref.5 [symbolic = %.3 (constants.%.8)] +// CHECK:STDOUT: %.1: type = assoc_entity_type @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2), @ImplicitAs.%Convert.type (%Convert.type.1) [symbolic = %.1 (constants.%.6)] +// CHECK:STDOUT: %.2: @ImplicitAs.%.1 (%.6) = assoc_entity element0, imports.%import_ref.5 [symbolic = %.2 (constants.%.7)] // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: !members: @@ -192,18 +192,18 @@ fn F(c: Class, p: Class*) { // CHECK:STDOUT: %G.ref.loc47: %G.type = name_ref G, @Class.%G.decl [template = constants.%G] // CHECK:STDOUT: %.loc47_7: = bound_method %.loc47_4.1, %G.ref.loc47 // CHECK:STDOUT: %.loc47_4.2: %.1 = addr_of %.loc47_4.1 -// CHECK:STDOUT: %.loc47_9.1: type = interface_type @ImplicitAs, @ImplicitAs(constants.%Class) [template = constants.%.9] -// CHECK:STDOUT: %.loc47_9.2: %.10 = specific_constant imports.%import_ref.3, @ImplicitAs(constants.%Class) [template = constants.%.11] -// CHECK:STDOUT: %Convert.ref: %.10 = name_ref Convert, %.loc47_9.2 [template = constants.%.11] -// CHECK:STDOUT: %.loc47_9.3: %Class = converted %.loc47_4.2, [template = ] +// CHECK:STDOUT: %ImplicitAs.type: type = interface_type @ImplicitAs, @ImplicitAs(constants.%Class) [template = constants.%ImplicitAs.type.3] +// CHECK:STDOUT: %.loc47_9.1: %.8 = specific_constant imports.%import_ref.3, @ImplicitAs(constants.%Class) [template = constants.%.9] +// CHECK:STDOUT: %Convert.ref: %.8 = name_ref Convert, %.loc47_9.1 [template = constants.%.9] +// CHECK:STDOUT: %.loc47_9.2: %Class = converted %.loc47_4.2, [template = ] // CHECK:STDOUT: %G.call.loc47: init %.2 = call %.loc47_7() [template = ] // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @Convert(constants.%Dest: type, constants.%Self.1: @ImplicitAs.%.1 (%.6)) { +// CHECK:STDOUT: generic fn @Convert(constants.%Dest: type, constants.%Self.1: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2)) { // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic = %Dest (constants.%Dest)] -// CHECK:STDOUT: %.1: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic = %.1 (constants.%.6)] -// CHECK:STDOUT: %Self: %.6 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] +// CHECK:STDOUT: %ImplicitAs.type: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.2)] +// CHECK:STDOUT: %Self: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] // CHECK:STDOUT: // CHECK:STDOUT: fn[%self: @Convert.%Self (%Self.2)]() -> @Convert.%Dest (%Dest); // CHECK:STDOUT: } @@ -222,7 +222,7 @@ fn F(c: Class, p: Class*) { // CHECK:STDOUT: // CHECK:STDOUT: specific @Convert(constants.%Dest, constants.%Self.1) { // CHECK:STDOUT: %Dest => constants.%Dest -// CHECK:STDOUT: %.1 => constants.%.6 +// CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.2 // CHECK:STDOUT: %Self => constants.%Self.1 // CHECK:STDOUT: } // CHECK:STDOUT: @@ -230,11 +230,11 @@ fn F(c: Class, p: Class*) { // CHECK:STDOUT: %Dest => constants.%Class // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.1 => constants.%.9 +// CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.3 // CHECK:STDOUT: %Self => constants.%Self.2 // CHECK:STDOUT: %Convert.type => constants.%Convert.type.2 // CHECK:STDOUT: %Convert => constants.%Convert.2 -// CHECK:STDOUT: %.2 => constants.%.10 -// CHECK:STDOUT: %.3 => constants.%.11 +// CHECK:STDOUT: %.1 => constants.%.8 +// CHECK:STDOUT: %.2 => constants.%.9 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/fail_base_bad_type.carbon b/toolchain/check/testdata/class/fail_base_bad_type.carbon index a243d60e63919..4c6a34f0d2720 100644 --- a/toolchain/check/testdata/class/fail_base_bad_type.carbon +++ b/toolchain/check/testdata/class/fail_base_bad_type.carbon @@ -166,90 +166,90 @@ fn AccessMemberWithInvalidBaseFinal_NoMember(p: DeriveFromFinal*) -> i32 { // CHECK:STDOUT: %AccessMemberWithInvalidBaseError: %AccessMemberWithInvalidBaseError.type = struct_value () [template] // CHECK:STDOUT: %DeriveFromNonType: type = class_type @DeriveFromNonType [template] // CHECK:STDOUT: %.8: i32 = int_literal 32 [template] -// CHECK:STDOUT: %ImplicitAs.type: type = generic_interface_type @ImplicitAs [template] -// CHECK:STDOUT: %ImplicitAs: %ImplicitAs.type = struct_value () [template] +// CHECK:STDOUT: %ImplicitAs.type.1: type = generic_interface_type @ImplicitAs [template] +// CHECK:STDOUT: %ImplicitAs: %ImplicitAs.type.1 = struct_value () [template] // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic] -// CHECK:STDOUT: %.9: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic] -// CHECK:STDOUT: %Self.1: @ImplicitAs.%.1 (%.9) = bind_symbolic_name Self, 1 [symbolic] -// CHECK:STDOUT: %Self.2: %.9 = bind_symbolic_name Self, 1 [symbolic] +// CHECK:STDOUT: %ImplicitAs.type.2: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic] +// CHECK:STDOUT: %Self.1: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2) = bind_symbolic_name Self, 1 [symbolic] +// CHECK:STDOUT: %Self.2: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: %Convert.type.1: type = fn_type @Convert, @ImplicitAs(%Dest) [symbolic] // CHECK:STDOUT: %Convert.1: %Convert.type.1 = struct_value () [symbolic] -// CHECK:STDOUT: %.10: type = assoc_entity_type %.9, %Convert.type.1 [symbolic] -// CHECK:STDOUT: %.11: %.10 = assoc_entity element0, imports.%import_ref.6 [symbolic] -// CHECK:STDOUT: %.12: type = interface_type @ImplicitAs, @ImplicitAs(type) [template] +// CHECK:STDOUT: %.9: type = assoc_entity_type %ImplicitAs.type.2, %Convert.type.1 [symbolic] +// CHECK:STDOUT: %.10: %.9 = assoc_entity element0, imports.%import_ref.6 [symbolic] +// CHECK:STDOUT: %ImplicitAs.type.3: type = interface_type @ImplicitAs, @ImplicitAs(type) [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert, @ImplicitAs(type) [template] // CHECK:STDOUT: %Convert.2: %Convert.type.2 = struct_value () [template] -// CHECK:STDOUT: %.13: type = assoc_entity_type %.12, %Convert.type.2 [template] -// CHECK:STDOUT: %.14: %.13 = assoc_entity element0, imports.%import_ref.6 [template] -// CHECK:STDOUT: %.15: %.10 = assoc_entity element0, imports.%import_ref.7 [symbolic] -// CHECK:STDOUT: %.16: type = ptr_type %DeriveFromNonType [template] +// CHECK:STDOUT: %.11: type = assoc_entity_type %ImplicitAs.type.3, %Convert.type.2 [template] +// CHECK:STDOUT: %.12: %.11 = assoc_entity element0, imports.%import_ref.6 [template] +// CHECK:STDOUT: %.13: %.9 = assoc_entity element0, imports.%import_ref.7 [symbolic] +// CHECK:STDOUT: %.14: type = ptr_type %DeriveFromNonType [template] // CHECK:STDOUT: %AccessMemberWithInvalidBasNonType.type: type = fn_type @AccessMemberWithInvalidBasNonType [template] // CHECK:STDOUT: %AccessMemberWithInvalidBasNonType: %AccessMemberWithInvalidBasNonType.type = struct_value () [template] // CHECK:STDOUT: %DeriveFromi32: type = class_type @DeriveFromi32 [template] -// CHECK:STDOUT: %.17: type = ptr_type %DeriveFromi32 [template] -// CHECK:STDOUT: %.18: type = ptr_type i32 [template] +// CHECK:STDOUT: %.15: type = ptr_type %DeriveFromi32 [template] +// CHECK:STDOUT: %.16: type = ptr_type i32 [template] // CHECK:STDOUT: %ConvertToBadBasei32.type: type = fn_type @ConvertToBadBasei32 [template] // CHECK:STDOUT: %ConvertToBadBasei32: %ConvertToBadBasei32.type = struct_value () [template] -// CHECK:STDOUT: %.19: type = interface_type @ImplicitAs, @ImplicitAs(%.18) [template] -// CHECK:STDOUT: %Convert.type.3: type = fn_type @Convert, @ImplicitAs(%.18) [template] +// CHECK:STDOUT: %ImplicitAs.type.4: type = interface_type @ImplicitAs, @ImplicitAs(%.16) [template] +// CHECK:STDOUT: %Convert.type.3: type = fn_type @Convert, @ImplicitAs(%.16) [template] // CHECK:STDOUT: %Convert.3: %Convert.type.3 = struct_value () [template] -// CHECK:STDOUT: %.20: type = assoc_entity_type %.19, %Convert.type.3 [template] -// CHECK:STDOUT: %.21: %.20 = assoc_entity element0, imports.%import_ref.6 [template] +// CHECK:STDOUT: %.17: type = assoc_entity_type %ImplicitAs.type.4, %Convert.type.3 [template] +// CHECK:STDOUT: %.18: %.17 = assoc_entity element0, imports.%import_ref.6 [template] // CHECK:STDOUT: %AccessMemberWithInvalidBasei32.type: type = fn_type @AccessMemberWithInvalidBasei32 [template] // CHECK:STDOUT: %AccessMemberWithInvalidBasei32: %AccessMemberWithInvalidBasei32.type = struct_value () [template] // CHECK:STDOUT: %DeriveFromTuple: type = class_type @DeriveFromTuple [template] -// CHECK:STDOUT: %.22: type = tuple_type (type) [template] -// CHECK:STDOUT: %.23: type = tuple_type (%Base) [template] -// CHECK:STDOUT: %.24: type = ptr_type %.1 [template] -// CHECK:STDOUT: %.25: type = tuple_type (%.24) [template] -// CHECK:STDOUT: %.26: type = ptr_type %DeriveFromTuple [template] -// CHECK:STDOUT: %.27: type = ptr_type %.23 [template] +// CHECK:STDOUT: %.19: type = tuple_type (type) [template] +// CHECK:STDOUT: %.20: type = tuple_type (%Base) [template] +// CHECK:STDOUT: %.21: type = ptr_type %.1 [template] +// CHECK:STDOUT: %.22: type = tuple_type (%.21) [template] +// CHECK:STDOUT: %.23: type = ptr_type %DeriveFromTuple [template] +// CHECK:STDOUT: %.24: type = ptr_type %.20 [template] // CHECK:STDOUT: %ConvertToBadBaseTuple.type: type = fn_type @ConvertToBadBaseTuple [template] // CHECK:STDOUT: %ConvertToBadBaseTuple: %ConvertToBadBaseTuple.type = struct_value () [template] -// CHECK:STDOUT: %.28: type = interface_type @ImplicitAs, @ImplicitAs(%.27) [template] -// CHECK:STDOUT: %Convert.type.4: type = fn_type @Convert, @ImplicitAs(%.27) [template] +// CHECK:STDOUT: %ImplicitAs.type.5: type = interface_type @ImplicitAs, @ImplicitAs(%.24) [template] +// CHECK:STDOUT: %Convert.type.4: type = fn_type @Convert, @ImplicitAs(%.24) [template] // CHECK:STDOUT: %Convert.4: %Convert.type.4 = struct_value () [template] -// CHECK:STDOUT: %.29: type = assoc_entity_type %.28, %Convert.type.4 [template] -// CHECK:STDOUT: %.30: %.29 = assoc_entity element0, imports.%import_ref.6 [template] +// CHECK:STDOUT: %.25: type = assoc_entity_type %ImplicitAs.type.5, %Convert.type.4 [template] +// CHECK:STDOUT: %.26: %.25 = assoc_entity element0, imports.%import_ref.6 [template] // CHECK:STDOUT: %AccessMemberWithInvalidBaseTuple.type: type = fn_type @AccessMemberWithInvalidBaseTuple [template] // CHECK:STDOUT: %AccessMemberWithInvalidBaseTuple: %AccessMemberWithInvalidBaseTuple.type = struct_value () [template] // CHECK:STDOUT: %DeriveFromStruct: type = class_type @DeriveFromStruct [template] -// CHECK:STDOUT: %.31: type = struct_type {.a: i32, .b: i32} [template] -// CHECK:STDOUT: %.32: type = ptr_type %.31 [template] -// CHECK:STDOUT: %.33: type = ptr_type %DeriveFromStruct [template] +// CHECK:STDOUT: %.27: type = struct_type {.a: i32, .b: i32} [template] +// CHECK:STDOUT: %.28: type = ptr_type %.27 [template] +// CHECK:STDOUT: %.29: type = ptr_type %DeriveFromStruct [template] // CHECK:STDOUT: %ConvertToBadBaseStruct.type: type = fn_type @ConvertToBadBaseStruct [template] // CHECK:STDOUT: %ConvertToBadBaseStruct: %ConvertToBadBaseStruct.type = struct_value () [template] -// CHECK:STDOUT: %.34: type = interface_type @ImplicitAs, @ImplicitAs(%.32) [template] -// CHECK:STDOUT: %Convert.type.5: type = fn_type @Convert, @ImplicitAs(%.32) [template] +// CHECK:STDOUT: %ImplicitAs.type.6: type = interface_type @ImplicitAs, @ImplicitAs(%.28) [template] +// CHECK:STDOUT: %Convert.type.5: type = fn_type @Convert, @ImplicitAs(%.28) [template] // CHECK:STDOUT: %Convert.5: %Convert.type.5 = struct_value () [template] -// CHECK:STDOUT: %.35: type = assoc_entity_type %.34, %Convert.type.5 [template] -// CHECK:STDOUT: %.36: %.35 = assoc_entity element0, imports.%import_ref.6 [template] +// CHECK:STDOUT: %.30: type = assoc_entity_type %ImplicitAs.type.6, %Convert.type.5 [template] +// CHECK:STDOUT: %.31: %.30 = assoc_entity element0, imports.%import_ref.6 [template] // CHECK:STDOUT: %AccessMemberWithInvalidBaseStruct.type: type = fn_type @AccessMemberWithInvalidBaseStruct [template] // CHECK:STDOUT: %AccessMemberWithInvalidBaseStruct: %AccessMemberWithInvalidBaseStruct.type = struct_value () [template] // CHECK:STDOUT: %Incomplete: type = class_type @Incomplete [template] // CHECK:STDOUT: %DeriveFromIncomplete: type = class_type @DeriveFromIncomplete [template] -// CHECK:STDOUT: %.37: type = ptr_type %DeriveFromIncomplete [template] -// CHECK:STDOUT: %.38: type = ptr_type %Incomplete [template] +// CHECK:STDOUT: %.32: type = ptr_type %DeriveFromIncomplete [template] +// CHECK:STDOUT: %.33: type = ptr_type %Incomplete [template] // CHECK:STDOUT: %ConvertToBadBaseIncomplete.type: type = fn_type @ConvertToBadBaseIncomplete [template] // CHECK:STDOUT: %ConvertToBadBaseIncomplete: %ConvertToBadBaseIncomplete.type = struct_value () [template] -// CHECK:STDOUT: %.39: type = interface_type @ImplicitAs, @ImplicitAs(%.38) [template] -// CHECK:STDOUT: %Convert.type.6: type = fn_type @Convert, @ImplicitAs(%.38) [template] +// CHECK:STDOUT: %ImplicitAs.type.7: type = interface_type @ImplicitAs, @ImplicitAs(%.33) [template] +// CHECK:STDOUT: %Convert.type.6: type = fn_type @Convert, @ImplicitAs(%.33) [template] // CHECK:STDOUT: %Convert.6: %Convert.type.6 = struct_value () [template] -// CHECK:STDOUT: %.40: type = assoc_entity_type %.39, %Convert.type.6 [template] -// CHECK:STDOUT: %.41: %.40 = assoc_entity element0, imports.%import_ref.6 [template] +// CHECK:STDOUT: %.34: type = assoc_entity_type %ImplicitAs.type.7, %Convert.type.6 [template] +// CHECK:STDOUT: %.35: %.34 = assoc_entity element0, imports.%import_ref.6 [template] // CHECK:STDOUT: %AccessMemberWithInvalidBaseIncomplete.type: type = fn_type @AccessMemberWithInvalidBaseIncomplete [template] // CHECK:STDOUT: %AccessMemberWithInvalidBaseIncomplete: %AccessMemberWithInvalidBaseIncomplete.type = struct_value () [template] // CHECK:STDOUT: %DeriveFromFinal: type = class_type @DeriveFromFinal [template] -// CHECK:STDOUT: %.42: type = ptr_type %.5 [template] -// CHECK:STDOUT: %.43: type = unbound_element_type %DeriveFromFinal, %Final [template] -// CHECK:STDOUT: %.44: type = struct_type {.base: %Final} [template] -// CHECK:STDOUT: %.45: = complete_type_witness %.44 [template] -// CHECK:STDOUT: %.46: type = ptr_type %DeriveFromFinal [template] -// CHECK:STDOUT: %.47: type = ptr_type %Final [template] +// CHECK:STDOUT: %.36: type = ptr_type %.5 [template] +// CHECK:STDOUT: %.37: type = unbound_element_type %DeriveFromFinal, %Final [template] +// CHECK:STDOUT: %.38: type = struct_type {.base: %Final} [template] +// CHECK:STDOUT: %.39: = complete_type_witness %.38 [template] +// CHECK:STDOUT: %.40: type = ptr_type %DeriveFromFinal [template] +// CHECK:STDOUT: %.41: type = ptr_type %Final [template] // CHECK:STDOUT: %ConvertToBadBaseFinal.type: type = fn_type @ConvertToBadBaseFinal [template] // CHECK:STDOUT: %ConvertToBadBaseFinal: %ConvertToBadBaseFinal.type = struct_value () [template] -// CHECK:STDOUT: %.48: type = struct_type {.base: %.42} [template] -// CHECK:STDOUT: %.49: type = ptr_type %.44 [template] +// CHECK:STDOUT: %.42: type = struct_type {.base: %.36} [template] +// CHECK:STDOUT: %.43: type = ptr_type %.38 [template] // CHECK:STDOUT: %AccessMemberWithInvalidBaseFinal_WithMember.type: type = fn_type @AccessMemberWithInvalidBaseFinal_WithMember [template] // CHECK:STDOUT: %AccessMemberWithInvalidBaseFinal_WithMember: %AccessMemberWithInvalidBaseFinal_WithMember.type = struct_value () [template] // CHECK:STDOUT: %AccessMemberWithInvalidBaseFinal_NoMember.type: type = fn_type @AccessMemberWithInvalidBaseFinal_NoMember [template] @@ -270,9 +270,9 @@ fn AccessMemberWithInvalidBaseFinal_NoMember(p: DeriveFromFinal*) -> i32 { // CHECK:STDOUT: import Core//prelude/types/bool // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref Core//prelude/types, inst+4, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.2: %ImplicitAs.type = import_ref Core//prelude/operators/as, inst+40, loaded [template = constants.%ImplicitAs] +// CHECK:STDOUT: %import_ref.2: %ImplicitAs.type.1 = import_ref Core//prelude/operators/as, inst+40, loaded [template = constants.%ImplicitAs] // CHECK:STDOUT: %import_ref.3 = import_ref Core//prelude/operators/as, inst+45, unloaded -// CHECK:STDOUT: %import_ref.4: @ImplicitAs.%.2 (%.10) = import_ref Core//prelude/operators/as, inst+63, loaded [symbolic = @ImplicitAs.%.3 (constants.%.15)] +// CHECK:STDOUT: %import_ref.4: @ImplicitAs.%.1 (%.9) = import_ref Core//prelude/operators/as, inst+63, loaded [symbolic = @ImplicitAs.%.2 (constants.%.13)] // CHECK:STDOUT: %import_ref.5 = import_ref Core//prelude/operators/as, inst+56, unloaded // CHECK:STDOUT: %import_ref.6 = import_ref Core//prelude/operators/as, inst+56, unloaded // CHECK:STDOUT: %import_ref.7 = import_ref Core//prelude/operators/as, inst+56, unloaded @@ -323,12 +323,12 @@ fn AccessMemberWithInvalidBaseFinal_NoMember(p: DeriveFromFinal*) -> i32 { // CHECK:STDOUT: } // CHECK:STDOUT: %DeriveFromNonType.decl: type = class_decl @DeriveFromNonType [template = constants.%DeriveFromNonType] {} {} // CHECK:STDOUT: %AccessMemberWithInvalidBasNonType.decl: %AccessMemberWithInvalidBasNonType.type = fn_decl @AccessMemberWithInvalidBasNonType [template = constants.%AccessMemberWithInvalidBasNonType] { -// CHECK:STDOUT: %p.patt: %.16 = binding_pattern p +// CHECK:STDOUT: %p.patt: %.14 = binding_pattern p // CHECK:STDOUT: } { // CHECK:STDOUT: %DeriveFromNonType.ref: type = name_ref DeriveFromNonType, file.%DeriveFromNonType.decl [template = constants.%DeriveFromNonType] -// CHECK:STDOUT: %.loc38_58: type = ptr_type %DeriveFromNonType [template = constants.%.16] -// CHECK:STDOUT: %p.param: %.16 = param p, runtime_param0 -// CHECK:STDOUT: %p: %.16 = bind_name p, %p.param +// CHECK:STDOUT: %.loc38_58: type = ptr_type %DeriveFromNonType [template = constants.%.14] +// CHECK:STDOUT: %p.param: %.14 = param p, runtime_param0 +// CHECK:STDOUT: %p: %.14 = bind_name p, %p.param // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc38_64.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc38_64.2: type = converted %int.make_type_32, %.loc38_64.1 [template = i32] @@ -336,25 +336,25 @@ fn AccessMemberWithInvalidBaseFinal_NoMember(p: DeriveFromFinal*) -> i32 { // CHECK:STDOUT: } // CHECK:STDOUT: %DeriveFromi32.decl: type = class_decl @DeriveFromi32 [template = constants.%DeriveFromi32] {} {} // CHECK:STDOUT: %ConvertToBadBasei32.decl: %ConvertToBadBasei32.type = fn_decl @ConvertToBadBasei32 [template = constants.%ConvertToBadBasei32] { -// CHECK:STDOUT: %p.patt: %.17 = binding_pattern p +// CHECK:STDOUT: %p.patt: %.15 = binding_pattern p // CHECK:STDOUT: } { // CHECK:STDOUT: %DeriveFromi32.ref: type = name_ref DeriveFromi32, file.%DeriveFromi32.decl [template = constants.%DeriveFromi32] -// CHECK:STDOUT: %.loc57_40: type = ptr_type %DeriveFromi32 [template = constants.%.17] -// CHECK:STDOUT: %p.param: %.17 = param p, runtime_param0 -// CHECK:STDOUT: %p: %.17 = bind_name p, %p.param +// CHECK:STDOUT: %.loc57_40: type = ptr_type %DeriveFromi32 [template = constants.%.15] +// CHECK:STDOUT: %p.param: %.15 = param p, runtime_param0 +// CHECK:STDOUT: %p: %.15 = bind_name p, %p.param // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc57_49.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc57_49.2: type = converted %int.make_type_32, %.loc57_49.1 [template = i32] -// CHECK:STDOUT: %.loc57_49.3: type = ptr_type i32 [template = constants.%.18] -// CHECK:STDOUT: %return: ref %.18 = var +// CHECK:STDOUT: %.loc57_49.3: type = ptr_type i32 [template = constants.%.16] +// CHECK:STDOUT: %return: ref %.16 = var // CHECK:STDOUT: } // CHECK:STDOUT: %AccessMemberWithInvalidBasei32.decl: %AccessMemberWithInvalidBasei32.type = fn_decl @AccessMemberWithInvalidBasei32 [template = constants.%AccessMemberWithInvalidBasei32] { -// CHECK:STDOUT: %p.patt: %.17 = binding_pattern p +// CHECK:STDOUT: %p.patt: %.15 = binding_pattern p // CHECK:STDOUT: } { // CHECK:STDOUT: %DeriveFromi32.ref: type = name_ref DeriveFromi32, file.%DeriveFromi32.decl [template = constants.%DeriveFromi32] -// CHECK:STDOUT: %.loc59_51: type = ptr_type %DeriveFromi32 [template = constants.%.17] -// CHECK:STDOUT: %p.param: %.17 = param p, runtime_param0 -// CHECK:STDOUT: %p: %.17 = bind_name p, %p.param +// CHECK:STDOUT: %.loc59_51: type = ptr_type %DeriveFromi32 [template = constants.%.15] +// CHECK:STDOUT: %p.param: %.15 = param p, runtime_param0 +// CHECK:STDOUT: %p: %.15 = bind_name p, %p.param // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc59_57.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc59_57.2: type = converted %int.make_type_32, %.loc59_57.1 [template = i32] @@ -362,25 +362,25 @@ fn AccessMemberWithInvalidBaseFinal_NoMember(p: DeriveFromFinal*) -> i32 { // CHECK:STDOUT: } // CHECK:STDOUT: %DeriveFromTuple.decl: type = class_decl @DeriveFromTuple [template = constants.%DeriveFromTuple] {} {} // CHECK:STDOUT: %ConvertToBadBaseTuple.decl: %ConvertToBadBaseTuple.type = fn_decl @ConvertToBadBaseTuple [template = constants.%ConvertToBadBaseTuple] { -// CHECK:STDOUT: %p.patt: %.26 = binding_pattern p +// CHECK:STDOUT: %p.patt: %.23 = binding_pattern p // CHECK:STDOUT: } { // CHECK:STDOUT: %DeriveFromTuple.ref: type = name_ref DeriveFromTuple, file.%DeriveFromTuple.decl [template = constants.%DeriveFromTuple] -// CHECK:STDOUT: %.loc76_44: type = ptr_type %DeriveFromTuple [template = constants.%.26] -// CHECK:STDOUT: %p.param: %.26 = param p, runtime_param0 -// CHECK:STDOUT: %p: %.26 = bind_name p, %p.param +// CHECK:STDOUT: %.loc76_44: type = ptr_type %DeriveFromTuple [template = constants.%.23] +// CHECK:STDOUT: %p.param: %.23 = param p, runtime_param0 +// CHECK:STDOUT: %p: %.23 = bind_name p, %p.param // CHECK:STDOUT: %Base.ref: type = name_ref Base, file.%Base.decl [template = constants.%Base] -// CHECK:STDOUT: %.loc76_56: %.22 = tuple_literal (%Base.ref) -// CHECK:STDOUT: %.loc76_57.1: type = converted %.loc76_56, constants.%.23 [template = constants.%.23] -// CHECK:STDOUT: %.loc76_57.2: type = ptr_type %.23 [template = constants.%.27] -// CHECK:STDOUT: %return: ref %.27 = var +// CHECK:STDOUT: %.loc76_56: %.19 = tuple_literal (%Base.ref) +// CHECK:STDOUT: %.loc76_57.1: type = converted %.loc76_56, constants.%.20 [template = constants.%.20] +// CHECK:STDOUT: %.loc76_57.2: type = ptr_type %.20 [template = constants.%.24] +// CHECK:STDOUT: %return: ref %.24 = var // CHECK:STDOUT: } // CHECK:STDOUT: %AccessMemberWithInvalidBaseTuple.decl: %AccessMemberWithInvalidBaseTuple.type = fn_decl @AccessMemberWithInvalidBaseTuple [template = constants.%AccessMemberWithInvalidBaseTuple] { -// CHECK:STDOUT: %p.patt: %.26 = binding_pattern p +// CHECK:STDOUT: %p.patt: %.23 = binding_pattern p // CHECK:STDOUT: } { // CHECK:STDOUT: %DeriveFromTuple.ref: type = name_ref DeriveFromTuple, file.%DeriveFromTuple.decl [template = constants.%DeriveFromTuple] -// CHECK:STDOUT: %.loc78_55: type = ptr_type %DeriveFromTuple [template = constants.%.26] -// CHECK:STDOUT: %p.param: %.26 = param p, runtime_param0 -// CHECK:STDOUT: %p: %.26 = bind_name p, %p.param +// CHECK:STDOUT: %.loc78_55: type = ptr_type %DeriveFromTuple [template = constants.%.23] +// CHECK:STDOUT: %p.param: %.23 = param p, runtime_param0 +// CHECK:STDOUT: %p: %.23 = bind_name p, %p.param // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc78_61.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc78_61.2: type = converted %int.make_type_32, %.loc78_61.1 [template = i32] @@ -388,29 +388,29 @@ fn AccessMemberWithInvalidBaseFinal_NoMember(p: DeriveFromFinal*) -> i32 { // CHECK:STDOUT: } // CHECK:STDOUT: %DeriveFromStruct.decl: type = class_decl @DeriveFromStruct [template = constants.%DeriveFromStruct] {} {} // CHECK:STDOUT: %ConvertToBadBaseStruct.decl: %ConvertToBadBaseStruct.type = fn_decl @ConvertToBadBaseStruct [template = constants.%ConvertToBadBaseStruct] { -// CHECK:STDOUT: %p.patt: %.33 = binding_pattern p +// CHECK:STDOUT: %p.patt: %.29 = binding_pattern p // CHECK:STDOUT: } { // CHECK:STDOUT: %DeriveFromStruct.ref: type = name_ref DeriveFromStruct, file.%DeriveFromStruct.decl [template = constants.%DeriveFromStruct] -// CHECK:STDOUT: %.loc97_46: type = ptr_type %DeriveFromStruct [template = constants.%.33] -// CHECK:STDOUT: %p.param: %.33 = param p, runtime_param0 -// CHECK:STDOUT: %p: %.33 = bind_name p, %p.param +// CHECK:STDOUT: %.loc97_46: type = ptr_type %DeriveFromStruct [template = constants.%.29] +// CHECK:STDOUT: %p.param: %.29 = param p, runtime_param0 +// CHECK:STDOUT: %p: %.29 = bind_name p, %p.param // CHECK:STDOUT: %int.make_type_32.loc97_57: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc97_57.1: type = value_of_initializer %int.make_type_32.loc97_57 [template = i32] // CHECK:STDOUT: %.loc97_57.2: type = converted %int.make_type_32.loc97_57, %.loc97_57.1 [template = i32] // CHECK:STDOUT: %int.make_type_32.loc97_66: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc97_66.1: type = value_of_initializer %int.make_type_32.loc97_66 [template = i32] // CHECK:STDOUT: %.loc97_66.2: type = converted %int.make_type_32.loc97_66, %.loc97_66.1 [template = i32] -// CHECK:STDOUT: %.loc97_69: type = struct_type {.a: i32, .b: i32} [template = constants.%.31] -// CHECK:STDOUT: %.loc97_70: type = ptr_type %.31 [template = constants.%.32] -// CHECK:STDOUT: %return: ref %.32 = var +// CHECK:STDOUT: %.loc97_69: type = struct_type {.a: i32, .b: i32} [template = constants.%.27] +// CHECK:STDOUT: %.loc97_70: type = ptr_type %.27 [template = constants.%.28] +// CHECK:STDOUT: %return: ref %.28 = var // CHECK:STDOUT: } // CHECK:STDOUT: %AccessMemberWithInvalidBaseStruct.decl: %AccessMemberWithInvalidBaseStruct.type = fn_decl @AccessMemberWithInvalidBaseStruct [template = constants.%AccessMemberWithInvalidBaseStruct] { -// CHECK:STDOUT: %p.patt: %.33 = binding_pattern p +// CHECK:STDOUT: %p.patt: %.29 = binding_pattern p // CHECK:STDOUT: } { // CHECK:STDOUT: %DeriveFromStruct.ref: type = name_ref DeriveFromStruct, file.%DeriveFromStruct.decl [template = constants.%DeriveFromStruct] -// CHECK:STDOUT: %.loc100_57: type = ptr_type %DeriveFromStruct [template = constants.%.33] -// CHECK:STDOUT: %p.param: %.33 = param p, runtime_param0 -// CHECK:STDOUT: %p: %.33 = bind_name p, %p.param +// CHECK:STDOUT: %.loc100_57: type = ptr_type %DeriveFromStruct [template = constants.%.29] +// CHECK:STDOUT: %p.param: %.29 = param p, runtime_param0 +// CHECK:STDOUT: %p: %.29 = bind_name p, %p.param // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc100_63.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc100_63.2: type = converted %int.make_type_32, %.loc100_63.1 [template = i32] @@ -419,23 +419,23 @@ fn AccessMemberWithInvalidBaseFinal_NoMember(p: DeriveFromFinal*) -> i32 { // CHECK:STDOUT: %Incomplete.decl: type = class_decl @Incomplete [template = constants.%Incomplete] {} {} // CHECK:STDOUT: %DeriveFromIncomplete.decl: type = class_decl @DeriveFromIncomplete [template = constants.%DeriveFromIncomplete] {} {} // CHECK:STDOUT: %ConvertToBadBaseIncomplete.decl: %ConvertToBadBaseIncomplete.type = fn_decl @ConvertToBadBaseIncomplete [template = constants.%ConvertToBadBaseIncomplete] { -// CHECK:STDOUT: %p.patt: %.37 = binding_pattern p +// CHECK:STDOUT: %p.patt: %.32 = binding_pattern p // CHECK:STDOUT: } { // CHECK:STDOUT: %DeriveFromIncomplete.ref: type = name_ref DeriveFromIncomplete, file.%DeriveFromIncomplete.decl [template = constants.%DeriveFromIncomplete] -// CHECK:STDOUT: %.loc122_54: type = ptr_type %DeriveFromIncomplete [template = constants.%.37] -// CHECK:STDOUT: %p.param: %.37 = param p, runtime_param0 -// CHECK:STDOUT: %p: %.37 = bind_name p, %p.param +// CHECK:STDOUT: %.loc122_54: type = ptr_type %DeriveFromIncomplete [template = constants.%.32] +// CHECK:STDOUT: %p.param: %.32 = param p, runtime_param0 +// CHECK:STDOUT: %p: %.32 = bind_name p, %p.param // CHECK:STDOUT: %Incomplete.ref: type = name_ref Incomplete, file.%Incomplete.decl [template = constants.%Incomplete] -// CHECK:STDOUT: %.loc122_70: type = ptr_type %Incomplete [template = constants.%.38] -// CHECK:STDOUT: %return: ref %.38 = var +// CHECK:STDOUT: %.loc122_70: type = ptr_type %Incomplete [template = constants.%.33] +// CHECK:STDOUT: %return: ref %.33 = var // CHECK:STDOUT: } // CHECK:STDOUT: %AccessMemberWithInvalidBaseIncomplete.decl: %AccessMemberWithInvalidBaseIncomplete.type = fn_decl @AccessMemberWithInvalidBaseIncomplete [template = constants.%AccessMemberWithInvalidBaseIncomplete] { -// CHECK:STDOUT: %p.patt: %.37 = binding_pattern p +// CHECK:STDOUT: %p.patt: %.32 = binding_pattern p // CHECK:STDOUT: } { // CHECK:STDOUT: %DeriveFromIncomplete.ref: type = name_ref DeriveFromIncomplete, file.%DeriveFromIncomplete.decl [template = constants.%DeriveFromIncomplete] -// CHECK:STDOUT: %.loc124_65: type = ptr_type %DeriveFromIncomplete [template = constants.%.37] -// CHECK:STDOUT: %p.param: %.37 = param p, runtime_param0 -// CHECK:STDOUT: %p: %.37 = bind_name p, %p.param +// CHECK:STDOUT: %.loc124_65: type = ptr_type %DeriveFromIncomplete [template = constants.%.32] +// CHECK:STDOUT: %p.param: %.32 = param p, runtime_param0 +// CHECK:STDOUT: %p: %.32 = bind_name p, %p.param // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc124_71.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc124_71.2: type = converted %int.make_type_32, %.loc124_71.1 [template = i32] @@ -443,35 +443,35 @@ fn AccessMemberWithInvalidBaseFinal_NoMember(p: DeriveFromFinal*) -> i32 { // CHECK:STDOUT: } // CHECK:STDOUT: %DeriveFromFinal.decl: type = class_decl @DeriveFromFinal [template = constants.%DeriveFromFinal] {} {} // CHECK:STDOUT: %ConvertToBadBaseFinal.decl: %ConvertToBadBaseFinal.type = fn_decl @ConvertToBadBaseFinal [template = constants.%ConvertToBadBaseFinal] { -// CHECK:STDOUT: %p.patt: %.46 = binding_pattern p +// CHECK:STDOUT: %p.patt: %.40 = binding_pattern p // CHECK:STDOUT: } { // CHECK:STDOUT: %DeriveFromFinal.ref: type = name_ref DeriveFromFinal, file.%DeriveFromFinal.decl [template = constants.%DeriveFromFinal] -// CHECK:STDOUT: %.loc135_44: type = ptr_type %DeriveFromFinal [template = constants.%.46] -// CHECK:STDOUT: %p.param: %.46 = param p, runtime_param0 -// CHECK:STDOUT: %p: %.46 = bind_name p, %p.param +// CHECK:STDOUT: %.loc135_44: type = ptr_type %DeriveFromFinal [template = constants.%.40] +// CHECK:STDOUT: %p.param: %.40 = param p, runtime_param0 +// CHECK:STDOUT: %p: %.40 = bind_name p, %p.param // CHECK:STDOUT: %Final.ref: type = name_ref Final, file.%Final.decl [template = constants.%Final] -// CHECK:STDOUT: %.loc135_55: type = ptr_type %Final [template = constants.%.47] -// CHECK:STDOUT: %return: ref %.47 = var +// CHECK:STDOUT: %.loc135_55: type = ptr_type %Final [template = constants.%.41] +// CHECK:STDOUT: %return: ref %.41 = var // CHECK:STDOUT: } // CHECK:STDOUT: %AccessMemberWithInvalidBaseFinal_WithMember.decl: %AccessMemberWithInvalidBaseFinal_WithMember.type = fn_decl @AccessMemberWithInvalidBaseFinal_WithMember [template = constants.%AccessMemberWithInvalidBaseFinal_WithMember] { -// CHECK:STDOUT: %p.patt: %.46 = binding_pattern p +// CHECK:STDOUT: %p.patt: %.40 = binding_pattern p // CHECK:STDOUT: } { // CHECK:STDOUT: %DeriveFromFinal.ref: type = name_ref DeriveFromFinal, file.%DeriveFromFinal.decl [template = constants.%DeriveFromFinal] -// CHECK:STDOUT: %.loc139_66: type = ptr_type %DeriveFromFinal [template = constants.%.46] -// CHECK:STDOUT: %p.param: %.46 = param p, runtime_param0 -// CHECK:STDOUT: %p: %.46 = bind_name p, %p.param +// CHECK:STDOUT: %.loc139_66: type = ptr_type %DeriveFromFinal [template = constants.%.40] +// CHECK:STDOUT: %p.param: %.40 = param p, runtime_param0 +// CHECK:STDOUT: %p: %.40 = bind_name p, %p.param // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc139_72.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc139_72.2: type = converted %int.make_type_32, %.loc139_72.1 [template = i32] // CHECK:STDOUT: %return: ref i32 = var // CHECK:STDOUT: } // CHECK:STDOUT: %AccessMemberWithInvalidBaseFinal_NoMember.decl: %AccessMemberWithInvalidBaseFinal_NoMember.type = fn_decl @AccessMemberWithInvalidBaseFinal_NoMember [template = constants.%AccessMemberWithInvalidBaseFinal_NoMember] { -// CHECK:STDOUT: %p.patt: %.46 = binding_pattern p +// CHECK:STDOUT: %p.patt: %.40 = binding_pattern p // CHECK:STDOUT: } { // CHECK:STDOUT: %DeriveFromFinal.ref: type = name_ref DeriveFromFinal, file.%DeriveFromFinal.decl [template = constants.%DeriveFromFinal] -// CHECK:STDOUT: %.loc143_64: type = ptr_type %DeriveFromFinal [template = constants.%.46] -// CHECK:STDOUT: %p.param: %.46 = param p, runtime_param0 -// CHECK:STDOUT: %p: %.46 = bind_name p, %p.param +// CHECK:STDOUT: %.loc143_64: type = ptr_type %DeriveFromFinal [template = constants.%.40] +// CHECK:STDOUT: %p.param: %.40 = param p, runtime_param0 +// CHECK:STDOUT: %p: %.40 = bind_name p, %p.param // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc143_70.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc143_70.2: type = converted %int.make_type_32, %.loc143_70.1 [template = i32] @@ -483,12 +483,12 @@ fn AccessMemberWithInvalidBaseFinal_NoMember(p: DeriveFromFinal*) -> i32 { // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic = %Dest (constants.%Dest)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.1: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic = %.1 (constants.%.9)] -// CHECK:STDOUT: %Self: %.9 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] +// CHECK:STDOUT: %ImplicitAs.type: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.2)] +// CHECK:STDOUT: %Self: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] // CHECK:STDOUT: %Convert.type: type = fn_type @Convert, @ImplicitAs(%Dest) [symbolic = %Convert.type (constants.%Convert.type.1)] // CHECK:STDOUT: %Convert: @ImplicitAs.%Convert.type (%Convert.type.1) = struct_value () [symbolic = %Convert (constants.%Convert.1)] -// CHECK:STDOUT: %.2: type = assoc_entity_type @ImplicitAs.%.1 (%.9), @ImplicitAs.%Convert.type (%Convert.type.1) [symbolic = %.2 (constants.%.10)] -// CHECK:STDOUT: %.3: @ImplicitAs.%.2 (%.10) = assoc_entity element0, imports.%import_ref.6 [symbolic = %.3 (constants.%.11)] +// CHECK:STDOUT: %.1: type = assoc_entity_type @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2), @ImplicitAs.%Convert.type (%Convert.type.1) [symbolic = %.1 (constants.%.9)] +// CHECK:STDOUT: %.2: @ImplicitAs.%.1 (%.9) = assoc_entity element0, imports.%import_ref.6 [symbolic = %.2 (constants.%.10)] // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: !members: @@ -530,10 +530,10 @@ fn AccessMemberWithInvalidBaseFinal_NoMember(p: DeriveFromFinal*) -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: class @DeriveFromNonType { // CHECK:STDOUT: %.loc35_16.1: i32 = int_literal 32 [template = constants.%.8] -// CHECK:STDOUT: %.loc35_16.2: type = interface_type @ImplicitAs, @ImplicitAs(type) [template = constants.%.12] -// CHECK:STDOUT: %.loc35_16.3: %.13 = specific_constant imports.%import_ref.4, @ImplicitAs(type) [template = constants.%.14] -// CHECK:STDOUT: %Convert.ref: %.13 = name_ref Convert, %.loc35_16.3 [template = constants.%.14] -// CHECK:STDOUT: %.loc35_16.4: type = converted %.loc35_16.1, [template = ] +// CHECK:STDOUT: %ImplicitAs.type: type = interface_type @ImplicitAs, @ImplicitAs(type) [template = constants.%ImplicitAs.type.3] +// CHECK:STDOUT: %.loc35_16.2: %.11 = specific_constant imports.%import_ref.4, @ImplicitAs(type) [template = constants.%.12] +// CHECK:STDOUT: %Convert.ref: %.11 = name_ref Convert, %.loc35_16.2 [template = constants.%.12] +// CHECK:STDOUT: %.loc35_16.3: type = converted %.loc35_16.1, [template = ] // CHECK:STDOUT: %.loc35_18: = base_decl , element0 [template] // CHECK:STDOUT: %.loc36: = complete_type_witness [template = ] // CHECK:STDOUT: @@ -558,8 +558,8 @@ fn AccessMemberWithInvalidBaseFinal_NoMember(p: DeriveFromFinal*) -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: class @DeriveFromTuple { // CHECK:STDOUT: %Base.ref: type = name_ref Base, file.%Base.decl [template = constants.%Base] -// CHECK:STDOUT: %.loc66_22.1: %.22 = tuple_literal (%Base.ref) -// CHECK:STDOUT: %.loc66_22.2: type = converted %.loc66_22.1, constants.%.23 [template = constants.%.23] +// CHECK:STDOUT: %.loc66_22.1: %.19 = tuple_literal (%Base.ref) +// CHECK:STDOUT: %.loc66_22.2: type = converted %.loc66_22.1, constants.%.20 [template = constants.%.20] // CHECK:STDOUT: %.loc66_23: = base_decl , element0 [template] // CHECK:STDOUT: %.loc67: = complete_type_witness [template = ] // CHECK:STDOUT: @@ -576,7 +576,7 @@ fn AccessMemberWithInvalidBaseFinal_NoMember(p: DeriveFromFinal*) -> i32 { // CHECK:STDOUT: %int.make_type_32.loc87_30: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc87_30.1: type = value_of_initializer %int.make_type_32.loc87_30 [template = i32] // CHECK:STDOUT: %.loc87_30.2: type = converted %int.make_type_32.loc87_30, %.loc87_30.1 [template = i32] -// CHECK:STDOUT: %.loc87_33: type = struct_type {.a: i32, .b: i32} [template = constants.%.31] +// CHECK:STDOUT: %.loc87_33: type = struct_type {.a: i32, .b: i32} [template = constants.%.27] // CHECK:STDOUT: %.loc87_34: = base_decl , element0 [template] // CHECK:STDOUT: %.loc88: = complete_type_witness [template = ] // CHECK:STDOUT: @@ -601,8 +601,8 @@ fn AccessMemberWithInvalidBaseFinal_NoMember(p: DeriveFromFinal*) -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: class @DeriveFromFinal { // CHECK:STDOUT: %Final.ref: type = name_ref Final, file.%Final.decl [template = constants.%Final] -// CHECK:STDOUT: %.loc131: %.43 = base_decl %Final, element0 [template] -// CHECK:STDOUT: %.loc132: = complete_type_witness %.44 [template = constants.%.45] +// CHECK:STDOUT: %.loc131: %.37 = base_decl %Final, element0 [template] +// CHECK:STDOUT: %.loc132: = complete_type_witness %.38 [template = constants.%.39] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%DeriveFromFinal @@ -620,107 +620,107 @@ fn AccessMemberWithInvalidBaseFinal_NoMember(p: DeriveFromFinal*) -> i32 { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @Convert(constants.%Dest: type, constants.%Self.1: @ImplicitAs.%.1 (%.9)) { +// CHECK:STDOUT: generic fn @Convert(constants.%Dest: type, constants.%Self.1: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2)) { // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic = %Dest (constants.%Dest)] -// CHECK:STDOUT: %.1: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic = %.1 (constants.%.9)] -// CHECK:STDOUT: %Self: %.9 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] +// CHECK:STDOUT: %ImplicitAs.type: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.2)] +// CHECK:STDOUT: %Self: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] // CHECK:STDOUT: // CHECK:STDOUT: fn[%self: @Convert.%Self (%Self.2)]() -> @Convert.%Dest (%Dest); // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @AccessMemberWithInvalidBasNonType(%p: %.16) -> i32 { +// CHECK:STDOUT: fn @AccessMemberWithInvalidBasNonType(%p: %.14) -> i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %p.ref: %.16 = name_ref p, %p +// CHECK:STDOUT: %p.ref: %.14 = name_ref p, %p // CHECK:STDOUT: %.loc38_78: ref %DeriveFromNonType = deref %p.ref // CHECK:STDOUT: %n.ref: = name_ref n, [template = ] // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @ConvertToBadBasei32(%p: %.17) -> %.18 { +// CHECK:STDOUT: fn @ConvertToBadBasei32(%p: %.15) -> %.16 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %p.ref: %.17 = name_ref p, %p -// CHECK:STDOUT: %.loc57_61.1: type = interface_type @ImplicitAs, @ImplicitAs(constants.%.18) [template = constants.%.19] -// CHECK:STDOUT: %.loc57_61.2: %.20 = specific_constant imports.%import_ref.4, @ImplicitAs(constants.%.18) [template = constants.%.21] -// CHECK:STDOUT: %Convert.ref: %.20 = name_ref Convert, %.loc57_61.2 [template = constants.%.21] -// CHECK:STDOUT: %.loc57_61.3: %.18 = converted %p.ref, [template = ] +// CHECK:STDOUT: %p.ref: %.15 = name_ref p, %p +// CHECK:STDOUT: %ImplicitAs.type: type = interface_type @ImplicitAs, @ImplicitAs(constants.%.16) [template = constants.%ImplicitAs.type.4] +// CHECK:STDOUT: %.loc57_61.1: %.17 = specific_constant imports.%import_ref.4, @ImplicitAs(constants.%.16) [template = constants.%.18] +// CHECK:STDOUT: %Convert.ref: %.17 = name_ref Convert, %.loc57_61.1 [template = constants.%.18] +// CHECK:STDOUT: %.loc57_61.2: %.16 = converted %p.ref, [template = ] // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @AccessMemberWithInvalidBasei32(%p: %.17) -> i32 { +// CHECK:STDOUT: fn @AccessMemberWithInvalidBasei32(%p: %.15) -> i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %p.ref: %.17 = name_ref p, %p +// CHECK:STDOUT: %p.ref: %.15 = name_ref p, %p // CHECK:STDOUT: %.loc59_71: ref %DeriveFromi32 = deref %p.ref // CHECK:STDOUT: %n.ref: = name_ref n, [template = ] // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @ConvertToBadBaseTuple(%p: %.26) -> %.27 { +// CHECK:STDOUT: fn @ConvertToBadBaseTuple(%p: %.23) -> %.24 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %p.ref: %.26 = name_ref p, %p -// CHECK:STDOUT: %.loc76_69.1: type = interface_type @ImplicitAs, @ImplicitAs(constants.%.27) [template = constants.%.28] -// CHECK:STDOUT: %.loc76_69.2: %.29 = specific_constant imports.%import_ref.4, @ImplicitAs(constants.%.27) [template = constants.%.30] -// CHECK:STDOUT: %Convert.ref: %.29 = name_ref Convert, %.loc76_69.2 [template = constants.%.30] -// CHECK:STDOUT: %.loc76_69.3: %.27 = converted %p.ref, [template = ] +// CHECK:STDOUT: %p.ref: %.23 = name_ref p, %p +// CHECK:STDOUT: %ImplicitAs.type: type = interface_type @ImplicitAs, @ImplicitAs(constants.%.24) [template = constants.%ImplicitAs.type.5] +// CHECK:STDOUT: %.loc76_69.1: %.25 = specific_constant imports.%import_ref.4, @ImplicitAs(constants.%.24) [template = constants.%.26] +// CHECK:STDOUT: %Convert.ref: %.25 = name_ref Convert, %.loc76_69.1 [template = constants.%.26] +// CHECK:STDOUT: %.loc76_69.2: %.24 = converted %p.ref, [template = ] // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @AccessMemberWithInvalidBaseTuple(%p: %.26) -> i32 { +// CHECK:STDOUT: fn @AccessMemberWithInvalidBaseTuple(%p: %.23) -> i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %p.ref: %.26 = name_ref p, %p +// CHECK:STDOUT: %p.ref: %.23 = name_ref p, %p // CHECK:STDOUT: %.loc78_75: ref %DeriveFromTuple = deref %p.ref // CHECK:STDOUT: %n.ref: = name_ref n, [template = ] // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @ConvertToBadBaseStruct(%p: %.33) -> %.32 { +// CHECK:STDOUT: fn @ConvertToBadBaseStruct(%p: %.29) -> %.28 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %p.ref: %.33 = name_ref p, %p -// CHECK:STDOUT: %.loc97_82.1: type = interface_type @ImplicitAs, @ImplicitAs(constants.%.32) [template = constants.%.34] -// CHECK:STDOUT: %.loc97_82.2: %.35 = specific_constant imports.%import_ref.4, @ImplicitAs(constants.%.32) [template = constants.%.36] -// CHECK:STDOUT: %Convert.ref: %.35 = name_ref Convert, %.loc97_82.2 [template = constants.%.36] -// CHECK:STDOUT: %.loc97_82.3: %.32 = converted %p.ref, [template = ] +// CHECK:STDOUT: %p.ref: %.29 = name_ref p, %p +// CHECK:STDOUT: %ImplicitAs.type: type = interface_type @ImplicitAs, @ImplicitAs(constants.%.28) [template = constants.%ImplicitAs.type.6] +// CHECK:STDOUT: %.loc97_82.1: %.30 = specific_constant imports.%import_ref.4, @ImplicitAs(constants.%.28) [template = constants.%.31] +// CHECK:STDOUT: %Convert.ref: %.30 = name_ref Convert, %.loc97_82.1 [template = constants.%.31] +// CHECK:STDOUT: %.loc97_82.2: %.28 = converted %p.ref, [template = ] // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @AccessMemberWithInvalidBaseStruct(%p: %.33) -> i32 { +// CHECK:STDOUT: fn @AccessMemberWithInvalidBaseStruct(%p: %.29) -> i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %p.ref: %.33 = name_ref p, %p +// CHECK:STDOUT: %p.ref: %.29 = name_ref p, %p // CHECK:STDOUT: %.loc100_77: ref %DeriveFromStruct = deref %p.ref // CHECK:STDOUT: %n.ref: = name_ref n, [template = ] // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @ConvertToBadBaseIncomplete(%p: %.37) -> %.38 { +// CHECK:STDOUT: fn @ConvertToBadBaseIncomplete(%p: %.32) -> %.33 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %p.ref: %.37 = name_ref p, %p -// CHECK:STDOUT: %.loc122_82.1: type = interface_type @ImplicitAs, @ImplicitAs(constants.%.38) [template = constants.%.39] -// CHECK:STDOUT: %.loc122_82.2: %.40 = specific_constant imports.%import_ref.4, @ImplicitAs(constants.%.38) [template = constants.%.41] -// CHECK:STDOUT: %Convert.ref: %.40 = name_ref Convert, %.loc122_82.2 [template = constants.%.41] -// CHECK:STDOUT: %.loc122_82.3: %.38 = converted %p.ref, [template = ] +// CHECK:STDOUT: %p.ref: %.32 = name_ref p, %p +// CHECK:STDOUT: %ImplicitAs.type: type = interface_type @ImplicitAs, @ImplicitAs(constants.%.33) [template = constants.%ImplicitAs.type.7] +// CHECK:STDOUT: %.loc122_82.1: %.34 = specific_constant imports.%import_ref.4, @ImplicitAs(constants.%.33) [template = constants.%.35] +// CHECK:STDOUT: %Convert.ref: %.34 = name_ref Convert, %.loc122_82.1 [template = constants.%.35] +// CHECK:STDOUT: %.loc122_82.2: %.33 = converted %p.ref, [template = ] // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @AccessMemberWithInvalidBaseIncomplete(%p: %.37) -> i32 { +// CHECK:STDOUT: fn @AccessMemberWithInvalidBaseIncomplete(%p: %.32) -> i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %p.ref: %.37 = name_ref p, %p +// CHECK:STDOUT: %p.ref: %.32 = name_ref p, %p // CHECK:STDOUT: %.loc124_85: ref %DeriveFromIncomplete = deref %p.ref // CHECK:STDOUT: %n.ref: = name_ref n, [template = ] // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @ConvertToBadBaseFinal(%p: %.46) -> %.47 { +// CHECK:STDOUT: fn @ConvertToBadBaseFinal(%p: %.40) -> %.41 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %p.ref: %.46 = name_ref p, %p +// CHECK:STDOUT: %p.ref: %.40 = name_ref p, %p // CHECK:STDOUT: %.loc136_11.1: ref %DeriveFromFinal = deref %p.ref // CHECK:STDOUT: %.loc136_11.2: ref %Final = class_element_access %.loc136_11.1, element0 -// CHECK:STDOUT: %.loc136_11.3: %.47 = addr_of %.loc136_11.2 -// CHECK:STDOUT: %.loc136_11.4: %.47 = converted %p.ref, %.loc136_11.3 +// CHECK:STDOUT: %.loc136_11.3: %.41 = addr_of %.loc136_11.2 +// CHECK:STDOUT: %.loc136_11.4: %.41 = converted %p.ref, %.loc136_11.3 // CHECK:STDOUT: return %.loc136_11.4 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @AccessMemberWithInvalidBaseFinal_WithMember(%p: %.46) -> i32 { +// CHECK:STDOUT: fn @AccessMemberWithInvalidBaseFinal_WithMember(%p: %.40) -> i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %p.ref: %.46 = name_ref p, %p +// CHECK:STDOUT: %p.ref: %.40 = name_ref p, %p // CHECK:STDOUT: %.loc140_11: ref %DeriveFromFinal = deref %p.ref // CHECK:STDOUT: %a.ref: %.4 = name_ref a, @Final.%.loc13_8 [template = @Final.%.loc13_8] // CHECK:STDOUT: %.loc140_14.1: ref %Final = class_element_access %.loc140_11, element0 @@ -730,9 +730,9 @@ fn AccessMemberWithInvalidBaseFinal_NoMember(p: DeriveFromFinal*) -> i32 { // CHECK:STDOUT: return %.loc140_14.4 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @AccessMemberWithInvalidBaseFinal_NoMember(%p: %.46) -> i32 { +// CHECK:STDOUT: fn @AccessMemberWithInvalidBaseFinal_NoMember(%p: %.40) -> i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %p.ref: %.46 = name_ref p, %p +// CHECK:STDOUT: %p.ref: %.40 = name_ref p, %p // CHECK:STDOUT: %.loc147: ref %DeriveFromFinal = deref %p.ref // CHECK:STDOUT: %b.ref: = name_ref b, [template = ] // CHECK:STDOUT: return @@ -752,7 +752,7 @@ fn AccessMemberWithInvalidBaseFinal_NoMember(p: DeriveFromFinal*) -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: specific @Convert(constants.%Dest, constants.%Self.1) { // CHECK:STDOUT: %Dest => constants.%Dest -// CHECK:STDOUT: %.1 => constants.%.9 +// CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.2 // CHECK:STDOUT: %Self => constants.%Self.1 // CHECK:STDOUT: } // CHECK:STDOUT: @@ -760,59 +760,59 @@ fn AccessMemberWithInvalidBaseFinal_NoMember(p: DeriveFromFinal*) -> i32 { // CHECK:STDOUT: %Dest => type // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.1 => constants.%.12 +// CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.3 // CHECK:STDOUT: %Self => constants.%Self.2 // CHECK:STDOUT: %Convert.type => constants.%Convert.type.2 // CHECK:STDOUT: %Convert => constants.%Convert.2 -// CHECK:STDOUT: %.2 => constants.%.13 -// CHECK:STDOUT: %.3 => constants.%.14 +// CHECK:STDOUT: %.1 => constants.%.11 +// CHECK:STDOUT: %.2 => constants.%.12 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @ImplicitAs(constants.%.18) { -// CHECK:STDOUT: %Dest => constants.%.18 +// CHECK:STDOUT: specific @ImplicitAs(constants.%.16) { +// CHECK:STDOUT: %Dest => constants.%.16 // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.1 => constants.%.19 +// CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.4 // CHECK:STDOUT: %Self => constants.%Self.2 // CHECK:STDOUT: %Convert.type => constants.%Convert.type.3 // CHECK:STDOUT: %Convert => constants.%Convert.3 -// CHECK:STDOUT: %.2 => constants.%.20 -// CHECK:STDOUT: %.3 => constants.%.21 +// CHECK:STDOUT: %.1 => constants.%.17 +// CHECK:STDOUT: %.2 => constants.%.18 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @ImplicitAs(constants.%.27) { -// CHECK:STDOUT: %Dest => constants.%.27 +// CHECK:STDOUT: specific @ImplicitAs(constants.%.24) { +// CHECK:STDOUT: %Dest => constants.%.24 // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.1 => constants.%.28 +// CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.5 // CHECK:STDOUT: %Self => constants.%Self.2 // CHECK:STDOUT: %Convert.type => constants.%Convert.type.4 // CHECK:STDOUT: %Convert => constants.%Convert.4 -// CHECK:STDOUT: %.2 => constants.%.29 -// CHECK:STDOUT: %.3 => constants.%.30 +// CHECK:STDOUT: %.1 => constants.%.25 +// CHECK:STDOUT: %.2 => constants.%.26 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @ImplicitAs(constants.%.32) { -// CHECK:STDOUT: %Dest => constants.%.32 +// CHECK:STDOUT: specific @ImplicitAs(constants.%.28) { +// CHECK:STDOUT: %Dest => constants.%.28 // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.1 => constants.%.34 +// CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.6 // CHECK:STDOUT: %Self => constants.%Self.2 // CHECK:STDOUT: %Convert.type => constants.%Convert.type.5 // CHECK:STDOUT: %Convert => constants.%Convert.5 -// CHECK:STDOUT: %.2 => constants.%.35 -// CHECK:STDOUT: %.3 => constants.%.36 +// CHECK:STDOUT: %.1 => constants.%.30 +// CHECK:STDOUT: %.2 => constants.%.31 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @ImplicitAs(constants.%.38) { -// CHECK:STDOUT: %Dest => constants.%.38 +// CHECK:STDOUT: specific @ImplicitAs(constants.%.33) { +// CHECK:STDOUT: %Dest => constants.%.33 // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.1 => constants.%.39 +// CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.7 // CHECK:STDOUT: %Self => constants.%Self.2 // CHECK:STDOUT: %Convert.type => constants.%Convert.type.6 // CHECK:STDOUT: %Convert => constants.%Convert.6 -// CHECK:STDOUT: %.2 => constants.%.40 -// CHECK:STDOUT: %.3 => constants.%.41 +// CHECK:STDOUT: %.1 => constants.%.34 +// CHECK:STDOUT: %.2 => constants.%.35 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/fail_compound_type_mismatch.carbon b/toolchain/check/testdata/class/fail_compound_type_mismatch.carbon index 0b16e31c5297f..02a9160630817 100644 --- a/toolchain/check/testdata/class/fail_compound_type_mismatch.carbon +++ b/toolchain/check/testdata/class/fail_compound_type_mismatch.carbon @@ -44,22 +44,22 @@ fn AccessBInA(a: A) -> i32 { // CHECK:STDOUT: %AccessBInA: %AccessBInA.type = struct_value () [template] // CHECK:STDOUT: %.8: type = ptr_type %.3 [template] // CHECK:STDOUT: %.9: type = ptr_type %.6 [template] -// CHECK:STDOUT: %ImplicitAs.type: type = generic_interface_type @ImplicitAs [template] -// CHECK:STDOUT: %ImplicitAs: %ImplicitAs.type = struct_value () [template] +// CHECK:STDOUT: %ImplicitAs.type.1: type = generic_interface_type @ImplicitAs [template] +// CHECK:STDOUT: %ImplicitAs: %ImplicitAs.type.1 = struct_value () [template] // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic] -// CHECK:STDOUT: %.10: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic] -// CHECK:STDOUT: %Self.1: @ImplicitAs.%.1 (%.10) = bind_symbolic_name Self, 1 [symbolic] -// CHECK:STDOUT: %Self.2: %.10 = bind_symbolic_name Self, 1 [symbolic] +// CHECK:STDOUT: %ImplicitAs.type.2: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic] +// CHECK:STDOUT: %Self.1: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2) = bind_symbolic_name Self, 1 [symbolic] +// CHECK:STDOUT: %Self.2: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: %Convert.type.1: type = fn_type @Convert, @ImplicitAs(%Dest) [symbolic] // CHECK:STDOUT: %Convert.1: %Convert.type.1 = struct_value () [symbolic] -// CHECK:STDOUT: %.11: type = assoc_entity_type %.10, %Convert.type.1 [symbolic] -// CHECK:STDOUT: %.12: %.11 = assoc_entity element0, imports.%import_ref.6 [symbolic] -// CHECK:STDOUT: %.13: type = interface_type @ImplicitAs, @ImplicitAs(%B) [template] +// CHECK:STDOUT: %.10: type = assoc_entity_type %ImplicitAs.type.2, %Convert.type.1 [symbolic] +// CHECK:STDOUT: %.11: %.10 = assoc_entity element0, imports.%import_ref.6 [symbolic] +// CHECK:STDOUT: %ImplicitAs.type.3: type = interface_type @ImplicitAs, @ImplicitAs(%B) [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert, @ImplicitAs(%B) [template] // CHECK:STDOUT: %Convert.2: %Convert.type.2 = struct_value () [template] -// CHECK:STDOUT: %.14: type = assoc_entity_type %.13, %Convert.type.2 [template] -// CHECK:STDOUT: %.15: %.14 = assoc_entity element0, imports.%import_ref.6 [template] -// CHECK:STDOUT: %.16: %.11 = assoc_entity element0, imports.%import_ref.7 [symbolic] +// CHECK:STDOUT: %.12: type = assoc_entity_type %ImplicitAs.type.3, %Convert.type.2 [template] +// CHECK:STDOUT: %.13: %.12 = assoc_entity element0, imports.%import_ref.6 [template] +// CHECK:STDOUT: %.14: %.10 = assoc_entity element0, imports.%import_ref.7 [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -76,9 +76,9 @@ fn AccessBInA(a: A) -> i32 { // CHECK:STDOUT: import Core//prelude/types/bool // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref Core//prelude/types, inst+4, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.2: %ImplicitAs.type = import_ref Core//prelude/operators/as, inst+40, loaded [template = constants.%ImplicitAs] +// CHECK:STDOUT: %import_ref.2: %ImplicitAs.type.1 = import_ref Core//prelude/operators/as, inst+40, loaded [template = constants.%ImplicitAs] // CHECK:STDOUT: %import_ref.3 = import_ref Core//prelude/operators/as, inst+45, unloaded -// CHECK:STDOUT: %import_ref.4: @ImplicitAs.%.2 (%.11) = import_ref Core//prelude/operators/as, inst+63, loaded [symbolic = @ImplicitAs.%.3 (constants.%.16)] +// CHECK:STDOUT: %import_ref.4: @ImplicitAs.%.1 (%.10) = import_ref Core//prelude/operators/as, inst+63, loaded [symbolic = @ImplicitAs.%.2 (constants.%.14)] // CHECK:STDOUT: %import_ref.5 = import_ref Core//prelude/operators/as, inst+56, unloaded // CHECK:STDOUT: %import_ref.6 = import_ref Core//prelude/operators/as, inst+56, unloaded // CHECK:STDOUT: %import_ref.7 = import_ref Core//prelude/operators/as, inst+56, unloaded @@ -111,12 +111,12 @@ fn AccessBInA(a: A) -> i32 { // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic = %Dest (constants.%Dest)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.1: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic = %.1 (constants.%.10)] -// CHECK:STDOUT: %Self: %.10 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] +// CHECK:STDOUT: %ImplicitAs.type: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.2)] +// CHECK:STDOUT: %Self: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] // CHECK:STDOUT: %Convert.type: type = fn_type @Convert, @ImplicitAs(%Dest) [symbolic = %Convert.type (constants.%Convert.type.1)] // CHECK:STDOUT: %Convert: @ImplicitAs.%Convert.type (%Convert.type.1) = struct_value () [symbolic = %Convert (constants.%Convert.1)] -// CHECK:STDOUT: %.2: type = assoc_entity_type @ImplicitAs.%.1 (%.10), @ImplicitAs.%Convert.type (%Convert.type.1) [symbolic = %.2 (constants.%.11)] -// CHECK:STDOUT: %.3: @ImplicitAs.%.2 (%.11) = assoc_entity element0, imports.%import_ref.6 [symbolic = %.3 (constants.%.12)] +// CHECK:STDOUT: %.1: type = assoc_entity_type @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2), @ImplicitAs.%Convert.type (%Convert.type.1) [symbolic = %.1 (constants.%.10)] +// CHECK:STDOUT: %.2: @ImplicitAs.%.1 (%.10) = assoc_entity element0, imports.%import_ref.6 [symbolic = %.2 (constants.%.11)] // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: !members: @@ -157,18 +157,18 @@ fn AccessBInA(a: A) -> i32 { // CHECK:STDOUT: %a.ref: %A = name_ref a, %a // CHECK:STDOUT: %B.ref: type = name_ref B, file.%B.decl [template = constants.%B] // CHECK:STDOUT: %b.ref: %.5 = name_ref b, @B.%.loc16_8 [template = @B.%.loc16_8] -// CHECK:STDOUT: %.loc26_11.1: type = interface_type @ImplicitAs, @ImplicitAs(constants.%B) [template = constants.%.13] -// CHECK:STDOUT: %.loc26_11.2: %.14 = specific_constant imports.%import_ref.4, @ImplicitAs(constants.%B) [template = constants.%.15] -// CHECK:STDOUT: %Convert.ref: %.14 = name_ref Convert, %.loc26_11.2 [template = constants.%.15] -// CHECK:STDOUT: %.loc26_11.3: %B = converted %a.ref, [template = ] -// CHECK:STDOUT: %.loc26_11.4: i32 = class_element_access , element0 [template = ] +// CHECK:STDOUT: %ImplicitAs.type: type = interface_type @ImplicitAs, @ImplicitAs(constants.%B) [template = constants.%ImplicitAs.type.3] +// CHECK:STDOUT: %.loc26_11.1: %.12 = specific_constant imports.%import_ref.4, @ImplicitAs(constants.%B) [template = constants.%.13] +// CHECK:STDOUT: %Convert.ref: %.12 = name_ref Convert, %.loc26_11.1 [template = constants.%.13] +// CHECK:STDOUT: %.loc26_11.2: %B = converted %a.ref, [template = ] +// CHECK:STDOUT: %.loc26_11.3: i32 = class_element_access , element0 [template = ] // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @Convert(constants.%Dest: type, constants.%Self.1: @ImplicitAs.%.1 (%.10)) { +// CHECK:STDOUT: generic fn @Convert(constants.%Dest: type, constants.%Self.1: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2)) { // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic = %Dest (constants.%Dest)] -// CHECK:STDOUT: %.1: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic = %.1 (constants.%.10)] -// CHECK:STDOUT: %Self: %.10 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] +// CHECK:STDOUT: %ImplicitAs.type: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.2)] +// CHECK:STDOUT: %Self: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] // CHECK:STDOUT: // CHECK:STDOUT: fn[%self: @Convert.%Self (%Self.2)]() -> @Convert.%Dest (%Dest); // CHECK:STDOUT: } @@ -187,7 +187,7 @@ fn AccessBInA(a: A) -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: specific @Convert(constants.%Dest, constants.%Self.1) { // CHECK:STDOUT: %Dest => constants.%Dest -// CHECK:STDOUT: %.1 => constants.%.10 +// CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.2 // CHECK:STDOUT: %Self => constants.%Self.1 // CHECK:STDOUT: } // CHECK:STDOUT: @@ -195,11 +195,11 @@ fn AccessBInA(a: A) -> i32 { // CHECK:STDOUT: %Dest => constants.%B // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.1 => constants.%.13 +// CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.3 // CHECK:STDOUT: %Self => constants.%Self.2 // CHECK:STDOUT: %Convert.type => constants.%Convert.type.2 // CHECK:STDOUT: %Convert => constants.%Convert.2 -// CHECK:STDOUT: %.2 => constants.%.14 -// CHECK:STDOUT: %.3 => constants.%.15 +// CHECK:STDOUT: %.1 => constants.%.12 +// CHECK:STDOUT: %.2 => constants.%.13 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/fail_derived_to_base.carbon b/toolchain/check/testdata/class/fail_derived_to_base.carbon index a5e11d3851158..c68f5615475b2 100644 --- a/toolchain/check/testdata/class/fail_derived_to_base.carbon +++ b/toolchain/check/testdata/class/fail_derived_to_base.carbon @@ -65,32 +65,32 @@ fn ConvertIncomplete(p: Incomplete*) -> A2* { return p; } // CHECK:STDOUT: %.13: type = struct_type {.base: %.6, .b: i32} [template] // CHECK:STDOUT: %.14: type = ptr_type %.13 [template] // CHECK:STDOUT: %.15: type = ptr_type %.9 [template] -// CHECK:STDOUT: %ImplicitAs.type: type = generic_interface_type @ImplicitAs [template] -// CHECK:STDOUT: %ImplicitAs: %ImplicitAs.type = struct_value () [template] +// CHECK:STDOUT: %ImplicitAs.type.1: type = generic_interface_type @ImplicitAs [template] +// CHECK:STDOUT: %ImplicitAs: %ImplicitAs.type.1 = struct_value () [template] // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic] -// CHECK:STDOUT: %.16: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic] -// CHECK:STDOUT: %Self.1: @ImplicitAs.%.1 (%.16) = bind_symbolic_name Self, 1 [symbolic] -// CHECK:STDOUT: %Self.2: %.16 = bind_symbolic_name Self, 1 [symbolic] +// CHECK:STDOUT: %ImplicitAs.type.2: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic] +// CHECK:STDOUT: %Self.1: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2) = bind_symbolic_name Self, 1 [symbolic] +// CHECK:STDOUT: %Self.2: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: %Convert.type.1: type = fn_type @Convert, @ImplicitAs(%Dest) [symbolic] // CHECK:STDOUT: %Convert.1: %Convert.type.1 = struct_value () [symbolic] -// CHECK:STDOUT: %.17: type = assoc_entity_type %.16, %Convert.type.1 [symbolic] -// CHECK:STDOUT: %.18: %.17 = assoc_entity element0, imports.%import_ref.6 [symbolic] -// CHECK:STDOUT: %.19: type = interface_type @ImplicitAs, @ImplicitAs(%.12) [template] +// CHECK:STDOUT: %.16: type = assoc_entity_type %ImplicitAs.type.2, %Convert.type.1 [symbolic] +// CHECK:STDOUT: %.17: %.16 = assoc_entity element0, imports.%import_ref.6 [symbolic] +// CHECK:STDOUT: %ImplicitAs.type.3: type = interface_type @ImplicitAs, @ImplicitAs(%.12) [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert, @ImplicitAs(%.12) [template] // CHECK:STDOUT: %Convert.2: %Convert.type.2 = struct_value () [template] -// CHECK:STDOUT: %.20: type = assoc_entity_type %.19, %Convert.type.2 [template] -// CHECK:STDOUT: %.21: %.20 = assoc_entity element0, imports.%import_ref.6 [template] -// CHECK:STDOUT: %.22: %.17 = assoc_entity element0, imports.%import_ref.7 [symbolic] +// CHECK:STDOUT: %.18: type = assoc_entity_type %ImplicitAs.type.3, %Convert.type.2 [template] +// CHECK:STDOUT: %.19: %.18 = assoc_entity element0, imports.%import_ref.6 [template] +// CHECK:STDOUT: %.20: %.16 = assoc_entity element0, imports.%import_ref.7 [symbolic] // CHECK:STDOUT: %Incomplete: type = class_type @Incomplete [template] -// CHECK:STDOUT: %.23: type = ptr_type %Incomplete [template] -// CHECK:STDOUT: %.24: type = ptr_type %A2 [template] +// CHECK:STDOUT: %.21: type = ptr_type %Incomplete [template] +// CHECK:STDOUT: %.22: type = ptr_type %A2 [template] // CHECK:STDOUT: %ConvertIncomplete.type: type = fn_type @ConvertIncomplete [template] // CHECK:STDOUT: %ConvertIncomplete: %ConvertIncomplete.type = struct_value () [template] -// CHECK:STDOUT: %.25: type = interface_type @ImplicitAs, @ImplicitAs(%.24) [template] -// CHECK:STDOUT: %Convert.type.3: type = fn_type @Convert, @ImplicitAs(%.24) [template] +// CHECK:STDOUT: %ImplicitAs.type.4: type = interface_type @ImplicitAs, @ImplicitAs(%.22) [template] +// CHECK:STDOUT: %Convert.type.3: type = fn_type @Convert, @ImplicitAs(%.22) [template] // CHECK:STDOUT: %Convert.3: %Convert.type.3 = struct_value () [template] -// CHECK:STDOUT: %.26: type = assoc_entity_type %.25, %Convert.type.3 [template] -// CHECK:STDOUT: %.27: %.26 = assoc_entity element0, imports.%import_ref.6 [template] +// CHECK:STDOUT: %.23: type = assoc_entity_type %ImplicitAs.type.4, %Convert.type.3 [template] +// CHECK:STDOUT: %.24: %.23 = assoc_entity element0, imports.%import_ref.6 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -107,9 +107,9 @@ fn ConvertIncomplete(p: Incomplete*) -> A2* { return p; } // CHECK:STDOUT: import Core//prelude/types/bool // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref Core//prelude/types, inst+4, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.2: %ImplicitAs.type = import_ref Core//prelude/operators/as, inst+40, loaded [template = constants.%ImplicitAs] +// CHECK:STDOUT: %import_ref.2: %ImplicitAs.type.1 = import_ref Core//prelude/operators/as, inst+40, loaded [template = constants.%ImplicitAs] // CHECK:STDOUT: %import_ref.3 = import_ref Core//prelude/operators/as, inst+45, unloaded -// CHECK:STDOUT: %import_ref.4: @ImplicitAs.%.2 (%.17) = import_ref Core//prelude/operators/as, inst+63, loaded [symbolic = @ImplicitAs.%.3 (constants.%.22)] +// CHECK:STDOUT: %import_ref.4: @ImplicitAs.%.1 (%.16) = import_ref Core//prelude/operators/as, inst+63, loaded [symbolic = @ImplicitAs.%.2 (constants.%.20)] // CHECK:STDOUT: %import_ref.5 = import_ref Core//prelude/operators/as, inst+56, unloaded // CHECK:STDOUT: %import_ref.6 = import_ref Core//prelude/operators/as, inst+56, unloaded // CHECK:STDOUT: %import_ref.7 = import_ref Core//prelude/operators/as, inst+56, unloaded @@ -142,15 +142,15 @@ fn ConvertIncomplete(p: Incomplete*) -> A2* { return p; } // CHECK:STDOUT: } // CHECK:STDOUT: %Incomplete.decl: type = class_decl @Incomplete [template = constants.%Incomplete] {} {} // CHECK:STDOUT: %ConvertIncomplete.decl: %ConvertIncomplete.type = fn_decl @ConvertIncomplete [template = constants.%ConvertIncomplete] { -// CHECK:STDOUT: %p.patt: %.23 = binding_pattern p +// CHECK:STDOUT: %p.patt: %.21 = binding_pattern p // CHECK:STDOUT: } { // CHECK:STDOUT: %Incomplete.ref: type = name_ref Incomplete, file.%Incomplete.decl [template = constants.%Incomplete] -// CHECK:STDOUT: %.loc41_35: type = ptr_type %Incomplete [template = constants.%.23] -// CHECK:STDOUT: %p.param: %.23 = param p, runtime_param0 -// CHECK:STDOUT: %p: %.23 = bind_name p, %p.param +// CHECK:STDOUT: %.loc41_35: type = ptr_type %Incomplete [template = constants.%.21] +// CHECK:STDOUT: %p.param: %.21 = param p, runtime_param0 +// CHECK:STDOUT: %p: %.21 = bind_name p, %p.param // CHECK:STDOUT: %A2.ref: type = name_ref A2, file.%A2.decl [template = constants.%A2] -// CHECK:STDOUT: %.loc41_43: type = ptr_type %A2 [template = constants.%.24] -// CHECK:STDOUT: %return: ref %.24 = var +// CHECK:STDOUT: %.loc41_43: type = ptr_type %A2 [template = constants.%.22] +// CHECK:STDOUT: %return: ref %.22 = var // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -158,12 +158,12 @@ fn ConvertIncomplete(p: Incomplete*) -> A2* { return p; } // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic = %Dest (constants.%Dest)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.1: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic = %.1 (constants.%.16)] -// CHECK:STDOUT: %Self: %.16 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] +// CHECK:STDOUT: %ImplicitAs.type: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.2)] +// CHECK:STDOUT: %Self: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] // CHECK:STDOUT: %Convert.type: type = fn_type @Convert, @ImplicitAs(%Dest) [symbolic = %Convert.type (constants.%Convert.type.1)] // CHECK:STDOUT: %Convert: @ImplicitAs.%Convert.type (%Convert.type.1) = struct_value () [symbolic = %Convert (constants.%Convert.1)] -// CHECK:STDOUT: %.2: type = assoc_entity_type @ImplicitAs.%.1 (%.16), @ImplicitAs.%Convert.type (%Convert.type.1) [symbolic = %.2 (constants.%.17)] -// CHECK:STDOUT: %.3: @ImplicitAs.%.2 (%.17) = assoc_entity element0, imports.%import_ref.6 [symbolic = %.3 (constants.%.18)] +// CHECK:STDOUT: %.1: type = assoc_entity_type @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2), @ImplicitAs.%Convert.type (%Convert.type.1) [symbolic = %.1 (constants.%.16)] +// CHECK:STDOUT: %.2: @ImplicitAs.%.1 (%.16) = assoc_entity element0, imports.%import_ref.6 [symbolic = %.2 (constants.%.17)] // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: !members: @@ -220,28 +220,28 @@ fn ConvertIncomplete(p: Incomplete*) -> A2* { return p; } // CHECK:STDOUT: fn @ConvertUnrelated(%p: %.11) -> %.12 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %p.ref: %.11 = name_ref p, %p -// CHECK:STDOUT: %.loc31_46.1: type = interface_type @ImplicitAs, @ImplicitAs(constants.%.12) [template = constants.%.19] -// CHECK:STDOUT: %.loc31_46.2: %.20 = specific_constant imports.%import_ref.4, @ImplicitAs(constants.%.12) [template = constants.%.21] -// CHECK:STDOUT: %Convert.ref: %.20 = name_ref Convert, %.loc31_46.2 [template = constants.%.21] -// CHECK:STDOUT: %.loc31_46.3: %.12 = converted %p.ref, [template = ] +// CHECK:STDOUT: %ImplicitAs.type: type = interface_type @ImplicitAs, @ImplicitAs(constants.%.12) [template = constants.%ImplicitAs.type.3] +// CHECK:STDOUT: %.loc31_46.1: %.18 = specific_constant imports.%import_ref.4, @ImplicitAs(constants.%.12) [template = constants.%.19] +// CHECK:STDOUT: %Convert.ref: %.18 = name_ref Convert, %.loc31_46.1 [template = constants.%.19] +// CHECK:STDOUT: %.loc31_46.2: %.12 = converted %p.ref, [template = ] // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @Convert(constants.%Dest: type, constants.%Self.1: @ImplicitAs.%.1 (%.16)) { +// CHECK:STDOUT: generic fn @Convert(constants.%Dest: type, constants.%Self.1: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2)) { // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic = %Dest (constants.%Dest)] -// CHECK:STDOUT: %.1: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic = %.1 (constants.%.16)] -// CHECK:STDOUT: %Self: %.16 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] +// CHECK:STDOUT: %ImplicitAs.type: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.2)] +// CHECK:STDOUT: %Self: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] // CHECK:STDOUT: // CHECK:STDOUT: fn[%self: @Convert.%Self (%Self.2)]() -> @Convert.%Dest (%Dest); // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @ConvertIncomplete(%p: %.23) -> %.24 { +// CHECK:STDOUT: fn @ConvertIncomplete(%p: %.21) -> %.22 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %p.ref: %.23 = name_ref p, %p -// CHECK:STDOUT: %.loc41_55.1: type = interface_type @ImplicitAs, @ImplicitAs(constants.%.24) [template = constants.%.25] -// CHECK:STDOUT: %.loc41_55.2: %.26 = specific_constant imports.%import_ref.4, @ImplicitAs(constants.%.24) [template = constants.%.27] -// CHECK:STDOUT: %Convert.ref: %.26 = name_ref Convert, %.loc41_55.2 [template = constants.%.27] -// CHECK:STDOUT: %.loc41_55.3: %.24 = converted %p.ref, [template = ] +// CHECK:STDOUT: %p.ref: %.21 = name_ref p, %p +// CHECK:STDOUT: %ImplicitAs.type: type = interface_type @ImplicitAs, @ImplicitAs(constants.%.22) [template = constants.%ImplicitAs.type.4] +// CHECK:STDOUT: %.loc41_55.1: %.23 = specific_constant imports.%import_ref.4, @ImplicitAs(constants.%.22) [template = constants.%.24] +// CHECK:STDOUT: %Convert.ref: %.23 = name_ref Convert, %.loc41_55.1 [template = constants.%.24] +// CHECK:STDOUT: %.loc41_55.2: %.22 = converted %p.ref, [template = ] // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -259,7 +259,7 @@ fn ConvertIncomplete(p: Incomplete*) -> A2* { return p; } // CHECK:STDOUT: // CHECK:STDOUT: specific @Convert(constants.%Dest, constants.%Self.1) { // CHECK:STDOUT: %Dest => constants.%Dest -// CHECK:STDOUT: %.1 => constants.%.16 +// CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.2 // CHECK:STDOUT: %Self => constants.%Self.1 // CHECK:STDOUT: } // CHECK:STDOUT: @@ -267,23 +267,23 @@ fn ConvertIncomplete(p: Incomplete*) -> A2* { return p; } // CHECK:STDOUT: %Dest => constants.%.12 // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.1 => constants.%.19 +// CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.3 // CHECK:STDOUT: %Self => constants.%Self.2 // CHECK:STDOUT: %Convert.type => constants.%Convert.type.2 // CHECK:STDOUT: %Convert => constants.%Convert.2 -// CHECK:STDOUT: %.2 => constants.%.20 -// CHECK:STDOUT: %.3 => constants.%.21 +// CHECK:STDOUT: %.1 => constants.%.18 +// CHECK:STDOUT: %.2 => constants.%.19 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @ImplicitAs(constants.%.24) { -// CHECK:STDOUT: %Dest => constants.%.24 +// CHECK:STDOUT: specific @ImplicitAs(constants.%.22) { +// CHECK:STDOUT: %Dest => constants.%.22 // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.1 => constants.%.25 +// CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.4 // CHECK:STDOUT: %Self => constants.%Self.2 // CHECK:STDOUT: %Convert.type => constants.%Convert.type.3 // CHECK:STDOUT: %Convert => constants.%Convert.3 -// CHECK:STDOUT: %.2 => constants.%.26 -// CHECK:STDOUT: %.3 => constants.%.27 +// CHECK:STDOUT: %.1 => constants.%.23 +// CHECK:STDOUT: %.2 => constants.%.24 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/fail_self.carbon b/toolchain/check/testdata/class/fail_self.carbon index d33b95d0c010f..b992c830ff92b 100644 --- a/toolchain/check/testdata/class/fail_self.carbon +++ b/toolchain/check/testdata/class/fail_self.carbon @@ -72,22 +72,22 @@ fn CallWrongSelf(ws: WrongSelf) { // CHECK:STDOUT: %F.2: %F.type.2 = struct_value () [template] // CHECK:STDOUT: %CallWrongSelf.type: type = fn_type @CallWrongSelf [template] // CHECK:STDOUT: %CallWrongSelf: %CallWrongSelf.type = struct_value () [template] -// CHECK:STDOUT: %ImplicitAs.type: type = generic_interface_type @ImplicitAs [template] -// CHECK:STDOUT: %ImplicitAs: %ImplicitAs.type = struct_value () [template] +// CHECK:STDOUT: %ImplicitAs.type.1: type = generic_interface_type @ImplicitAs [template] +// CHECK:STDOUT: %ImplicitAs: %ImplicitAs.type.1 = struct_value () [template] // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic] -// CHECK:STDOUT: %.5: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic] -// CHECK:STDOUT: %Self.1: @ImplicitAs.%.1 (%.5) = bind_symbolic_name Self, 1 [symbolic] -// CHECK:STDOUT: %Self.2: %.5 = bind_symbolic_name Self, 1 [symbolic] +// CHECK:STDOUT: %ImplicitAs.type.2: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic] +// CHECK:STDOUT: %Self.1: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2) = bind_symbolic_name Self, 1 [symbolic] +// CHECK:STDOUT: %Self.2: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: %Convert.type.1: type = fn_type @Convert, @ImplicitAs(%Dest) [symbolic] // CHECK:STDOUT: %Convert.1: %Convert.type.1 = struct_value () [symbolic] -// CHECK:STDOUT: %.6: type = assoc_entity_type %.5, %Convert.type.1 [symbolic] -// CHECK:STDOUT: %.7: %.6 = assoc_entity element0, imports.%import_ref.5 [symbolic] -// CHECK:STDOUT: %.8: type = interface_type @ImplicitAs, @ImplicitAs(%Class) [template] +// CHECK:STDOUT: %.5: type = assoc_entity_type %ImplicitAs.type.2, %Convert.type.1 [symbolic] +// CHECK:STDOUT: %.6: %.5 = assoc_entity element0, imports.%import_ref.5 [symbolic] +// CHECK:STDOUT: %ImplicitAs.type.3: type = interface_type @ImplicitAs, @ImplicitAs(%Class) [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert, @ImplicitAs(%Class) [template] // CHECK:STDOUT: %Convert.2: %Convert.type.2 = struct_value () [template] -// CHECK:STDOUT: %.9: type = assoc_entity_type %.8, %Convert.type.2 [template] -// CHECK:STDOUT: %.10: %.9 = assoc_entity element0, imports.%import_ref.5 [template] -// CHECK:STDOUT: %.11: %.6 = assoc_entity element0, imports.%import_ref.6 [symbolic] +// CHECK:STDOUT: %.7: type = assoc_entity_type %ImplicitAs.type.3, %Convert.type.2 [template] +// CHECK:STDOUT: %.8: %.7 = assoc_entity element0, imports.%import_ref.5 [template] +// CHECK:STDOUT: %.9: %.5 = assoc_entity element0, imports.%import_ref.6 [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -102,9 +102,9 @@ fn CallWrongSelf(ws: WrongSelf) { // CHECK:STDOUT: import Core//prelude/operators/comparison // CHECK:STDOUT: import Core//prelude/types/bool // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.1: %ImplicitAs.type = import_ref Core//prelude/operators/as, inst+40, loaded [template = constants.%ImplicitAs] +// CHECK:STDOUT: %import_ref.1: %ImplicitAs.type.1 = import_ref Core//prelude/operators/as, inst+40, loaded [template = constants.%ImplicitAs] // CHECK:STDOUT: %import_ref.2 = import_ref Core//prelude/operators/as, inst+45, unloaded -// CHECK:STDOUT: %import_ref.3: @ImplicitAs.%.2 (%.6) = import_ref Core//prelude/operators/as, inst+63, loaded [symbolic = @ImplicitAs.%.3 (constants.%.11)] +// CHECK:STDOUT: %import_ref.3: @ImplicitAs.%.1 (%.5) = import_ref Core//prelude/operators/as, inst+63, loaded [symbolic = @ImplicitAs.%.2 (constants.%.9)] // CHECK:STDOUT: %import_ref.4 = import_ref Core//prelude/operators/as, inst+56, unloaded // CHECK:STDOUT: %import_ref.5 = import_ref Core//prelude/operators/as, inst+56, unloaded // CHECK:STDOUT: %import_ref.6 = import_ref Core//prelude/operators/as, inst+56, unloaded @@ -144,12 +144,12 @@ fn CallWrongSelf(ws: WrongSelf) { // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic = %Dest (constants.%Dest)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.1: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic = %.1 (constants.%.5)] -// CHECK:STDOUT: %Self: %.5 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] +// CHECK:STDOUT: %ImplicitAs.type: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.2)] +// CHECK:STDOUT: %Self: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] // CHECK:STDOUT: %Convert.type: type = fn_type @Convert, @ImplicitAs(%Dest) [symbolic = %Convert.type (constants.%Convert.type.1)] // CHECK:STDOUT: %Convert: @ImplicitAs.%Convert.type (%Convert.type.1) = struct_value () [symbolic = %Convert (constants.%Convert.1)] -// CHECK:STDOUT: %.2: type = assoc_entity_type @ImplicitAs.%.1 (%.5), @ImplicitAs.%Convert.type (%Convert.type.1) [symbolic = %.2 (constants.%.6)] -// CHECK:STDOUT: %.3: @ImplicitAs.%.2 (%.6) = assoc_entity element0, imports.%import_ref.5 [symbolic = %.3 (constants.%.7)] +// CHECK:STDOUT: %.1: type = assoc_entity_type @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2), @ImplicitAs.%Convert.type (%Convert.type.1) [symbolic = %.1 (constants.%.5)] +// CHECK:STDOUT: %.2: @ImplicitAs.%.1 (%.5) = assoc_entity element0, imports.%import_ref.5 [symbolic = %.2 (constants.%.6)] // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: !members: @@ -216,18 +216,18 @@ fn CallWrongSelf(ws: WrongSelf) { // CHECK:STDOUT: %ws.ref: %WrongSelf = name_ref ws, %ws // CHECK:STDOUT: %F.ref: %F.type.2 = name_ref F, @WrongSelf.%F.decl [template = constants.%F.2] // CHECK:STDOUT: %.loc55_5: = bound_method %ws.ref, %F.ref -// CHECK:STDOUT: %.loc55_7.1: type = interface_type @ImplicitAs, @ImplicitAs(constants.%Class) [template = constants.%.8] -// CHECK:STDOUT: %.loc55_7.2: %.9 = specific_constant imports.%import_ref.3, @ImplicitAs(constants.%Class) [template = constants.%.10] -// CHECK:STDOUT: %Convert.ref: %.9 = name_ref Convert, %.loc55_7.2 [template = constants.%.10] -// CHECK:STDOUT: %.loc55_7.3: %Class = converted %ws.ref, [template = ] +// CHECK:STDOUT: %ImplicitAs.type: type = interface_type @ImplicitAs, @ImplicitAs(constants.%Class) [template = constants.%ImplicitAs.type.3] +// CHECK:STDOUT: %.loc55_7.1: %.7 = specific_constant imports.%import_ref.3, @ImplicitAs(constants.%Class) [template = constants.%.8] +// CHECK:STDOUT: %Convert.ref: %.7 = name_ref Convert, %.loc55_7.1 [template = constants.%.8] +// CHECK:STDOUT: %.loc55_7.2: %Class = converted %ws.ref, [template = ] // CHECK:STDOUT: %F.call: init %.1 = call %.loc55_5() [template = ] // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @Convert(constants.%Dest: type, constants.%Self.1: @ImplicitAs.%.1 (%.5)) { +// CHECK:STDOUT: generic fn @Convert(constants.%Dest: type, constants.%Self.1: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2)) { // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic = %Dest (constants.%Dest)] -// CHECK:STDOUT: %.1: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic = %.1 (constants.%.5)] -// CHECK:STDOUT: %Self: %.5 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] +// CHECK:STDOUT: %ImplicitAs.type: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.2)] +// CHECK:STDOUT: %Self: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] // CHECK:STDOUT: // CHECK:STDOUT: fn[%self: @Convert.%Self (%Self.2)]() -> @Convert.%Dest (%Dest); // CHECK:STDOUT: } @@ -246,7 +246,7 @@ fn CallWrongSelf(ws: WrongSelf) { // CHECK:STDOUT: // CHECK:STDOUT: specific @Convert(constants.%Dest, constants.%Self.1) { // CHECK:STDOUT: %Dest => constants.%Dest -// CHECK:STDOUT: %.1 => constants.%.5 +// CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.2 // CHECK:STDOUT: %Self => constants.%Self.1 // CHECK:STDOUT: } // CHECK:STDOUT: @@ -254,11 +254,11 @@ fn CallWrongSelf(ws: WrongSelf) { // CHECK:STDOUT: %Dest => constants.%Class // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.1 => constants.%.8 +// CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.3 // CHECK:STDOUT: %Self => constants.%Self.2 // CHECK:STDOUT: %Convert.type => constants.%Convert.type.2 // CHECK:STDOUT: %Convert => constants.%Convert.2 -// CHECK:STDOUT: %.2 => constants.%.9 -// CHECK:STDOUT: %.3 => constants.%.10 +// CHECK:STDOUT: %.1 => constants.%.7 +// CHECK:STDOUT: %.2 => constants.%.8 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/generic/call.carbon b/toolchain/check/testdata/class/generic/call.carbon index 7f5478bf48335..8f1f6743cc95a 100644 --- a/toolchain/check/testdata/class/generic/call.carbon +++ b/toolchain/check/testdata/class/generic/call.carbon @@ -373,22 +373,22 @@ class Outer(T:! type) { // CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] // CHECK:STDOUT: %.4: i32 = int_literal 5 [template] // CHECK:STDOUT: %.5: type = ptr_type i32 [template] -// CHECK:STDOUT: %ImplicitAs.type: type = generic_interface_type @ImplicitAs [template] -// CHECK:STDOUT: %ImplicitAs: %ImplicitAs.type = struct_value () [template] +// CHECK:STDOUT: %ImplicitAs.type.1: type = generic_interface_type @ImplicitAs [template] +// CHECK:STDOUT: %ImplicitAs: %ImplicitAs.type.1 = struct_value () [template] // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic] -// CHECK:STDOUT: %.6: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic] -// CHECK:STDOUT: %Self.1: @ImplicitAs.%.1 (%.6) = bind_symbolic_name Self, 1 [symbolic] -// CHECK:STDOUT: %Self.2: %.6 = bind_symbolic_name Self, 1 [symbolic] +// CHECK:STDOUT: %ImplicitAs.type.2: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic] +// CHECK:STDOUT: %Self.1: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2) = bind_symbolic_name Self, 1 [symbolic] +// CHECK:STDOUT: %Self.2: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: %Convert.type.1: type = fn_type @Convert, @ImplicitAs(%Dest) [symbolic] // CHECK:STDOUT: %Convert.1: %Convert.type.1 = struct_value () [symbolic] -// CHECK:STDOUT: %.7: type = assoc_entity_type %.6, %Convert.type.1 [symbolic] -// CHECK:STDOUT: %.8: %.7 = assoc_entity element0, imports.%import_ref.6 [symbolic] -// CHECK:STDOUT: %.9: type = interface_type @ImplicitAs, @ImplicitAs(type) [template] +// CHECK:STDOUT: %.6: type = assoc_entity_type %ImplicitAs.type.2, %Convert.type.1 [symbolic] +// CHECK:STDOUT: %.7: %.6 = assoc_entity element0, imports.%import_ref.6 [symbolic] +// CHECK:STDOUT: %ImplicitAs.type.3: type = interface_type @ImplicitAs, @ImplicitAs(type) [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert, @ImplicitAs(type) [template] // CHECK:STDOUT: %Convert.2: %Convert.type.2 = struct_value () [template] -// CHECK:STDOUT: %.10: type = assoc_entity_type %.9, %Convert.type.2 [template] -// CHECK:STDOUT: %.11: %.10 = assoc_entity element0, imports.%import_ref.6 [template] -// CHECK:STDOUT: %.12: %.7 = assoc_entity element0, imports.%import_ref.7 [symbolic] +// CHECK:STDOUT: %.8: type = assoc_entity_type %ImplicitAs.type.3, %Convert.type.2 [template] +// CHECK:STDOUT: %.9: %.8 = assoc_entity element0, imports.%import_ref.6 [template] +// CHECK:STDOUT: %.10: %.6 = assoc_entity element0, imports.%import_ref.7 [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -405,9 +405,9 @@ class Outer(T:! type) { // CHECK:STDOUT: import Core//prelude/types/bool // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref Core//prelude/types, inst+4, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.2: %ImplicitAs.type = import_ref Core//prelude/operators/as, inst+40, loaded [template = constants.%ImplicitAs] +// CHECK:STDOUT: %import_ref.2: %ImplicitAs.type.1 = import_ref Core//prelude/operators/as, inst+40, loaded [template = constants.%ImplicitAs] // CHECK:STDOUT: %import_ref.3 = import_ref Core//prelude/operators/as, inst+45, unloaded -// CHECK:STDOUT: %import_ref.4: @ImplicitAs.%.2 (%.7) = import_ref Core//prelude/operators/as, inst+63, loaded [symbolic = @ImplicitAs.%.3 (constants.%.12)] +// CHECK:STDOUT: %import_ref.4: @ImplicitAs.%.1 (%.6) = import_ref Core//prelude/operators/as, inst+63, loaded [symbolic = @ImplicitAs.%.2 (constants.%.10)] // CHECK:STDOUT: %import_ref.5 = import_ref Core//prelude/operators/as, inst+56, unloaded // CHECK:STDOUT: %import_ref.6 = import_ref Core//prelude/operators/as, inst+56, unloaded // CHECK:STDOUT: %import_ref.7 = import_ref Core//prelude/operators/as, inst+56, unloaded @@ -438,10 +438,10 @@ class Outer(T:! type) { // CHECK:STDOUT: %.loc15_20.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc15_20.2: type = converted %int.make_type_32, %.loc15_20.1 [template = i32] // CHECK:STDOUT: %.loc15_20.3: type = ptr_type i32 [template = constants.%.5] -// CHECK:STDOUT: %.loc15_13.1: type = interface_type @ImplicitAs, @ImplicitAs(type) [template = constants.%.9] -// CHECK:STDOUT: %.loc15_13.2: %.10 = specific_constant imports.%import_ref.4, @ImplicitAs(type) [template = constants.%.11] -// CHECK:STDOUT: %Convert.ref: %.10 = name_ref Convert, %.loc15_13.2 [template = constants.%.11] -// CHECK:STDOUT: %.loc15_13.3: type = converted %.loc15_14, [template = ] +// CHECK:STDOUT: %ImplicitAs.type: type = interface_type @ImplicitAs, @ImplicitAs(type) [template = constants.%ImplicitAs.type.3] +// CHECK:STDOUT: %.loc15_13.1: %.8 = specific_constant imports.%import_ref.4, @ImplicitAs(type) [template = constants.%.9] +// CHECK:STDOUT: %Convert.ref: %.8 = name_ref Convert, %.loc15_13.1 [template = constants.%.9] +// CHECK:STDOUT: %.loc15_13.2: type = converted %.loc15_14, [template = ] // CHECK:STDOUT: %a.var: ref = var a // CHECK:STDOUT: %a: ref = bind_name a, %a.var // CHECK:STDOUT: } @@ -450,12 +450,12 @@ class Outer(T:! type) { // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic = %Dest (constants.%Dest)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.1: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic = %.1 (constants.%.6)] -// CHECK:STDOUT: %Self: %.6 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] +// CHECK:STDOUT: %ImplicitAs.type: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.2)] +// CHECK:STDOUT: %Self: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] // CHECK:STDOUT: %Convert.type: type = fn_type @Convert, @ImplicitAs(%Dest) [symbolic = %Convert.type (constants.%Convert.type.1)] // CHECK:STDOUT: %Convert: @ImplicitAs.%Convert.type (%Convert.type.1) = struct_value () [symbolic = %Convert (constants.%Convert.1)] -// CHECK:STDOUT: %.2: type = assoc_entity_type @ImplicitAs.%.1 (%.6), @ImplicitAs.%Convert.type (%Convert.type.1) [symbolic = %.2 (constants.%.7)] -// CHECK:STDOUT: %.3: @ImplicitAs.%.2 (%.7) = assoc_entity element0, imports.%import_ref.6 [symbolic = %.3 (constants.%.8)] +// CHECK:STDOUT: %.1: type = assoc_entity_type @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2), @ImplicitAs.%Convert.type (%Convert.type.1) [symbolic = %.1 (constants.%.6)] +// CHECK:STDOUT: %.2: @ImplicitAs.%.1 (%.6) = assoc_entity element0, imports.%import_ref.6 [symbolic = %.2 (constants.%.7)] // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: !members: @@ -481,10 +481,10 @@ class Outer(T:! type) { // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32"; // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @Convert(constants.%Dest: type, constants.%Self.1: @ImplicitAs.%.1 (%.6)) { +// CHECK:STDOUT: generic fn @Convert(constants.%Dest: type, constants.%Self.1: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2)) { // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic = %Dest (constants.%Dest)] -// CHECK:STDOUT: %.1: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic = %.1 (constants.%.6)] -// CHECK:STDOUT: %Self: %.6 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] +// CHECK:STDOUT: %ImplicitAs.type: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.2)] +// CHECK:STDOUT: %Self: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] // CHECK:STDOUT: // CHECK:STDOUT: fn[%self: @Convert.%Self (%Self.2)]() -> @Convert.%Dest (%Dest); // CHECK:STDOUT: } @@ -508,7 +508,7 @@ class Outer(T:! type) { // CHECK:STDOUT: // CHECK:STDOUT: specific @Convert(constants.%Dest, constants.%Self.1) { // CHECK:STDOUT: %Dest => constants.%Dest -// CHECK:STDOUT: %.1 => constants.%.6 +// CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.2 // CHECK:STDOUT: %Self => constants.%Self.1 // CHECK:STDOUT: } // CHECK:STDOUT: @@ -516,12 +516,12 @@ class Outer(T:! type) { // CHECK:STDOUT: %Dest => type // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.1 => constants.%.9 +// CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.3 // CHECK:STDOUT: %Self => constants.%Self.2 // CHECK:STDOUT: %Convert.type => constants.%Convert.type.2 // CHECK:STDOUT: %Convert => constants.%Convert.2 -// CHECK:STDOUT: %.2 => constants.%.10 -// CHECK:STDOUT: %.3 => constants.%.11 +// CHECK:STDOUT: %.1 => constants.%.8 +// CHECK:STDOUT: %.2 => constants.%.9 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- call_in_nested_return_type.carbon diff --git a/toolchain/check/testdata/class/generic/import.carbon b/toolchain/check/testdata/class/generic/import.carbon index 1d8ac07295ce3..7f0c54a2a623d 100644 --- a/toolchain/check/testdata/class/generic/import.carbon +++ b/toolchain/check/testdata/class/generic/import.carbon @@ -595,22 +595,22 @@ class Class(U:! type) { // CHECK:STDOUT: %.8: type = unbound_element_type %CompleteClass.4, i32 [template] // CHECK:STDOUT: %F.type.4: type = fn_type @F.1, @CompleteClass(i32) [template] // CHECK:STDOUT: %F.4: %F.type.4 = struct_value () [template] -// CHECK:STDOUT: %ImplicitAs.type: type = generic_interface_type @ImplicitAs [template] -// CHECK:STDOUT: %ImplicitAs: %ImplicitAs.type = struct_value () [template] +// CHECK:STDOUT: %ImplicitAs.type.1: type = generic_interface_type @ImplicitAs [template] +// CHECK:STDOUT: %ImplicitAs: %ImplicitAs.type.1 = struct_value () [template] // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic] -// CHECK:STDOUT: %.9: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic] -// CHECK:STDOUT: %Self.1: @ImplicitAs.%.1 (%.9) = bind_symbolic_name Self, 1 [symbolic] -// CHECK:STDOUT: %Self.2: %.9 = bind_symbolic_name Self, 1 [symbolic] +// CHECK:STDOUT: %ImplicitAs.type.2: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic] +// CHECK:STDOUT: %Self.1: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2) = bind_symbolic_name Self, 1 [symbolic] +// CHECK:STDOUT: %Self.2: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: %Convert.type.1: type = fn_type @Convert, @ImplicitAs(%Dest) [symbolic] // CHECK:STDOUT: %Convert.1: %Convert.type.1 = struct_value () [symbolic] -// CHECK:STDOUT: %.10: type = assoc_entity_type %.9, %Convert.type.1 [symbolic] -// CHECK:STDOUT: %.11: %.10 = assoc_entity element0, imports.%import_ref.12 [symbolic] -// CHECK:STDOUT: %.12: type = interface_type @ImplicitAs, @ImplicitAs(%CompleteClass.3) [template] +// CHECK:STDOUT: %.9: type = assoc_entity_type %ImplicitAs.type.2, %Convert.type.1 [symbolic] +// CHECK:STDOUT: %.10: %.9 = assoc_entity element0, imports.%import_ref.12 [symbolic] +// CHECK:STDOUT: %ImplicitAs.type.3: type = interface_type @ImplicitAs, @ImplicitAs(%CompleteClass.3) [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert, @ImplicitAs(%CompleteClass.3) [template] // CHECK:STDOUT: %Convert.2: %Convert.type.2 = struct_value () [template] -// CHECK:STDOUT: %.13: type = assoc_entity_type %.12, %Convert.type.2 [template] -// CHECK:STDOUT: %.14: %.13 = assoc_entity element0, imports.%import_ref.12 [template] -// CHECK:STDOUT: %.15: %.10 = assoc_entity element0, imports.%import_ref.13 [symbolic] +// CHECK:STDOUT: %.11: type = assoc_entity_type %ImplicitAs.type.3, %Convert.type.2 [template] +// CHECK:STDOUT: %.12: %.11 = assoc_entity element0, imports.%import_ref.12 [template] +// CHECK:STDOUT: %.13: %.9 = assoc_entity element0, imports.%import_ref.13 [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -633,9 +633,9 @@ class Class(U:! type) { // CHECK:STDOUT: %import_ref.5 = import_ref Main//foo, inst+30, unloaded // CHECK:STDOUT: %import_ref.6 = import_ref Main//foo, inst+37, unloaded // CHECK:STDOUT: %import_ref.7: %Int32.type = import_ref Core//prelude/types, inst+4, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.8: %ImplicitAs.type = import_ref Core//prelude/operators/as, inst+40, loaded [template = constants.%ImplicitAs] +// CHECK:STDOUT: %import_ref.8: %ImplicitAs.type.1 = import_ref Core//prelude/operators/as, inst+40, loaded [template = constants.%ImplicitAs] // CHECK:STDOUT: %import_ref.9 = import_ref Core//prelude/operators/as, inst+45, unloaded -// CHECK:STDOUT: %import_ref.10: @ImplicitAs.%.2 (%.10) = import_ref Core//prelude/operators/as, inst+63, loaded [symbolic = @ImplicitAs.%.3 (constants.%.15)] +// CHECK:STDOUT: %import_ref.10: @ImplicitAs.%.1 (%.9) = import_ref Core//prelude/operators/as, inst+63, loaded [symbolic = @ImplicitAs.%.2 (constants.%.13)] // CHECK:STDOUT: %import_ref.11 = import_ref Core//prelude/operators/as, inst+56, unloaded // CHECK:STDOUT: %import_ref.12 = import_ref Core//prelude/operators/as, inst+56, unloaded // CHECK:STDOUT: %import_ref.13 = import_ref Core//prelude/operators/as, inst+56, unloaded @@ -658,12 +658,12 @@ class Class(U:! type) { // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic = %Dest (constants.%Dest)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.1: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic = %.1 (constants.%.9)] -// CHECK:STDOUT: %Self: %.9 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] +// CHECK:STDOUT: %ImplicitAs.type: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.2)] +// CHECK:STDOUT: %Self: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] // CHECK:STDOUT: %Convert.type: type = fn_type @Convert, @ImplicitAs(%Dest) [symbolic = %Convert.type (constants.%Convert.type.1)] // CHECK:STDOUT: %Convert: @ImplicitAs.%Convert.type (%Convert.type.1) = struct_value () [symbolic = %Convert (constants.%Convert.1)] -// CHECK:STDOUT: %.2: type = assoc_entity_type @ImplicitAs.%.1 (%.9), @ImplicitAs.%Convert.type (%Convert.type.1) [symbolic = %.2 (constants.%.10)] -// CHECK:STDOUT: %.3: @ImplicitAs.%.2 (%.10) = assoc_entity element0, imports.%import_ref.12 [symbolic = %.3 (constants.%.11)] +// CHECK:STDOUT: %.1: type = assoc_entity_type @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2), @ImplicitAs.%Convert.type (%Convert.type.1) [symbolic = %.1 (constants.%.9)] +// CHECK:STDOUT: %.2: @ImplicitAs.%.1 (%.9) = assoc_entity element0, imports.%import_ref.12 [symbolic = %.2 (constants.%.10)] // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: !members: @@ -703,11 +703,11 @@ class Class(U:! type) { // CHECK:STDOUT: %F.ref: %F.type.3 = name_ref F, imports.%import_ref.3 [template = constants.%F.3] // CHECK:STDOUT: %.loc14_33.1: ref %CompleteClass.4 = temporary_storage // CHECK:STDOUT: %F.call: init %CompleteClass.4 = call %F.ref() to %.loc14_33.1 -// CHECK:STDOUT: %.loc14_35.1: type = interface_type @ImplicitAs, @ImplicitAs(constants.%CompleteClass.3) [template = constants.%.12] -// CHECK:STDOUT: %.loc14_35.2: %.13 = specific_constant imports.%import_ref.10, @ImplicitAs(constants.%CompleteClass.3) [template = constants.%.14] -// CHECK:STDOUT: %Convert.ref: %.13 = name_ref Convert, %.loc14_35.2 [template = constants.%.14] +// CHECK:STDOUT: %ImplicitAs.type: type = interface_type @ImplicitAs, @ImplicitAs(constants.%CompleteClass.3) [template = constants.%ImplicitAs.type.3] +// CHECK:STDOUT: %.loc14_35.1: %.11 = specific_constant imports.%import_ref.10, @ImplicitAs(constants.%CompleteClass.3) [template = constants.%.12] +// CHECK:STDOUT: %Convert.ref: %.11 = name_ref Convert, %.loc14_35.1 [template = constants.%.12] // CHECK:STDOUT: %.loc14_33.2: ref %CompleteClass.4 = temporary %.loc14_33.1, %F.call -// CHECK:STDOUT: %.loc14_35.3: %CompleteClass.3 = converted %F.call, [template = ] +// CHECK:STDOUT: %.loc14_35.2: %CompleteClass.3 = converted %F.call, [template = ] // CHECK:STDOUT: assign %v.var, // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -722,10 +722,10 @@ class Class(U:! type) { // CHECK:STDOUT: // CHECK:STDOUT: fn @F.2() -> %CompleteClass.4; // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @Convert(constants.%Dest: type, constants.%Self.1: @ImplicitAs.%.1 (%.9)) { +// CHECK:STDOUT: generic fn @Convert(constants.%Dest: type, constants.%Self.1: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2)) { // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic = %Dest (constants.%Dest)] -// CHECK:STDOUT: %.1: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic = %.1 (constants.%.9)] -// CHECK:STDOUT: %Self: %.9 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] +// CHECK:STDOUT: %ImplicitAs.type: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.2)] +// CHECK:STDOUT: %Self: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] // CHECK:STDOUT: // CHECK:STDOUT: fn[%self: @Convert.%Self (%Self.2)]() -> @Convert.%Dest (%Dest); // CHECK:STDOUT: } @@ -780,7 +780,7 @@ class Class(U:! type) { // CHECK:STDOUT: // CHECK:STDOUT: specific @Convert(constants.%Dest, constants.%Self.1) { // CHECK:STDOUT: %Dest => constants.%Dest -// CHECK:STDOUT: %.1 => constants.%.9 +// CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.2 // CHECK:STDOUT: %Self => constants.%Self.1 // CHECK:STDOUT: } // CHECK:STDOUT: @@ -788,12 +788,12 @@ class Class(U:! type) { // CHECK:STDOUT: %Dest => constants.%CompleteClass.3 // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.1 => constants.%.12 +// CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.3 // CHECK:STDOUT: %Self => constants.%Self.2 // CHECK:STDOUT: %Convert.type => constants.%Convert.type.2 // CHECK:STDOUT: %Convert => constants.%Convert.2 -// CHECK:STDOUT: %.2 => constants.%.13 -// CHECK:STDOUT: %.3 => constants.%.14 +// CHECK:STDOUT: %.1 => constants.%.11 +// CHECK:STDOUT: %.2 => constants.%.12 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- fail_foo.impl.carbon diff --git a/toolchain/check/testdata/class/generic/member_access.carbon b/toolchain/check/testdata/class/generic/member_access.carbon index ba33ef6de063d..9ad42d8a2a676 100644 --- a/toolchain/check/testdata/class/generic/member_access.carbon +++ b/toolchain/check/testdata/class/generic/member_access.carbon @@ -370,22 +370,22 @@ fn StaticMemberFunctionCall(T:! type) -> Class(T) { // CHECK:STDOUT: %struct: %Class.2 = struct_value () [symbolic] // CHECK:STDOUT: %StaticMemberFunctionCall.type: type = fn_type @StaticMemberFunctionCall [template] // CHECK:STDOUT: %StaticMemberFunctionCall: %StaticMemberFunctionCall.type = struct_value () [template] -// CHECK:STDOUT: %ImplicitAs.type: type = generic_interface_type @ImplicitAs [template] -// CHECK:STDOUT: %ImplicitAs: %ImplicitAs.type = struct_value () [template] +// CHECK:STDOUT: %ImplicitAs.type.1: type = generic_interface_type @ImplicitAs [template] +// CHECK:STDOUT: %ImplicitAs: %ImplicitAs.type.1 = struct_value () [template] // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic] -// CHECK:STDOUT: %.5: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic] -// CHECK:STDOUT: %Self.1: @ImplicitAs.%.1 (%.5) = bind_symbolic_name Self, 1 [symbolic] -// CHECK:STDOUT: %Self.2: %.5 = bind_symbolic_name Self, 1 [symbolic] +// CHECK:STDOUT: %ImplicitAs.type.2: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic] +// CHECK:STDOUT: %Self.1: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2) = bind_symbolic_name Self, 1 [symbolic] +// CHECK:STDOUT: %Self.2: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: %Convert.type.1: type = fn_type @Convert, @ImplicitAs(%Dest) [symbolic] // CHECK:STDOUT: %Convert.1: %Convert.type.1 = struct_value () [symbolic] -// CHECK:STDOUT: %.6: type = assoc_entity_type %.5, %Convert.type.1 [symbolic] -// CHECK:STDOUT: %.7: %.6 = assoc_entity element0, imports.%import_ref.5 [symbolic] -// CHECK:STDOUT: %.8: type = interface_type @ImplicitAs, @ImplicitAs(%Class.2) [symbolic] +// CHECK:STDOUT: %.5: type = assoc_entity_type %ImplicitAs.type.2, %Convert.type.1 [symbolic] +// CHECK:STDOUT: %.6: %.5 = assoc_entity element0, imports.%import_ref.5 [symbolic] +// CHECK:STDOUT: %ImplicitAs.type.3: type = interface_type @ImplicitAs, @ImplicitAs(%Class.2) [symbolic] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert, @ImplicitAs(%Class.2) [symbolic] // CHECK:STDOUT: %Convert.2: %Convert.type.2 = struct_value () [symbolic] -// CHECK:STDOUT: %.9: type = assoc_entity_type %.8, %Convert.type.2 [symbolic] -// CHECK:STDOUT: %.10: %.9 = assoc_entity element0, imports.%import_ref.5 [symbolic] -// CHECK:STDOUT: %.11: %.6 = assoc_entity element0, imports.%import_ref.6 [symbolic] +// CHECK:STDOUT: %.7: type = assoc_entity_type %ImplicitAs.type.3, %Convert.type.2 [symbolic] +// CHECK:STDOUT: %.8: %.7 = assoc_entity element0, imports.%import_ref.5 [symbolic] +// CHECK:STDOUT: %.9: %.5 = assoc_entity element0, imports.%import_ref.6 [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -400,9 +400,9 @@ fn StaticMemberFunctionCall(T:! type) -> Class(T) { // CHECK:STDOUT: import Core//prelude/operators/comparison // CHECK:STDOUT: import Core//prelude/types/bool // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.1: %ImplicitAs.type = import_ref Core//prelude/operators/as, inst+40, loaded [template = constants.%ImplicitAs] +// CHECK:STDOUT: %import_ref.1: %ImplicitAs.type.1 = import_ref Core//prelude/operators/as, inst+40, loaded [template = constants.%ImplicitAs] // CHECK:STDOUT: %import_ref.2 = import_ref Core//prelude/operators/as, inst+45, unloaded -// CHECK:STDOUT: %import_ref.3: @ImplicitAs.%.2 (%.6) = import_ref Core//prelude/operators/as, inst+63, loaded [symbolic = @ImplicitAs.%.3 (constants.%.11)] +// CHECK:STDOUT: %import_ref.3: @ImplicitAs.%.1 (%.5) = import_ref Core//prelude/operators/as, inst+63, loaded [symbolic = @ImplicitAs.%.2 (constants.%.9)] // CHECK:STDOUT: %import_ref.4 = import_ref Core//prelude/operators/as, inst+56, unloaded // CHECK:STDOUT: %import_ref.5 = import_ref Core//prelude/operators/as, inst+56, unloaded // CHECK:STDOUT: %import_ref.6 = import_ref Core//prelude/operators/as, inst+56, unloaded @@ -437,12 +437,12 @@ fn StaticMemberFunctionCall(T:! type) -> Class(T) { // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic = %Dest (constants.%Dest)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.1: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic = %.1 (constants.%.5)] -// CHECK:STDOUT: %Self: %.5 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] +// CHECK:STDOUT: %ImplicitAs.type: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.2)] +// CHECK:STDOUT: %Self: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] // CHECK:STDOUT: %Convert.type: type = fn_type @Convert, @ImplicitAs(%Dest) [symbolic = %Convert.type (constants.%Convert.type.1)] // CHECK:STDOUT: %Convert: @ImplicitAs.%Convert.type (%Convert.type.1) = struct_value () [symbolic = %Convert (constants.%Convert.1)] -// CHECK:STDOUT: %.2: type = assoc_entity_type @ImplicitAs.%.1 (%.5), @ImplicitAs.%Convert.type (%Convert.type.1) [symbolic = %.2 (constants.%.6)] -// CHECK:STDOUT: %.3: @ImplicitAs.%.2 (%.6) = assoc_entity element0, imports.%import_ref.5 [symbolic = %.3 (constants.%.7)] +// CHECK:STDOUT: %.1: type = assoc_entity_type @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2), @ImplicitAs.%Convert.type (%Convert.type.1) [symbolic = %.1 (constants.%.5)] +// CHECK:STDOUT: %.2: @ImplicitAs.%.1 (%.5) = assoc_entity element0, imports.%import_ref.5 [symbolic = %.2 (constants.%.6)] // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: !members: @@ -497,10 +497,10 @@ fn StaticMemberFunctionCall(T:! type) -> Class(T) { // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Make.type: type = fn_type @Make, @Class(%T.1) [symbolic = %Make.type (constants.%Make.type)] // CHECK:STDOUT: %Make: @StaticMemberFunctionCall.%Make.type (%Make.type) = struct_value () [symbolic = %Make (constants.%Make)] -// CHECK:STDOUT: %.1: type = interface_type @ImplicitAs, @ImplicitAs(%Class.1) [symbolic = %.1 (constants.%.8)] +// CHECK:STDOUT: %ImplicitAs.type.1: type = interface_type @ImplicitAs, @ImplicitAs(%Class.1) [symbolic = %ImplicitAs.type.1 (constants.%ImplicitAs.type.3)] // CHECK:STDOUT: %Convert.type: type = fn_type @Convert, @ImplicitAs(%Class.1) [symbolic = %Convert.type (constants.%Convert.type.2)] -// CHECK:STDOUT: %.2: type = assoc_entity_type @StaticMemberFunctionCall.%.1 (%.8), @StaticMemberFunctionCall.%Convert.type (%Convert.type.2) [symbolic = %.2 (constants.%.9)] -// CHECK:STDOUT: %.3: @StaticMemberFunctionCall.%.2 (%.9) = assoc_entity element0, imports.%import_ref.5 [symbolic = %.3 (constants.%.10)] +// CHECK:STDOUT: %.1: type = assoc_entity_type @StaticMemberFunctionCall.%ImplicitAs.type.1 (%ImplicitAs.type.3), @StaticMemberFunctionCall.%Convert.type (%Convert.type.2) [symbolic = %.1 (constants.%.7)] +// CHECK:STDOUT: %.2: @StaticMemberFunctionCall.%.1 (%.7) = assoc_entity element0, imports.%import_ref.5 [symbolic = %.2 (constants.%.8)] // CHECK:STDOUT: // CHECK:STDOUT: fn(%T.loc8: type) -> %return: @StaticMemberFunctionCall.%Class.1 (%Class.2) { // CHECK:STDOUT: !entry: @@ -511,19 +511,19 @@ fn StaticMemberFunctionCall(T:! type) -> Class(T) { // CHECK:STDOUT: %Make.ref: @StaticMemberFunctionCall.%Make.type (%Make.type) = name_ref Make, %.loc15_18 [symbolic = %Make (constants.%Make)] // CHECK:STDOUT: %.loc15_23.1: ref @StaticMemberFunctionCall.%Class.1 (%Class.2) = temporary_storage // CHECK:STDOUT: %Make.call: init @StaticMemberFunctionCall.%Class.1 (%Class.2) = call %Make.ref() to %.loc15_23.1 -// CHECK:STDOUT: %.loc15_25.1: type = interface_type @ImplicitAs, @ImplicitAs(constants.%Class.2) [symbolic = %.1 (constants.%.8)] -// CHECK:STDOUT: %.loc15_25.2: @StaticMemberFunctionCall.%.2 (%.9) = specific_constant imports.%import_ref.3, @ImplicitAs(constants.%Class.2) [symbolic = %.3 (constants.%.10)] -// CHECK:STDOUT: %Convert.ref: @StaticMemberFunctionCall.%.2 (%.9) = name_ref Convert, %.loc15_25.2 [symbolic = %.3 (constants.%.10)] +// CHECK:STDOUT: %ImplicitAs.type.loc15: type = interface_type @ImplicitAs, @ImplicitAs(constants.%Class.2) [symbolic = %ImplicitAs.type.1 (constants.%ImplicitAs.type.3)] +// CHECK:STDOUT: %.loc15_25.1: @StaticMemberFunctionCall.%.1 (%.7) = specific_constant imports.%import_ref.3, @ImplicitAs(constants.%Class.2) [symbolic = %.2 (constants.%.8)] +// CHECK:STDOUT: %Convert.ref: @StaticMemberFunctionCall.%.1 (%.7) = name_ref Convert, %.loc15_25.1 [symbolic = %.2 (constants.%.8)] // CHECK:STDOUT: %.loc15_23.2: ref @StaticMemberFunctionCall.%Class.1 (%Class.2) = temporary %.loc15_23.1, %Make.call -// CHECK:STDOUT: %.loc15_25.3: @StaticMemberFunctionCall.%Class.1 (%Class.2) = converted %Make.call, [template = ] +// CHECK:STDOUT: %.loc15_25.2: @StaticMemberFunctionCall.%Class.1 (%Class.2) = converted %Make.call, [template = ] // CHECK:STDOUT: return to %return // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @Convert(constants.%Dest: type, constants.%Self.1: @ImplicitAs.%.1 (%.5)) { +// CHECK:STDOUT: generic fn @Convert(constants.%Dest: type, constants.%Self.1: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2)) { // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic = %Dest (constants.%Dest)] -// CHECK:STDOUT: %.1: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic = %.1 (constants.%.5)] -// CHECK:STDOUT: %Self: %.5 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] +// CHECK:STDOUT: %ImplicitAs.type: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.2)] +// CHECK:STDOUT: %Self: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] // CHECK:STDOUT: // CHECK:STDOUT: fn[%self: @Convert.%Self (%Self.2)]() -> @Convert.%Dest (%Dest); // CHECK:STDOUT: } @@ -572,7 +572,7 @@ fn StaticMemberFunctionCall(T:! type) -> Class(T) { // CHECK:STDOUT: // CHECK:STDOUT: specific @Convert(constants.%Dest, constants.%Self.1) { // CHECK:STDOUT: %Dest => constants.%Dest -// CHECK:STDOUT: %.1 => constants.%.5 +// CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.2 // CHECK:STDOUT: %Self => constants.%Self.1 // CHECK:STDOUT: } // CHECK:STDOUT: @@ -580,12 +580,12 @@ fn StaticMemberFunctionCall(T:! type) -> Class(T) { // CHECK:STDOUT: %Dest => constants.%Class.2 // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.1 => constants.%.8 +// CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.3 // CHECK:STDOUT: %Self => constants.%Self.2 // CHECK:STDOUT: %Convert.type => constants.%Convert.type.2 // CHECK:STDOUT: %Convert => constants.%Convert.2 -// CHECK:STDOUT: %.2 => constants.%.9 -// CHECK:STDOUT: %.3 => constants.%.10 +// CHECK:STDOUT: %.1 => constants.%.7 +// CHECK:STDOUT: %.2 => constants.%.8 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @ImplicitAs(@StaticMemberFunctionCall.%Class.1) { diff --git a/toolchain/check/testdata/class/init_adapt.carbon b/toolchain/check/testdata/class/init_adapt.carbon index 3ce04d53275af..a2db1af6cc354 100644 --- a/toolchain/check/testdata/class/init_adapt.carbon +++ b/toolchain/check/testdata/class/init_adapt.carbon @@ -253,27 +253,27 @@ var e: C = MakeAdaptC(); // CHECK:STDOUT: %.7: i32 = int_literal 1 [template] // CHECK:STDOUT: %.8: i32 = int_literal 2 [template] // CHECK:STDOUT: %struct: %C = struct_value (%.7, %.8) [template] -// CHECK:STDOUT: %ImplicitAs.type: type = generic_interface_type @ImplicitAs [template] -// CHECK:STDOUT: %ImplicitAs: %ImplicitAs.type = struct_value () [template] +// CHECK:STDOUT: %ImplicitAs.type.1: type = generic_interface_type @ImplicitAs [template] +// CHECK:STDOUT: %ImplicitAs: %ImplicitAs.type.1 = struct_value () [template] // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic] -// CHECK:STDOUT: %.9: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic] -// CHECK:STDOUT: %Self.1: @ImplicitAs.%.1 (%.9) = bind_symbolic_name Self, 1 [symbolic] -// CHECK:STDOUT: %Self.2: %.9 = bind_symbolic_name Self, 1 [symbolic] +// CHECK:STDOUT: %ImplicitAs.type.2: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic] +// CHECK:STDOUT: %Self.1: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2) = bind_symbolic_name Self, 1 [symbolic] +// CHECK:STDOUT: %Self.2: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: %Convert.type.1: type = fn_type @Convert, @ImplicitAs(%Dest) [symbolic] // CHECK:STDOUT: %Convert.1: %Convert.type.1 = struct_value () [symbolic] -// CHECK:STDOUT: %.10: type = assoc_entity_type %.9, %Convert.type.1 [symbolic] -// CHECK:STDOUT: %.11: %.10 = assoc_entity element0, imports.%import_ref.6 [symbolic] -// CHECK:STDOUT: %.12: type = interface_type @ImplicitAs, @ImplicitAs(%AdaptC) [template] +// CHECK:STDOUT: %.9: type = assoc_entity_type %ImplicitAs.type.2, %Convert.type.1 [symbolic] +// CHECK:STDOUT: %.10: %.9 = assoc_entity element0, imports.%import_ref.6 [symbolic] +// CHECK:STDOUT: %ImplicitAs.type.3: type = interface_type @ImplicitAs, @ImplicitAs(%AdaptC) [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert, @ImplicitAs(%AdaptC) [template] // CHECK:STDOUT: %Convert.2: %Convert.type.2 = struct_value () [template] -// CHECK:STDOUT: %.13: type = assoc_entity_type %.12, %Convert.type.2 [template] -// CHECK:STDOUT: %.14: %.13 = assoc_entity element0, imports.%import_ref.6 [template] -// CHECK:STDOUT: %.15: %.10 = assoc_entity element0, imports.%import_ref.7 [symbolic] -// CHECK:STDOUT: %.16: type = interface_type @ImplicitAs, @ImplicitAs(%C) [template] +// CHECK:STDOUT: %.11: type = assoc_entity_type %ImplicitAs.type.3, %Convert.type.2 [template] +// CHECK:STDOUT: %.12: %.11 = assoc_entity element0, imports.%import_ref.6 [template] +// CHECK:STDOUT: %.13: %.9 = assoc_entity element0, imports.%import_ref.7 [symbolic] +// CHECK:STDOUT: %ImplicitAs.type.4: type = interface_type @ImplicitAs, @ImplicitAs(%C) [template] // CHECK:STDOUT: %Convert.type.3: type = fn_type @Convert, @ImplicitAs(%C) [template] // CHECK:STDOUT: %Convert.3: %Convert.type.3 = struct_value () [template] -// CHECK:STDOUT: %.17: type = assoc_entity_type %.16, %Convert.type.3 [template] -// CHECK:STDOUT: %.18: %.17 = assoc_entity element0, imports.%import_ref.6 [template] +// CHECK:STDOUT: %.14: type = assoc_entity_type %ImplicitAs.type.4, %Convert.type.3 [template] +// CHECK:STDOUT: %.15: %.14 = assoc_entity element0, imports.%import_ref.6 [template] // CHECK:STDOUT: %MakeC.type: type = fn_type @MakeC [template] // CHECK:STDOUT: %MakeC: %MakeC.type = struct_value () [template] // CHECK:STDOUT: %MakeAdaptC.type: type = fn_type @MakeAdaptC [template] @@ -294,9 +294,9 @@ var e: C = MakeAdaptC(); // CHECK:STDOUT: import Core//prelude/types/bool // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref Core//prelude/types, inst+4, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.2: %ImplicitAs.type = import_ref Core//prelude/operators/as, inst+40, loaded [template = constants.%ImplicitAs] +// CHECK:STDOUT: %import_ref.2: %ImplicitAs.type.1 = import_ref Core//prelude/operators/as, inst+40, loaded [template = constants.%ImplicitAs] // CHECK:STDOUT: %import_ref.3 = import_ref Core//prelude/operators/as, inst+45, unloaded -// CHECK:STDOUT: %import_ref.4: @ImplicitAs.%.2 (%.10) = import_ref Core//prelude/operators/as, inst+63, loaded [symbolic = @ImplicitAs.%.3 (constants.%.15)] +// CHECK:STDOUT: %import_ref.4: @ImplicitAs.%.1 (%.9) = import_ref Core//prelude/operators/as, inst+63, loaded [symbolic = @ImplicitAs.%.2 (constants.%.13)] // CHECK:STDOUT: %import_ref.5 = import_ref Core//prelude/operators/as, inst+56, unloaded // CHECK:STDOUT: %import_ref.6 = import_ref Core//prelude/operators/as, inst+56, unloaded // CHECK:STDOUT: %import_ref.7 = import_ref Core//prelude/operators/as, inst+56, unloaded @@ -341,12 +341,12 @@ var e: C = MakeAdaptC(); // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic = %Dest (constants.%Dest)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.1: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic = %.1 (constants.%.9)] -// CHECK:STDOUT: %Self: %.9 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] +// CHECK:STDOUT: %ImplicitAs.type: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.2)] +// CHECK:STDOUT: %Self: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] // CHECK:STDOUT: %Convert.type: type = fn_type @Convert, @ImplicitAs(%Dest) [symbolic = %Convert.type (constants.%Convert.type.1)] // CHECK:STDOUT: %Convert: @ImplicitAs.%Convert.type (%Convert.type.1) = struct_value () [symbolic = %Convert (constants.%Convert.1)] -// CHECK:STDOUT: %.2: type = assoc_entity_type @ImplicitAs.%.1 (%.9), @ImplicitAs.%Convert.type (%Convert.type.1) [symbolic = %.2 (constants.%.10)] -// CHECK:STDOUT: %.3: @ImplicitAs.%.2 (%.10) = assoc_entity element0, imports.%import_ref.6 [symbolic = %.3 (constants.%.11)] +// CHECK:STDOUT: %.1: type = assoc_entity_type @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2), @ImplicitAs.%Convert.type (%Convert.type.1) [symbolic = %.1 (constants.%.9)] +// CHECK:STDOUT: %.2: @ImplicitAs.%.1 (%.9) = assoc_entity element0, imports.%import_ref.6 [symbolic = %.2 (constants.%.10)] // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: !members: @@ -384,10 +384,10 @@ var e: C = MakeAdaptC(); // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32"; // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @Convert(constants.%Dest: type, constants.%Self.1: @ImplicitAs.%.1 (%.9)) { +// CHECK:STDOUT: generic fn @Convert(constants.%Dest: type, constants.%Self.1: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2)) { // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic = %Dest (constants.%Dest)] -// CHECK:STDOUT: %.1: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic = %.1 (constants.%.9)] -// CHECK:STDOUT: %Self: %.9 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] +// CHECK:STDOUT: %ImplicitAs.type: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.2)] +// CHECK:STDOUT: %Self: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] // CHECK:STDOUT: // CHECK:STDOUT: fn[%self: @Convert.%Self (%Self.2)]() -> @Convert.%Dest (%Dest); // CHECK:STDOUT: } @@ -412,34 +412,34 @@ var e: C = MakeAdaptC(); // CHECK:STDOUT: %.loc13_28.2: %C = bind_value %.loc13_28.1 // CHECK:STDOUT: %a: %C = bind_name a, %.loc13_28.2 // CHECK:STDOUT: %a.ref: %C = name_ref a, %a -// CHECK:STDOUT: %.loc24_18.1: type = interface_type @ImplicitAs, @ImplicitAs(constants.%AdaptC) [template = constants.%.12] -// CHECK:STDOUT: %.loc24_18.2: %.13 = specific_constant imports.%import_ref.4, @ImplicitAs(constants.%AdaptC) [template = constants.%.14] -// CHECK:STDOUT: %Convert.ref.loc24: %.13 = name_ref Convert, %.loc24_18.2 [template = constants.%.14] -// CHECK:STDOUT: %.loc24_18.3: %AdaptC = converted %a.ref, [template = ] +// CHECK:STDOUT: %ImplicitAs.type.loc24: type = interface_type @ImplicitAs, @ImplicitAs(constants.%AdaptC) [template = constants.%ImplicitAs.type.3] +// CHECK:STDOUT: %.loc24_18.1: %.11 = specific_constant imports.%import_ref.4, @ImplicitAs(constants.%AdaptC) [template = constants.%.12] +// CHECK:STDOUT: %Convert.ref.loc24: %.11 = name_ref Convert, %.loc24_18.1 [template = constants.%.12] +// CHECK:STDOUT: %.loc24_18.2: %AdaptC = converted %a.ref, [template = ] // CHECK:STDOUT: %b: %AdaptC = bind_name b, // CHECK:STDOUT: %b.ref: %AdaptC = name_ref b, %b -// CHECK:STDOUT: %.loc33_13.1: type = interface_type @ImplicitAs, @ImplicitAs(constants.%C) [template = constants.%.16] -// CHECK:STDOUT: %.loc33_13.2: %.17 = specific_constant imports.%import_ref.4, @ImplicitAs(constants.%C) [template = constants.%.18] -// CHECK:STDOUT: %Convert.ref.loc33: %.17 = name_ref Convert, %.loc33_13.2 [template = constants.%.18] -// CHECK:STDOUT: %.loc33_13.3: %C = converted %b.ref, [template = ] +// CHECK:STDOUT: %ImplicitAs.type.loc33: type = interface_type @ImplicitAs, @ImplicitAs(constants.%C) [template = constants.%ImplicitAs.type.4] +// CHECK:STDOUT: %.loc33_13.1: %.14 = specific_constant imports.%import_ref.4, @ImplicitAs(constants.%C) [template = constants.%.15] +// CHECK:STDOUT: %Convert.ref.loc33: %.14 = name_ref Convert, %.loc33_13.1 [template = constants.%.15] +// CHECK:STDOUT: %.loc33_13.2: %C = converted %b.ref, [template = ] // CHECK:STDOUT: %c: %C = bind_name c, // CHECK:STDOUT: %MakeC.ref: %MakeC.type = name_ref MakeC, file.%MakeC.decl [template = constants.%MakeC] // CHECK:STDOUT: %.loc46_22.1: ref %C = temporary_storage // CHECK:STDOUT: %MakeC.call: init %C = call %MakeC.ref() to %.loc46_22.1 -// CHECK:STDOUT: %.loc46_24.1: type = interface_type @ImplicitAs, @ImplicitAs(constants.%AdaptC) [template = constants.%.12] -// CHECK:STDOUT: %.loc46_24.2: %.13 = specific_constant imports.%import_ref.4, @ImplicitAs(constants.%AdaptC) [template = constants.%.14] -// CHECK:STDOUT: %Convert.ref.loc46: %.13 = name_ref Convert, %.loc46_24.2 [template = constants.%.14] +// CHECK:STDOUT: %ImplicitAs.type.loc46: type = interface_type @ImplicitAs, @ImplicitAs(constants.%AdaptC) [template = constants.%ImplicitAs.type.3] +// CHECK:STDOUT: %.loc46_24.1: %.11 = specific_constant imports.%import_ref.4, @ImplicitAs(constants.%AdaptC) [template = constants.%.12] +// CHECK:STDOUT: %Convert.ref.loc46: %.11 = name_ref Convert, %.loc46_24.1 [template = constants.%.12] // CHECK:STDOUT: %.loc46_22.2: ref %C = temporary %.loc46_22.1, %MakeC.call -// CHECK:STDOUT: %.loc46_24.3: %AdaptC = converted %MakeC.call, [template = ] +// CHECK:STDOUT: %.loc46_24.2: %AdaptC = converted %MakeC.call, [template = ] // CHECK:STDOUT: assign file.%d.var, // CHECK:STDOUT: %MakeAdaptC.ref: %MakeAdaptC.type = name_ref MakeAdaptC, file.%MakeAdaptC.decl [template = constants.%MakeAdaptC] // CHECK:STDOUT: %.loc54_22.1: ref %AdaptC = temporary_storage // CHECK:STDOUT: %MakeAdaptC.call: init %AdaptC = call %MakeAdaptC.ref() to %.loc54_22.1 -// CHECK:STDOUT: %.loc54_24.1: type = interface_type @ImplicitAs, @ImplicitAs(constants.%C) [template = constants.%.16] -// CHECK:STDOUT: %.loc54_24.2: %.17 = specific_constant imports.%import_ref.4, @ImplicitAs(constants.%C) [template = constants.%.18] -// CHECK:STDOUT: %Convert.ref.loc54: %.17 = name_ref Convert, %.loc54_24.2 [template = constants.%.18] +// CHECK:STDOUT: %ImplicitAs.type.loc54: type = interface_type @ImplicitAs, @ImplicitAs(constants.%C) [template = constants.%ImplicitAs.type.4] +// CHECK:STDOUT: %.loc54_24.1: %.14 = specific_constant imports.%import_ref.4, @ImplicitAs(constants.%C) [template = constants.%.15] +// CHECK:STDOUT: %Convert.ref.loc54: %.14 = name_ref Convert, %.loc54_24.1 [template = constants.%.15] // CHECK:STDOUT: %.loc54_22.2: ref %AdaptC = temporary %.loc54_22.1, %MakeAdaptC.call -// CHECK:STDOUT: %.loc54_24.3: %C = converted %MakeAdaptC.call, [template = ] +// CHECK:STDOUT: %.loc54_24.2: %C = converted %MakeAdaptC.call, [template = ] // CHECK:STDOUT: assign file.%e.var, // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -458,7 +458,7 @@ var e: C = MakeAdaptC(); // CHECK:STDOUT: // CHECK:STDOUT: specific @Convert(constants.%Dest, constants.%Self.1) { // CHECK:STDOUT: %Dest => constants.%Dest -// CHECK:STDOUT: %.1 => constants.%.9 +// CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.2 // CHECK:STDOUT: %Self => constants.%Self.1 // CHECK:STDOUT: } // CHECK:STDOUT: @@ -466,23 +466,23 @@ var e: C = MakeAdaptC(); // CHECK:STDOUT: %Dest => constants.%AdaptC // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.1 => constants.%.12 +// CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.3 // CHECK:STDOUT: %Self => constants.%Self.2 // CHECK:STDOUT: %Convert.type => constants.%Convert.type.2 // CHECK:STDOUT: %Convert => constants.%Convert.2 -// CHECK:STDOUT: %.2 => constants.%.13 -// CHECK:STDOUT: %.3 => constants.%.14 +// CHECK:STDOUT: %.1 => constants.%.11 +// CHECK:STDOUT: %.2 => constants.%.12 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @ImplicitAs(constants.%C) { // CHECK:STDOUT: %Dest => constants.%C // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.1 => constants.%.16 +// CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.4 // CHECK:STDOUT: %Self => constants.%Self.2 // CHECK:STDOUT: %Convert.type => constants.%Convert.type.3 // CHECK:STDOUT: %Convert => constants.%Convert.3 -// CHECK:STDOUT: %.2 => constants.%.17 -// CHECK:STDOUT: %.3 => constants.%.18 +// CHECK:STDOUT: %.1 => constants.%.14 +// CHECK:STDOUT: %.2 => constants.%.15 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/const/fail_collapse.carbon b/toolchain/check/testdata/const/fail_collapse.carbon index a79771d1afe4e..1456c88880f82 100644 --- a/toolchain/check/testdata/const/fail_collapse.carbon +++ b/toolchain/check/testdata/const/fail_collapse.carbon @@ -35,22 +35,22 @@ fn G(p: const (const i32)**) -> i32** { // CHECK:STDOUT: %.6: type = ptr_type %.5 [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %G: %G.type = struct_value () [template] -// CHECK:STDOUT: %ImplicitAs.type: type = generic_interface_type @ImplicitAs [template] -// CHECK:STDOUT: %ImplicitAs: %ImplicitAs.type = struct_value () [template] +// CHECK:STDOUT: %ImplicitAs.type.1: type = generic_interface_type @ImplicitAs [template] +// CHECK:STDOUT: %ImplicitAs: %ImplicitAs.type.1 = struct_value () [template] // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic] -// CHECK:STDOUT: %.7: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic] -// CHECK:STDOUT: %Self.1: @ImplicitAs.%.1 (%.7) = bind_symbolic_name Self, 1 [symbolic] -// CHECK:STDOUT: %Self.2: %.7 = bind_symbolic_name Self, 1 [symbolic] +// CHECK:STDOUT: %ImplicitAs.type.2: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic] +// CHECK:STDOUT: %Self.1: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2) = bind_symbolic_name Self, 1 [symbolic] +// CHECK:STDOUT: %Self.2: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: %Convert.type.1: type = fn_type @Convert, @ImplicitAs(%Dest) [symbolic] // CHECK:STDOUT: %Convert.1: %Convert.type.1 = struct_value () [symbolic] -// CHECK:STDOUT: %.8: type = assoc_entity_type %.7, %Convert.type.1 [symbolic] -// CHECK:STDOUT: %.9: %.8 = assoc_entity element0, imports.%import_ref.6 [symbolic] -// CHECK:STDOUT: %.10: type = interface_type @ImplicitAs, @ImplicitAs(%.6) [template] +// CHECK:STDOUT: %.7: type = assoc_entity_type %ImplicitAs.type.2, %Convert.type.1 [symbolic] +// CHECK:STDOUT: %.8: %.7 = assoc_entity element0, imports.%import_ref.6 [symbolic] +// CHECK:STDOUT: %ImplicitAs.type.3: type = interface_type @ImplicitAs, @ImplicitAs(%.6) [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert, @ImplicitAs(%.6) [template] // CHECK:STDOUT: %Convert.2: %Convert.type.2 = struct_value () [template] -// CHECK:STDOUT: %.11: type = assoc_entity_type %.10, %Convert.type.2 [template] -// CHECK:STDOUT: %.12: %.11 = assoc_entity element0, imports.%import_ref.6 [template] -// CHECK:STDOUT: %.13: %.8 = assoc_entity element0, imports.%import_ref.7 [symbolic] +// CHECK:STDOUT: %.9: type = assoc_entity_type %ImplicitAs.type.3, %Convert.type.2 [template] +// CHECK:STDOUT: %.10: %.9 = assoc_entity element0, imports.%import_ref.6 [template] +// CHECK:STDOUT: %.11: %.7 = assoc_entity element0, imports.%import_ref.7 [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -67,9 +67,9 @@ fn G(p: const (const i32)**) -> i32** { // CHECK:STDOUT: import Core//prelude/types/bool // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref Core//prelude/types, inst+4, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.2: %ImplicitAs.type = import_ref Core//prelude/operators/as, inst+40, loaded [template = constants.%ImplicitAs] +// CHECK:STDOUT: %import_ref.2: %ImplicitAs.type.1 = import_ref Core//prelude/operators/as, inst+40, loaded [template = constants.%ImplicitAs] // CHECK:STDOUT: %import_ref.3 = import_ref Core//prelude/operators/as, inst+45, unloaded -// CHECK:STDOUT: %import_ref.4: @ImplicitAs.%.2 (%.8) = import_ref Core//prelude/operators/as, inst+63, loaded [symbolic = @ImplicitAs.%.3 (constants.%.13)] +// CHECK:STDOUT: %import_ref.4: @ImplicitAs.%.1 (%.7) = import_ref Core//prelude/operators/as, inst+63, loaded [symbolic = @ImplicitAs.%.2 (constants.%.11)] // CHECK:STDOUT: %import_ref.5 = import_ref Core//prelude/operators/as, inst+56, unloaded // CHECK:STDOUT: %import_ref.6 = import_ref Core//prelude/operators/as, inst+56, unloaded // CHECK:STDOUT: %import_ref.7 = import_ref Core//prelude/operators/as, inst+56, unloaded @@ -106,12 +106,12 @@ fn G(p: const (const i32)**) -> i32** { // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic = %Dest (constants.%Dest)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.1: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic = %.1 (constants.%.7)] -// CHECK:STDOUT: %Self: %.7 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] +// CHECK:STDOUT: %ImplicitAs.type: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.2)] +// CHECK:STDOUT: %Self: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] // CHECK:STDOUT: %Convert.type: type = fn_type @Convert, @ImplicitAs(%Dest) [symbolic = %Convert.type (constants.%Convert.type.1)] // CHECK:STDOUT: %Convert: @ImplicitAs.%Convert.type (%Convert.type.1) = struct_value () [symbolic = %Convert (constants.%Convert.1)] -// CHECK:STDOUT: %.2: type = assoc_entity_type @ImplicitAs.%.1 (%.7), @ImplicitAs.%Convert.type (%Convert.type.1) [symbolic = %.2 (constants.%.8)] -// CHECK:STDOUT: %.3: @ImplicitAs.%.2 (%.8) = assoc_entity element0, imports.%import_ref.6 [symbolic = %.3 (constants.%.9)] +// CHECK:STDOUT: %.1: type = assoc_entity_type @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2), @ImplicitAs.%Convert.type (%Convert.type.1) [symbolic = %.1 (constants.%.7)] +// CHECK:STDOUT: %.2: @ImplicitAs.%.1 (%.7) = assoc_entity element0, imports.%import_ref.6 [symbolic = %.2 (constants.%.8)] // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: !members: @@ -126,17 +126,17 @@ fn G(p: const (const i32)**) -> i32** { // CHECK:STDOUT: fn @G(%p: %.4) -> %.6 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %p.ref: %.4 = name_ref p, %p -// CHECK:STDOUT: %.loc22_11.1: type = interface_type @ImplicitAs, @ImplicitAs(constants.%.6) [template = constants.%.10] -// CHECK:STDOUT: %.loc22_11.2: %.11 = specific_constant imports.%import_ref.4, @ImplicitAs(constants.%.6) [template = constants.%.12] -// CHECK:STDOUT: %Convert.ref: %.11 = name_ref Convert, %.loc22_11.2 [template = constants.%.12] -// CHECK:STDOUT: %.loc22_11.3: %.6 = converted %p.ref, [template = ] +// CHECK:STDOUT: %ImplicitAs.type: type = interface_type @ImplicitAs, @ImplicitAs(constants.%.6) [template = constants.%ImplicitAs.type.3] +// CHECK:STDOUT: %.loc22_11.1: %.9 = specific_constant imports.%import_ref.4, @ImplicitAs(constants.%.6) [template = constants.%.10] +// CHECK:STDOUT: %Convert.ref: %.9 = name_ref Convert, %.loc22_11.1 [template = constants.%.10] +// CHECK:STDOUT: %.loc22_11.2: %.6 = converted %p.ref, [template = ] // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @Convert(constants.%Dest: type, constants.%Self.1: @ImplicitAs.%.1 (%.7)) { +// CHECK:STDOUT: generic fn @Convert(constants.%Dest: type, constants.%Self.1: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2)) { // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic = %Dest (constants.%Dest)] -// CHECK:STDOUT: %.1: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic = %.1 (constants.%.7)] -// CHECK:STDOUT: %Self: %.7 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] +// CHECK:STDOUT: %ImplicitAs.type: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.2)] +// CHECK:STDOUT: %Self: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] // CHECK:STDOUT: // CHECK:STDOUT: fn[%self: @Convert.%Self (%Self.2)]() -> @Convert.%Dest (%Dest); // CHECK:STDOUT: } @@ -155,7 +155,7 @@ fn G(p: const (const i32)**) -> i32** { // CHECK:STDOUT: // CHECK:STDOUT: specific @Convert(constants.%Dest, constants.%Self.1) { // CHECK:STDOUT: %Dest => constants.%Dest -// CHECK:STDOUT: %.1 => constants.%.7 +// CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.2 // CHECK:STDOUT: %Self => constants.%Self.1 // CHECK:STDOUT: } // CHECK:STDOUT: @@ -163,11 +163,11 @@ fn G(p: const (const i32)**) -> i32** { // CHECK:STDOUT: %Dest => constants.%.6 // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.1 => constants.%.10 +// CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.3 // CHECK:STDOUT: %Self => constants.%Self.2 // CHECK:STDOUT: %Convert.type => constants.%Convert.type.2 // CHECK:STDOUT: %Convert => constants.%Convert.2 -// CHECK:STDOUT: %.2 => constants.%.11 -// CHECK:STDOUT: %.3 => constants.%.12 +// CHECK:STDOUT: %.1 => constants.%.9 +// CHECK:STDOUT: %.2 => constants.%.10 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/function/builtin/method.carbon b/toolchain/check/testdata/function/builtin/method.carbon index c09308d0b02ae..2eb4cb9a3d986 100644 --- a/toolchain/check/testdata/function/builtin/method.carbon +++ b/toolchain/check/testdata/function/builtin/method.carbon @@ -21,24 +21,24 @@ var arr: [i32; 1.(I.F)(2)]; // CHECK:STDOUT: --- method.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: type = interface_type @I [template] -// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self, 0 [symbolic] +// CHECK:STDOUT: %I.type: type = interface_type @I [template] +// CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %F.type.1: type = fn_type @F.1 [template] -// CHECK:STDOUT: %.2: type = tuple_type () [template] +// CHECK:STDOUT: %.1: type = tuple_type () [template] // CHECK:STDOUT: %F.1: %F.type.1 = struct_value () [template] -// CHECK:STDOUT: %.3: type = assoc_entity_type %.1, %F.type.1 [template] -// CHECK:STDOUT: %.4: %.3 = assoc_entity element0, @I.%F.decl [template] +// CHECK:STDOUT: %.2: type = assoc_entity_type %I.type, %F.type.1 [template] +// CHECK:STDOUT: %.3: %.2 = assoc_entity element0, @I.%F.decl [template] // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %F.type.2: type = fn_type @F.2 [template] // CHECK:STDOUT: %F.2: %F.type.2 = struct_value () [template] -// CHECK:STDOUT: %.5: = interface_witness (%F.2) [template] -// CHECK:STDOUT: %.6: i32 = int_literal 1 [template] -// CHECK:STDOUT: %.7: = bound_method %.6, %F.2 [template] -// CHECK:STDOUT: %.8: i32 = int_literal 2 [template] -// CHECK:STDOUT: %.9: i32 = int_literal 3 [template] -// CHECK:STDOUT: %.10: type = array_type %.9, i32 [template] -// CHECK:STDOUT: %.11: type = ptr_type %.10 [template] +// CHECK:STDOUT: %.4: = interface_witness (%F.2) [template] +// CHECK:STDOUT: %.5: i32 = int_literal 1 [template] +// CHECK:STDOUT: %.6: = bound_method %.5, %F.2 [template] +// CHECK:STDOUT: %.7: i32 = int_literal 2 [template] +// CHECK:STDOUT: %.8: i32 = int_literal 3 [template] +// CHECK:STDOUT: %.9: type = array_type %.8, i32 [template] +// CHECK:STDOUT: %.10: type = ptr_type %.9 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -63,50 +63,50 @@ var arr: [i32; 1.(I.F)(2)]; // CHECK:STDOUT: .arr = %arr // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %I.decl: type = interface_decl @I [template = constants.%.1] {} {} +// CHECK:STDOUT: %I.decl: type = interface_decl @I [template = constants.%I.type] {} {} // CHECK:STDOUT: impl_decl @impl [template] {} { // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc15_6.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc15_6.2: type = converted %int.make_type_32, %.loc15_6.1 [template = i32] -// CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [template = constants.%.1] +// CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [template = constants.%I.type] // CHECK:STDOUT: } // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] -// CHECK:STDOUT: %.loc19_16: i32 = int_literal 1 [template = constants.%.6] -// CHECK:STDOUT: %I.ref: type = name_ref I, %I.decl [template = constants.%.1] -// CHECK:STDOUT: %F.ref: %.3 = name_ref F, @I.%.loc12 [template = constants.%.4] -// CHECK:STDOUT: %.loc19_17.1: %F.type.1 = interface_witness_access constants.%.5, element0 [template = constants.%F.2] -// CHECK:STDOUT: %.loc19_17.2: = bound_method %.loc19_16, %.loc19_17.1 [template = constants.%.7] -// CHECK:STDOUT: %.loc19_24: i32 = int_literal 2 [template = constants.%.8] -// CHECK:STDOUT: %int.sadd: init i32 = call %.loc19_17.2(%.loc19_16, %.loc19_24) [template = constants.%.9] +// CHECK:STDOUT: %.loc19_16: i32 = int_literal 1 [template = constants.%.5] +// CHECK:STDOUT: %I.ref: type = name_ref I, %I.decl [template = constants.%I.type] +// CHECK:STDOUT: %F.ref: %.2 = name_ref F, @I.%.loc12 [template = constants.%.3] +// CHECK:STDOUT: %.loc19_17.1: %F.type.1 = interface_witness_access constants.%.4, element0 [template = constants.%F.2] +// CHECK:STDOUT: %.loc19_17.2: = bound_method %.loc19_16, %.loc19_17.1 [template = constants.%.6] +// CHECK:STDOUT: %.loc19_24: i32 = int_literal 2 [template = constants.%.7] +// CHECK:STDOUT: %int.sadd: init i32 = call %.loc19_17.2(%.loc19_16, %.loc19_24) [template = constants.%.8] // CHECK:STDOUT: %.loc19_11.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc19_11.2: type = converted %int.make_type_32, %.loc19_11.1 [template = i32] -// CHECK:STDOUT: %.loc19_26: type = array_type %int.sadd, i32 [template = constants.%.10] -// CHECK:STDOUT: %arr.var: ref %.10 = var arr -// CHECK:STDOUT: %arr: ref %.10 = bind_name arr, %arr.var +// CHECK:STDOUT: %.loc19_26: type = array_type %int.sadd, i32 [template = constants.%.9] +// CHECK:STDOUT: %arr.var: ref %.9 = var arr +// CHECK:STDOUT: %arr: ref %.9 = bind_name arr, %arr.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @I { -// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self, 0 [symbolic = constants.%Self] +// CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self] // CHECK:STDOUT: %F.decl: %F.type.1 = fn_decl @F.1 [template = constants.%F.1] { // CHECK:STDOUT: %self.patt: @F.1.%Self (%Self) = binding_pattern self // CHECK:STDOUT: %other.patt: @F.1.%Self (%Self) = binding_pattern other // CHECK:STDOUT: } { -// CHECK:STDOUT: %Self.ref.loc12_14: %.1 = name_ref Self, @I.%Self [symbolic = %Self (constants.%Self)] +// CHECK:STDOUT: %Self.ref.loc12_14: %I.type = name_ref Self, @I.%Self [symbolic = %Self (constants.%Self)] // CHECK:STDOUT: %.loc12_14.1: type = facet_type_access %Self.ref.loc12_14 [symbolic = %Self (constants.%Self)] // CHECK:STDOUT: %.loc12_14.2: type = converted %Self.ref.loc12_14, %.loc12_14.1 [symbolic = %Self (constants.%Self)] // CHECK:STDOUT: %self.param: @F.1.%Self (%Self) = param self, runtime_param0 // CHECK:STDOUT: %self: @F.1.%Self (%Self) = bind_name self, %self.param -// CHECK:STDOUT: %Self.ref.loc12_27: %.1 = name_ref Self, @I.%Self [symbolic = %Self (constants.%Self)] +// CHECK:STDOUT: %Self.ref.loc12_27: %I.type = name_ref Self, @I.%Self [symbolic = %Self (constants.%Self)] // CHECK:STDOUT: %.loc12_27.1: type = facet_type_access %Self.ref.loc12_27 [symbolic = %Self (constants.%Self)] // CHECK:STDOUT: %.loc12_27.2: type = converted %Self.ref.loc12_27, %.loc12_27.1 [symbolic = %Self (constants.%Self)] // CHECK:STDOUT: %other.param: @F.1.%Self (%Self) = param other, runtime_param1 // CHECK:STDOUT: %other: @F.1.%Self (%Self) = bind_name other, %other.param -// CHECK:STDOUT: %Self.ref.loc12_36: %.1 = name_ref Self, @I.%Self [symbolic = %Self (constants.%Self)] +// CHECK:STDOUT: %Self.ref.loc12_36: %I.type = name_ref Self, @I.%Self [symbolic = %Self (constants.%Self)] // CHECK:STDOUT: %.loc12_36.1: type = facet_type_access %Self.ref.loc12_36 [symbolic = %Self (constants.%Self)] // CHECK:STDOUT: %.loc12_36.2: type = converted %Self.ref.loc12_36, %.loc12_36.1 [symbolic = %Self (constants.%Self)] // CHECK:STDOUT: %return: ref @F.1.%Self (%Self) = var // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc12: %.3 = assoc_entity element0, %F.decl [template = constants.%.4] +// CHECK:STDOUT: %.loc12: %.2 = assoc_entity element0, %F.decl [template = constants.%.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -134,15 +134,15 @@ var arr: [i32; 1.(I.F)(2)]; // CHECK:STDOUT: %.loc16_34.2: type = converted %int.make_type_32.loc16_34, %.loc16_34.1 [template = i32] // CHECK:STDOUT: %return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc15_15: = interface_witness (%F.decl) [template = constants.%.5] +// CHECK:STDOUT: %.loc15_15: = interface_witness (%F.decl) [template = constants.%.4] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: witness = %.loc15_15 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @F.1(@I.%Self: %.1) { -// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self)] +// CHECK:STDOUT: generic fn @F.1(@I.%Self: %I.type) { +// CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self)] // CHECK:STDOUT: // CHECK:STDOUT: fn[%self: @F.1.%Self (%Self)](%other: @F.1.%Self (%Self)) -> @F.1.%Self (%Self); // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/function/builtin/no_prelude/call_from_operator.carbon b/toolchain/check/testdata/function/builtin/no_prelude/call_from_operator.carbon index c65934c92405f..21824d6d9dacc 100644 --- a/toolchain/check/testdata/function/builtin/no_prelude/call_from_operator.carbon +++ b/toolchain/check/testdata/function/builtin/no_prelude/call_from_operator.carbon @@ -36,12 +36,12 @@ var arr: [i32; 1 + 2] = (3, 4, 3 + 4); // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] // CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] -// CHECK:STDOUT: %.2: type = interface_type @Add [template] -// CHECK:STDOUT: %Self: %.2 = bind_symbolic_name Self, 0 [symbolic] +// CHECK:STDOUT: %Add.type: type = interface_type @Add [template] +// CHECK:STDOUT: %Self: %Add.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %Op.type: type = fn_type @Op [template] // CHECK:STDOUT: %Op: %Op.type = struct_value () [template] -// CHECK:STDOUT: %.3: type = assoc_entity_type %.2, %Op.type [template] -// CHECK:STDOUT: %.4: %.3 = assoc_entity element0, @Add.%Op.decl [template] +// CHECK:STDOUT: %.2: type = assoc_entity_type %Add.type, %Op.type [template] +// CHECK:STDOUT: %.3: %.2 = assoc_entity element0, @Add.%Op.decl [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -52,31 +52,31 @@ var arr: [i32; 1 + 2] = (3, 4, 3 + 4); // CHECK:STDOUT: %Int32.decl: %Int32.type = fn_decl @Int32 [template = constants.%Int32] {} { // CHECK:STDOUT: %return: ref type = var // CHECK:STDOUT: } -// CHECK:STDOUT: %Add.decl: type = interface_decl @Add [template = constants.%.2] {} {} +// CHECK:STDOUT: %Add.decl: type = interface_decl @Add [template = constants.%Add.type] {} {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @Add { -// CHECK:STDOUT: %Self: %.2 = bind_symbolic_name Self, 0 [symbolic = constants.%Self] +// CHECK:STDOUT: %Self: %Add.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self] // CHECK:STDOUT: %Op.decl: %Op.type = fn_decl @Op [template = constants.%Op] { // CHECK:STDOUT: %self.patt: @Op.%Self (%Self) = binding_pattern self // CHECK:STDOUT: %other.patt: @Op.%Self (%Self) = binding_pattern other // CHECK:STDOUT: } { -// CHECK:STDOUT: %Self.ref.loc7_15: %.2 = name_ref Self, @Add.%Self [symbolic = %Self (constants.%Self)] +// CHECK:STDOUT: %Self.ref.loc7_15: %Add.type = name_ref Self, @Add.%Self [symbolic = %Self (constants.%Self)] // CHECK:STDOUT: %.loc7_15.1: type = facet_type_access %Self.ref.loc7_15 [symbolic = %Self (constants.%Self)] // CHECK:STDOUT: %.loc7_15.2: type = converted %Self.ref.loc7_15, %.loc7_15.1 [symbolic = %Self (constants.%Self)] // CHECK:STDOUT: %self.param: @Op.%Self (%Self) = param self, runtime_param0 // CHECK:STDOUT: %self: @Op.%Self (%Self) = bind_name self, %self.param -// CHECK:STDOUT: %Self.ref.loc7_28: %.2 = name_ref Self, @Add.%Self [symbolic = %Self (constants.%Self)] +// CHECK:STDOUT: %Self.ref.loc7_28: %Add.type = name_ref Self, @Add.%Self [symbolic = %Self (constants.%Self)] // CHECK:STDOUT: %.loc7_28.1: type = facet_type_access %Self.ref.loc7_28 [symbolic = %Self (constants.%Self)] // CHECK:STDOUT: %.loc7_28.2: type = converted %Self.ref.loc7_28, %.loc7_28.1 [symbolic = %Self (constants.%Self)] // CHECK:STDOUT: %other.param: @Op.%Self (%Self) = param other, runtime_param1 // CHECK:STDOUT: %other: @Op.%Self (%Self) = bind_name other, %other.param -// CHECK:STDOUT: %Self.ref.loc7_37: %.2 = name_ref Self, @Add.%Self [symbolic = %Self (constants.%Self)] +// CHECK:STDOUT: %Self.ref.loc7_37: %Add.type = name_ref Self, @Add.%Self [symbolic = %Self (constants.%Self)] // CHECK:STDOUT: %.loc7_37.1: type = facet_type_access %Self.ref.loc7_37 [symbolic = %Self (constants.%Self)] // CHECK:STDOUT: %.loc7_37.2: type = converted %Self.ref.loc7_37, %.loc7_37.1 [symbolic = %Self (constants.%Self)] // CHECK:STDOUT: %return: ref @Op.%Self (%Self) = var // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc7: %.3 = assoc_entity element0, %Op.decl [template = constants.%.4] +// CHECK:STDOUT: %.loc7: %.2 = assoc_entity element0, %Op.decl [template = constants.%.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -86,8 +86,8 @@ var arr: [i32; 1 + 2] = (3, 4, 3 + 4); // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32"; // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @Op(@Add.%Self: %.2) { -// CHECK:STDOUT: %Self: %.2 = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self)] +// CHECK:STDOUT: generic fn @Op(@Add.%Self: %Add.type) { +// CHECK:STDOUT: %Self: %Add.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self)] // CHECK:STDOUT: // CHECK:STDOUT: fn[%self: @Op.%Self (%Self)](%other: @Op.%Self (%Self)) -> @Op.%Self (%Self); // CHECK:STDOUT: } @@ -102,27 +102,27 @@ var arr: [i32; 1 + 2] = (3, 4, 3 + 4); // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] // CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] -// CHECK:STDOUT: %.2: type = interface_type @Add [template] -// CHECK:STDOUT: %Self: %.2 = bind_symbolic_name Self, 0 [symbolic] +// CHECK:STDOUT: %Add.type: type = interface_type @Add [template] +// CHECK:STDOUT: %Self: %Add.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %Op.type.1: type = fn_type @Op.1 [template] // CHECK:STDOUT: %Op.1: %Op.type.1 = struct_value () [template] // CHECK:STDOUT: %Op.type.2: type = fn_type @Op.2 [template] // CHECK:STDOUT: %Op.2: %Op.type.2 = struct_value () [template] -// CHECK:STDOUT: %.3: = interface_witness (%Op.1) [template] -// CHECK:STDOUT: %.4: i32 = int_literal 1 [template] -// CHECK:STDOUT: %.5: i32 = int_literal 2 [template] -// CHECK:STDOUT: %.6: type = assoc_entity_type %.2, %Op.type.2 [template] -// CHECK:STDOUT: %.7: %.6 = assoc_entity element0, imports.%import_ref.6 [template] -// CHECK:STDOUT: %.8: = bound_method %.4, %Op.1 [template] -// CHECK:STDOUT: %.9: i32 = int_literal 3 [template] -// CHECK:STDOUT: %.10: type = array_type %.9, i32 [template] -// CHECK:STDOUT: %.11: type = ptr_type %.10 [template] -// CHECK:STDOUT: %.12: i32 = int_literal 4 [template] -// CHECK:STDOUT: %.13: = bound_method %.9, %Op.1 [template] -// CHECK:STDOUT: %.14: i32 = int_literal 7 [template] -// CHECK:STDOUT: %.15: type = tuple_type (i32, i32, i32) [template] -// CHECK:STDOUT: %.16: i32 = int_literal 0 [template] -// CHECK:STDOUT: %array: %.10 = tuple_value (%.9, %.12, %.14) [template] +// CHECK:STDOUT: %.2: = interface_witness (%Op.1) [template] +// CHECK:STDOUT: %.3: i32 = int_literal 1 [template] +// CHECK:STDOUT: %.4: i32 = int_literal 2 [template] +// CHECK:STDOUT: %.5: type = assoc_entity_type %Add.type, %Op.type.2 [template] +// CHECK:STDOUT: %.6: %.5 = assoc_entity element0, imports.%import_ref.6 [template] +// CHECK:STDOUT: %.7: = bound_method %.3, %Op.1 [template] +// CHECK:STDOUT: %.8: i32 = int_literal 3 [template] +// CHECK:STDOUT: %.9: type = array_type %.8, i32 [template] +// CHECK:STDOUT: %.10: type = ptr_type %.9 [template] +// CHECK:STDOUT: %.11: i32 = int_literal 4 [template] +// CHECK:STDOUT: %.12: = bound_method %.8, %Op.1 [template] +// CHECK:STDOUT: %.13: i32 = int_literal 7 [template] +// CHECK:STDOUT: %.14: type = tuple_type (i32, i32, i32) [template] +// CHECK:STDOUT: %.15: i32 = int_literal 0 [template] +// CHECK:STDOUT: %array: %.9 = tuple_value (%.8, %.11, %.13) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -132,9 +132,9 @@ var arr: [i32; 1 + 2] = (3, 4, 3 + 4); // CHECK:STDOUT: import Core//default // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref Core//default, inst+2, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.2: type = import_ref Core//default, inst+6, loaded [template = constants.%.2] +// CHECK:STDOUT: %import_ref.2: type = import_ref Core//default, inst+6, loaded [template = constants.%Add.type] // CHECK:STDOUT: %import_ref.3 = import_ref Core//default, inst+8, unloaded -// CHECK:STDOUT: %import_ref.4: %.6 = import_ref Core//default, inst+31, loaded [template = constants.%.7] +// CHECK:STDOUT: %import_ref.4: %.5 = import_ref Core//default, inst+31, loaded [template = constants.%.6] // CHECK:STDOUT: %import_ref.5: %Op.type.2 = import_ref Core//default, inst+26, loaded [template = constants.%Op.2] // CHECK:STDOUT: %import_ref.6 = import_ref Core//default, inst+26, unloaded // CHECK:STDOUT: } @@ -150,20 +150,20 @@ var arr: [i32; 1 + 2] = (3, 4, 3 + 4); // CHECK:STDOUT: %.loc6_6.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc6_6.2: type = converted %int.make_type_32, %.loc6_6.1 [template = i32] // CHECK:STDOUT: %Core.ref: = name_ref Core, imports.%Core [template = imports.%Core] -// CHECK:STDOUT: %Add.ref: type = name_ref Add, imports.%import_ref.2 [template = constants.%.2] +// CHECK:STDOUT: %Add.ref: type = name_ref Add, imports.%import_ref.2 [template = constants.%Add.type] // CHECK:STDOUT: } // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] -// CHECK:STDOUT: %.loc10_16: i32 = int_literal 1 [template = constants.%.4] -// CHECK:STDOUT: %.loc10_20: i32 = int_literal 2 [template = constants.%.5] -// CHECK:STDOUT: %Op.ref: %.6 = name_ref Op, imports.%import_ref.4 [template = constants.%.7] -// CHECK:STDOUT: %.loc10_18.1: %Op.type.2 = interface_witness_access constants.%.3, element0 [template = constants.%Op.1] -// CHECK:STDOUT: %.loc10_18.2: = bound_method %.loc10_16, %.loc10_18.1 [template = constants.%.8] -// CHECK:STDOUT: %int.sadd: init i32 = call %.loc10_18.2(%.loc10_16, %.loc10_20) [template = constants.%.9] +// CHECK:STDOUT: %.loc10_16: i32 = int_literal 1 [template = constants.%.3] +// CHECK:STDOUT: %.loc10_20: i32 = int_literal 2 [template = constants.%.4] +// CHECK:STDOUT: %Op.ref: %.5 = name_ref Op, imports.%import_ref.4 [template = constants.%.6] +// CHECK:STDOUT: %.loc10_18.1: %Op.type.2 = interface_witness_access constants.%.2, element0 [template = constants.%Op.1] +// CHECK:STDOUT: %.loc10_18.2: = bound_method %.loc10_16, %.loc10_18.1 [template = constants.%.7] +// CHECK:STDOUT: %int.sadd: init i32 = call %.loc10_18.2(%.loc10_16, %.loc10_20) [template = constants.%.8] // CHECK:STDOUT: %.loc10_11.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc10_11.2: type = converted %int.make_type_32, %.loc10_11.1 [template = i32] -// CHECK:STDOUT: %.loc10_21: type = array_type %int.sadd, i32 [template = constants.%.10] -// CHECK:STDOUT: %arr.var: ref %.10 = var arr -// CHECK:STDOUT: %arr: ref %.10 = bind_name arr, %arr.var +// CHECK:STDOUT: %.loc10_21: type = array_type %int.sadd, i32 [template = constants.%.9] +// CHECK:STDOUT: %arr.var: ref %.9 = var arr +// CHECK:STDOUT: %arr: ref %.9 = bind_name arr, %arr.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @Add { @@ -187,7 +187,7 @@ var arr: [i32; 1 + 2] = (3, 4, 3 + 4); // CHECK:STDOUT: %Self.ref.loc7_37: type = name_ref Self, @impl.%.loc6_6.2 [template = i32] // CHECK:STDOUT: %return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc6_22: = interface_witness (%Op.decl) [template = constants.%.3] +// CHECK:STDOUT: %.loc6_22: = interface_witness (%Op.decl) [template = constants.%.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Op = %Op.decl @@ -198,34 +198,34 @@ var arr: [i32; 1 + 2] = (3, 4, 3 + 4); // CHECK:STDOUT: // CHECK:STDOUT: fn @Op.1[%self: i32](%other: i32) -> i32 = "int.sadd"; // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @Op.2(constants.%Self: %.2) { -// CHECK:STDOUT: %Self: %.2 = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self)] +// CHECK:STDOUT: generic fn @Op.2(constants.%Self: %Add.type) { +// CHECK:STDOUT: %Self: %Add.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self)] // CHECK:STDOUT: // CHECK:STDOUT: fn[%self: @Op.2.%Self (%Self)](%other: @Op.2.%Self (%Self)) -> @Op.2.%Self (%Self); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc10_26: i32 = int_literal 3 [template = constants.%.9] -// CHECK:STDOUT: %.loc10_29: i32 = int_literal 4 [template = constants.%.12] -// CHECK:STDOUT: %.loc10_32: i32 = int_literal 3 [template = constants.%.9] -// CHECK:STDOUT: %.loc10_36: i32 = int_literal 4 [template = constants.%.12] -// CHECK:STDOUT: %Op.ref: %.6 = name_ref Op, imports.%import_ref.4 [template = constants.%.7] -// CHECK:STDOUT: %.loc10_34.1: %Op.type.2 = interface_witness_access constants.%.3, element0 [template = constants.%Op.1] -// CHECK:STDOUT: %.loc10_34.2: = bound_method %.loc10_32, %.loc10_34.1 [template = constants.%.13] -// CHECK:STDOUT: %int.sadd: init i32 = call %.loc10_34.2(%.loc10_32, %.loc10_36) [template = constants.%.14] -// CHECK:STDOUT: %.loc10_37.1: %.15 = tuple_literal (%.loc10_26, %.loc10_29, %int.sadd) -// CHECK:STDOUT: %.loc10_37.2: i32 = int_literal 0 [template = constants.%.16] +// CHECK:STDOUT: %.loc10_26: i32 = int_literal 3 [template = constants.%.8] +// CHECK:STDOUT: %.loc10_29: i32 = int_literal 4 [template = constants.%.11] +// CHECK:STDOUT: %.loc10_32: i32 = int_literal 3 [template = constants.%.8] +// CHECK:STDOUT: %.loc10_36: i32 = int_literal 4 [template = constants.%.11] +// CHECK:STDOUT: %Op.ref: %.5 = name_ref Op, imports.%import_ref.4 [template = constants.%.6] +// CHECK:STDOUT: %.loc10_34.1: %Op.type.2 = interface_witness_access constants.%.2, element0 [template = constants.%Op.1] +// CHECK:STDOUT: %.loc10_34.2: = bound_method %.loc10_32, %.loc10_34.1 [template = constants.%.12] +// CHECK:STDOUT: %int.sadd: init i32 = call %.loc10_34.2(%.loc10_32, %.loc10_36) [template = constants.%.13] +// CHECK:STDOUT: %.loc10_37.1: %.14 = tuple_literal (%.loc10_26, %.loc10_29, %int.sadd) +// CHECK:STDOUT: %.loc10_37.2: i32 = int_literal 0 [template = constants.%.15] // CHECK:STDOUT: %.loc10_37.3: ref i32 = array_index file.%arr.var, %.loc10_37.2 -// CHECK:STDOUT: %.loc10_37.4: init i32 = initialize_from %.loc10_26 to %.loc10_37.3 [template = constants.%.9] -// CHECK:STDOUT: %.loc10_37.5: i32 = int_literal 1 [template = constants.%.4] +// CHECK:STDOUT: %.loc10_37.4: init i32 = initialize_from %.loc10_26 to %.loc10_37.3 [template = constants.%.8] +// CHECK:STDOUT: %.loc10_37.5: i32 = int_literal 1 [template = constants.%.3] // CHECK:STDOUT: %.loc10_37.6: ref i32 = array_index file.%arr.var, %.loc10_37.5 -// CHECK:STDOUT: %.loc10_37.7: init i32 = initialize_from %.loc10_29 to %.loc10_37.6 [template = constants.%.12] -// CHECK:STDOUT: %.loc10_37.8: i32 = int_literal 2 [template = constants.%.5] +// CHECK:STDOUT: %.loc10_37.7: init i32 = initialize_from %.loc10_29 to %.loc10_37.6 [template = constants.%.11] +// CHECK:STDOUT: %.loc10_37.8: i32 = int_literal 2 [template = constants.%.4] // CHECK:STDOUT: %.loc10_37.9: ref i32 = array_index file.%arr.var, %.loc10_37.8 -// CHECK:STDOUT: %.loc10_37.10: init i32 = initialize_from %int.sadd to %.loc10_37.9 [template = constants.%.14] -// CHECK:STDOUT: %.loc10_37.11: init %.10 = array_init (%.loc10_37.4, %.loc10_37.7, %.loc10_37.10) to file.%arr.var [template = constants.%array] -// CHECK:STDOUT: %.loc10_38: init %.10 = converted %.loc10_37.1, %.loc10_37.11 [template = constants.%array] +// CHECK:STDOUT: %.loc10_37.10: init i32 = initialize_from %int.sadd to %.loc10_37.9 [template = constants.%.13] +// CHECK:STDOUT: %.loc10_37.11: init %.9 = array_init (%.loc10_37.4, %.loc10_37.7, %.loc10_37.10) to file.%arr.var [template = constants.%array] +// CHECK:STDOUT: %.loc10_38: init %.9 = converted %.loc10_37.1, %.loc10_37.11 [template = constants.%array] // CHECK:STDOUT: assign file.%arr.var, %.loc10_38 // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/function/call/fail_param_type.carbon b/toolchain/check/testdata/function/call/fail_param_type.carbon index 7773a76028ab6..eb455843a36dc 100644 --- a/toolchain/check/testdata/function/call/fail_param_type.carbon +++ b/toolchain/check/testdata/function/call/fail_param_type.carbon @@ -34,22 +34,22 @@ fn F() { // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: %.2: f64 = float_literal 1 [template] -// CHECK:STDOUT: %ImplicitAs.type: type = generic_interface_type @ImplicitAs [template] -// CHECK:STDOUT: %ImplicitAs: %ImplicitAs.type = struct_value () [template] +// CHECK:STDOUT: %ImplicitAs.type.1: type = generic_interface_type @ImplicitAs [template] +// CHECK:STDOUT: %ImplicitAs: %ImplicitAs.type.1 = struct_value () [template] // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic] -// CHECK:STDOUT: %.3: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic] -// CHECK:STDOUT: %Self.1: @ImplicitAs.%.1 (%.3) = bind_symbolic_name Self, 1 [symbolic] -// CHECK:STDOUT: %Self.2: %.3 = bind_symbolic_name Self, 1 [symbolic] +// CHECK:STDOUT: %ImplicitAs.type.2: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic] +// CHECK:STDOUT: %Self.1: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2) = bind_symbolic_name Self, 1 [symbolic] +// CHECK:STDOUT: %Self.2: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: %Convert.type.1: type = fn_type @Convert, @ImplicitAs(%Dest) [symbolic] // CHECK:STDOUT: %Convert.1: %Convert.type.1 = struct_value () [symbolic] -// CHECK:STDOUT: %.4: type = assoc_entity_type %.3, %Convert.type.1 [symbolic] -// CHECK:STDOUT: %.5: %.4 = assoc_entity element0, imports.%import_ref.6 [symbolic] -// CHECK:STDOUT: %.6: type = interface_type @ImplicitAs, @ImplicitAs(i32) [template] +// CHECK:STDOUT: %.3: type = assoc_entity_type %ImplicitAs.type.2, %Convert.type.1 [symbolic] +// CHECK:STDOUT: %.4: %.3 = assoc_entity element0, imports.%import_ref.6 [symbolic] +// CHECK:STDOUT: %ImplicitAs.type.3: type = interface_type @ImplicitAs, @ImplicitAs(i32) [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert, @ImplicitAs(i32) [template] // CHECK:STDOUT: %Convert.2: %Convert.type.2 = struct_value () [template] -// CHECK:STDOUT: %.7: type = assoc_entity_type %.6, %Convert.type.2 [template] -// CHECK:STDOUT: %.8: %.7 = assoc_entity element0, imports.%import_ref.6 [template] -// CHECK:STDOUT: %.9: %.4 = assoc_entity element0, imports.%import_ref.7 [symbolic] +// CHECK:STDOUT: %.5: type = assoc_entity_type %ImplicitAs.type.3, %Convert.type.2 [template] +// CHECK:STDOUT: %.6: %.5 = assoc_entity element0, imports.%import_ref.6 [template] +// CHECK:STDOUT: %.7: %.3 = assoc_entity element0, imports.%import_ref.7 [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -66,9 +66,9 @@ fn F() { // CHECK:STDOUT: import Core//prelude/types/bool // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref Core//prelude/types, inst+4, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.2: %ImplicitAs.type = import_ref Core//prelude/operators/as, inst+40, loaded [template = constants.%ImplicitAs] +// CHECK:STDOUT: %import_ref.2: %ImplicitAs.type.1 = import_ref Core//prelude/operators/as, inst+40, loaded [template = constants.%ImplicitAs] // CHECK:STDOUT: %import_ref.3 = import_ref Core//prelude/operators/as, inst+45, unloaded -// CHECK:STDOUT: %import_ref.4: @ImplicitAs.%.2 (%.4) = import_ref Core//prelude/operators/as, inst+63, loaded [symbolic = @ImplicitAs.%.3 (constants.%.9)] +// CHECK:STDOUT: %import_ref.4: @ImplicitAs.%.1 (%.3) = import_ref Core//prelude/operators/as, inst+63, loaded [symbolic = @ImplicitAs.%.2 (constants.%.7)] // CHECK:STDOUT: %import_ref.5 = import_ref Core//prelude/operators/as, inst+56, unloaded // CHECK:STDOUT: %import_ref.6 = import_ref Core//prelude/operators/as, inst+56, unloaded // CHECK:STDOUT: %import_ref.7 = import_ref Core//prelude/operators/as, inst+56, unloaded @@ -97,12 +97,12 @@ fn F() { // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic = %Dest (constants.%Dest)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.1: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic = %.1 (constants.%.3)] -// CHECK:STDOUT: %Self: %.3 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] +// CHECK:STDOUT: %ImplicitAs.type: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.2)] +// CHECK:STDOUT: %Self: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] // CHECK:STDOUT: %Convert.type: type = fn_type @Convert, @ImplicitAs(%Dest) [symbolic = %Convert.type (constants.%Convert.type.1)] // CHECK:STDOUT: %Convert: @ImplicitAs.%Convert.type (%Convert.type.1) = struct_value () [symbolic = %Convert (constants.%Convert.1)] -// CHECK:STDOUT: %.2: type = assoc_entity_type @ImplicitAs.%.1 (%.3), @ImplicitAs.%Convert.type (%Convert.type.1) [symbolic = %.2 (constants.%.4)] -// CHECK:STDOUT: %.3: @ImplicitAs.%.2 (%.4) = assoc_entity element0, imports.%import_ref.6 [symbolic = %.3 (constants.%.5)] +// CHECK:STDOUT: %.1: type = assoc_entity_type @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2), @ImplicitAs.%Convert.type (%Convert.type.1) [symbolic = %.1 (constants.%.3)] +// CHECK:STDOUT: %.2: @ImplicitAs.%.1 (%.3) = assoc_entity element0, imports.%import_ref.6 [symbolic = %.2 (constants.%.4)] // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: !members: @@ -123,18 +123,18 @@ fn F() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %G.ref: %G.type = name_ref G, file.%G.decl [template = constants.%G] // CHECK:STDOUT: %.loc23_5: f64 = float_literal 1 [template = constants.%.2] -// CHECK:STDOUT: %.loc23_4.1: type = interface_type @ImplicitAs, @ImplicitAs(i32) [template = constants.%.6] -// CHECK:STDOUT: %.loc23_4.2: %.7 = specific_constant imports.%import_ref.4, @ImplicitAs(i32) [template = constants.%.8] -// CHECK:STDOUT: %Convert.ref: %.7 = name_ref Convert, %.loc23_4.2 [template = constants.%.8] -// CHECK:STDOUT: %.loc23_4.3: i32 = converted %.loc23_5, [template = ] +// CHECK:STDOUT: %ImplicitAs.type: type = interface_type @ImplicitAs, @ImplicitAs(i32) [template = constants.%ImplicitAs.type.3] +// CHECK:STDOUT: %.loc23_4.1: %.5 = specific_constant imports.%import_ref.4, @ImplicitAs(i32) [template = constants.%.6] +// CHECK:STDOUT: %Convert.ref: %.5 = name_ref Convert, %.loc23_4.1 [template = constants.%.6] +// CHECK:STDOUT: %.loc23_4.2: i32 = converted %.loc23_5, [template = ] // CHECK:STDOUT: %G.call: init %.1 = call %G.ref() [template = ] // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @Convert(constants.%Dest: type, constants.%Self.1: @ImplicitAs.%.1 (%.3)) { +// CHECK:STDOUT: generic fn @Convert(constants.%Dest: type, constants.%Self.1: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2)) { // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic = %Dest (constants.%Dest)] -// CHECK:STDOUT: %.1: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic = %.1 (constants.%.3)] -// CHECK:STDOUT: %Self: %.3 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] +// CHECK:STDOUT: %ImplicitAs.type: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.2)] +// CHECK:STDOUT: %Self: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] // CHECK:STDOUT: // CHECK:STDOUT: fn[%self: @Convert.%Self (%Self.2)]() -> @Convert.%Dest (%Dest); // CHECK:STDOUT: } @@ -153,7 +153,7 @@ fn F() { // CHECK:STDOUT: // CHECK:STDOUT: specific @Convert(constants.%Dest, constants.%Self.1) { // CHECK:STDOUT: %Dest => constants.%Dest -// CHECK:STDOUT: %.1 => constants.%.3 +// CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.2 // CHECK:STDOUT: %Self => constants.%Self.1 // CHECK:STDOUT: } // CHECK:STDOUT: @@ -161,11 +161,11 @@ fn F() { // CHECK:STDOUT: %Dest => i32 // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.1 => constants.%.6 +// CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.3 // CHECK:STDOUT: %Self => constants.%Self.2 // CHECK:STDOUT: %Convert.type => constants.%Convert.type.2 // CHECK:STDOUT: %Convert => constants.%Convert.2 -// CHECK:STDOUT: %.2 => constants.%.7 -// CHECK:STDOUT: %.3 => constants.%.8 +// CHECK:STDOUT: %.1 => constants.%.5 +// CHECK:STDOUT: %.2 => constants.%.6 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/function/call/fail_return_type_mismatch.carbon b/toolchain/check/testdata/function/call/fail_return_type_mismatch.carbon index 0dcd4b6dc4f64..98c4ae4723046 100644 --- a/toolchain/check/testdata/function/call/fail_return_type_mismatch.carbon +++ b/toolchain/check/testdata/function/call/fail_return_type_mismatch.carbon @@ -34,22 +34,22 @@ fn Run() { // CHECK:STDOUT: %Run: %Run.type = struct_value () [template] // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] -// CHECK:STDOUT: %ImplicitAs.type: type = generic_interface_type @ImplicitAs [template] -// CHECK:STDOUT: %ImplicitAs: %ImplicitAs.type = struct_value () [template] +// CHECK:STDOUT: %ImplicitAs.type.1: type = generic_interface_type @ImplicitAs [template] +// CHECK:STDOUT: %ImplicitAs: %ImplicitAs.type.1 = struct_value () [template] // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic] -// CHECK:STDOUT: %.4: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic] -// CHECK:STDOUT: %Self.1: @ImplicitAs.%.1 (%.4) = bind_symbolic_name Self, 1 [symbolic] -// CHECK:STDOUT: %Self.2: %.4 = bind_symbolic_name Self, 1 [symbolic] +// CHECK:STDOUT: %ImplicitAs.type.2: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic] +// CHECK:STDOUT: %Self.1: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2) = bind_symbolic_name Self, 1 [symbolic] +// CHECK:STDOUT: %Self.2: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: %Convert.type.1: type = fn_type @Convert, @ImplicitAs(%Dest) [symbolic] // CHECK:STDOUT: %Convert.1: %Convert.type.1 = struct_value () [symbolic] -// CHECK:STDOUT: %.5: type = assoc_entity_type %.4, %Convert.type.1 [symbolic] -// CHECK:STDOUT: %.6: %.5 = assoc_entity element0, imports.%import_ref.7 [symbolic] -// CHECK:STDOUT: %.7: type = interface_type @ImplicitAs, @ImplicitAs(i32) [template] +// CHECK:STDOUT: %.4: type = assoc_entity_type %ImplicitAs.type.2, %Convert.type.1 [symbolic] +// CHECK:STDOUT: %.5: %.4 = assoc_entity element0, imports.%import_ref.7 [symbolic] +// CHECK:STDOUT: %ImplicitAs.type.3: type = interface_type @ImplicitAs, @ImplicitAs(i32) [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert, @ImplicitAs(i32) [template] // CHECK:STDOUT: %Convert.2: %Convert.type.2 = struct_value () [template] -// CHECK:STDOUT: %.8: type = assoc_entity_type %.7, %Convert.type.2 [template] -// CHECK:STDOUT: %.9: %.8 = assoc_entity element0, imports.%import_ref.7 [template] -// CHECK:STDOUT: %.10: %.5 = assoc_entity element0, imports.%import_ref.8 [symbolic] +// CHECK:STDOUT: %.6: type = assoc_entity_type %ImplicitAs.type.3, %Convert.type.2 [template] +// CHECK:STDOUT: %.7: %.6 = assoc_entity element0, imports.%import_ref.7 [template] +// CHECK:STDOUT: %.8: %.4 = assoc_entity element0, imports.%import_ref.8 [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -68,9 +68,9 @@ fn Run() { // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.1: %Float.type = import_ref Core//prelude/types, inst+35, loaded [template = constants.%Float] // CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref Core//prelude/types, inst+4, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.3: %ImplicitAs.type = import_ref Core//prelude/operators/as, inst+40, loaded [template = constants.%ImplicitAs] +// CHECK:STDOUT: %import_ref.3: %ImplicitAs.type.1 = import_ref Core//prelude/operators/as, inst+40, loaded [template = constants.%ImplicitAs] // CHECK:STDOUT: %import_ref.4 = import_ref Core//prelude/operators/as, inst+45, unloaded -// CHECK:STDOUT: %import_ref.5: @ImplicitAs.%.2 (%.5) = import_ref Core//prelude/operators/as, inst+63, loaded [symbolic = @ImplicitAs.%.3 (constants.%.10)] +// CHECK:STDOUT: %import_ref.5: @ImplicitAs.%.1 (%.4) = import_ref Core//prelude/operators/as, inst+63, loaded [symbolic = @ImplicitAs.%.2 (constants.%.8)] // CHECK:STDOUT: %import_ref.6 = import_ref Core//prelude/operators/as, inst+56, unloaded // CHECK:STDOUT: %import_ref.7 = import_ref Core//prelude/operators/as, inst+56, unloaded // CHECK:STDOUT: %import_ref.8 = import_ref Core//prelude/operators/as, inst+56, unloaded @@ -97,12 +97,12 @@ fn Run() { // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic = %Dest (constants.%Dest)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.1: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic = %.1 (constants.%.4)] -// CHECK:STDOUT: %Self: %.4 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] +// CHECK:STDOUT: %ImplicitAs.type: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.2)] +// CHECK:STDOUT: %Self: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] // CHECK:STDOUT: %Convert.type: type = fn_type @Convert, @ImplicitAs(%Dest) [symbolic = %Convert.type (constants.%Convert.type.1)] // CHECK:STDOUT: %Convert: @ImplicitAs.%Convert.type (%Convert.type.1) = struct_value () [symbolic = %Convert (constants.%Convert.1)] -// CHECK:STDOUT: %.2: type = assoc_entity_type @ImplicitAs.%.1 (%.4), @ImplicitAs.%Convert.type (%Convert.type.1) [symbolic = %.2 (constants.%.5)] -// CHECK:STDOUT: %.3: @ImplicitAs.%.2 (%.5) = assoc_entity element0, imports.%import_ref.7 [symbolic = %.3 (constants.%.6)] +// CHECK:STDOUT: %.1: type = assoc_entity_type @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2), @ImplicitAs.%Convert.type (%Convert.type.1) [symbolic = %.1 (constants.%.4)] +// CHECK:STDOUT: %.2: @ImplicitAs.%.1 (%.4) = assoc_entity element0, imports.%import_ref.7 [symbolic = %.2 (constants.%.5)] // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: !members: @@ -129,22 +129,22 @@ fn Run() { // CHECK:STDOUT: %x: ref i32 = bind_name x, %x.var // CHECK:STDOUT: %Foo.ref: %Foo.type = name_ref Foo, file.%Foo.decl [template = constants.%Foo] // CHECK:STDOUT: %Foo.call: init f64 = call %Foo.ref() -// CHECK:STDOUT: %.loc20_21.1: type = interface_type @ImplicitAs, @ImplicitAs(i32) [template = constants.%.7] -// CHECK:STDOUT: %.loc20_21.2: %.8 = specific_constant imports.%import_ref.5, @ImplicitAs(i32) [template = constants.%.9] -// CHECK:STDOUT: %Convert.ref: %.8 = name_ref Convert, %.loc20_21.2 [template = constants.%.9] +// CHECK:STDOUT: %ImplicitAs.type: type = interface_type @ImplicitAs, @ImplicitAs(i32) [template = constants.%ImplicitAs.type.3] +// CHECK:STDOUT: %.loc20_21.1: %.6 = specific_constant imports.%import_ref.5, @ImplicitAs(i32) [template = constants.%.7] +// CHECK:STDOUT: %Convert.ref: %.6 = name_ref Convert, %.loc20_21.1 [template = constants.%.7] // CHECK:STDOUT: %.loc20_19.1: ref f64 = temporary_storage // CHECK:STDOUT: %.loc20_19.2: ref f64 = temporary %.loc20_19.1, %Foo.call -// CHECK:STDOUT: %.loc20_21.3: i32 = converted %Foo.call, [template = ] +// CHECK:STDOUT: %.loc20_21.2: i32 = converted %Foo.call, [template = ] // CHECK:STDOUT: assign %x.var, // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32"; // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @Convert(constants.%Dest: type, constants.%Self.1: @ImplicitAs.%.1 (%.4)) { +// CHECK:STDOUT: generic fn @Convert(constants.%Dest: type, constants.%Self.1: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2)) { // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic = %Dest (constants.%Dest)] -// CHECK:STDOUT: %.1: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic = %.1 (constants.%.4)] -// CHECK:STDOUT: %Self: %.4 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] +// CHECK:STDOUT: %ImplicitAs.type: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.2)] +// CHECK:STDOUT: %Self: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] // CHECK:STDOUT: // CHECK:STDOUT: fn[%self: @Convert.%Self (%Self.2)]() -> @Convert.%Dest (%Dest); // CHECK:STDOUT: } @@ -163,7 +163,7 @@ fn Run() { // CHECK:STDOUT: // CHECK:STDOUT: specific @Convert(constants.%Dest, constants.%Self.1) { // CHECK:STDOUT: %Dest => constants.%Dest -// CHECK:STDOUT: %.1 => constants.%.4 +// CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.2 // CHECK:STDOUT: %Self => constants.%Self.1 // CHECK:STDOUT: } // CHECK:STDOUT: @@ -171,11 +171,11 @@ fn Run() { // CHECK:STDOUT: %Dest => i32 // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.1 => constants.%.7 +// CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.3 // CHECK:STDOUT: %Self => constants.%Self.2 // CHECK:STDOUT: %Convert.type => constants.%Convert.type.2 // CHECK:STDOUT: %Convert => constants.%Convert.2 -// CHECK:STDOUT: %.2 => constants.%.8 -// CHECK:STDOUT: %.3 => constants.%.9 +// CHECK:STDOUT: %.1 => constants.%.6 +// CHECK:STDOUT: %.2 => constants.%.7 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/impl/compound.carbon b/toolchain/check/testdata/impl/compound.carbon index 96c90bf112b29..c331d3d1c6c1c 100644 --- a/toolchain/check/testdata/impl/compound.carbon +++ b/toolchain/check/testdata/impl/compound.carbon @@ -37,29 +37,29 @@ fn InstanceCallIndirect(p: i32*) { // CHECK:STDOUT: --- compound.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: type = interface_type @Simple [template] -// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self, 0 [symbolic] +// CHECK:STDOUT: %Simple.type: type = interface_type @Simple [template] +// CHECK:STDOUT: %Self: %Simple.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %F.type.1: type = fn_type @F.1 [template] -// CHECK:STDOUT: %.2: type = tuple_type () [template] +// CHECK:STDOUT: %.1: type = tuple_type () [template] // CHECK:STDOUT: %F.1: %F.type.1 = struct_value () [template] -// CHECK:STDOUT: %.3: type = assoc_entity_type %.1, %F.type.1 [template] -// CHECK:STDOUT: %.4: %.3 = assoc_entity element0, @Simple.%F.decl [template] +// CHECK:STDOUT: %.2: type = assoc_entity_type %Simple.type, %F.type.1 [template] +// CHECK:STDOUT: %.3: %.2 = assoc_entity element0, @Simple.%F.decl [template] // CHECK:STDOUT: %G.type.1: type = fn_type @G.1 [template] // CHECK:STDOUT: %G.1: %G.type.1 = struct_value () [template] -// CHECK:STDOUT: %.5: type = assoc_entity_type %.1, %G.type.1 [template] -// CHECK:STDOUT: %.6: %.5 = assoc_entity element1, @Simple.%G.decl [template] +// CHECK:STDOUT: %.4: type = assoc_entity_type %Simple.type, %G.type.1 [template] +// CHECK:STDOUT: %.5: %.4 = assoc_entity element1, @Simple.%G.decl [template] // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %F.type.2: type = fn_type @F.2 [template] // CHECK:STDOUT: %F.2: %F.type.2 = struct_value () [template] // CHECK:STDOUT: %G.type.2: type = fn_type @G.2 [template] // CHECK:STDOUT: %G.2: %G.type.2 = struct_value () [template] -// CHECK:STDOUT: %.7: = interface_witness (%F.2, %G.2) [template] +// CHECK:STDOUT: %.6: = interface_witness (%F.2, %G.2) [template] // CHECK:STDOUT: %NonInstanceCall.type: type = fn_type @NonInstanceCall [template] // CHECK:STDOUT: %NonInstanceCall: %NonInstanceCall.type = struct_value () [template] // CHECK:STDOUT: %InstanceCall.type: type = fn_type @InstanceCall [template] // CHECK:STDOUT: %InstanceCall: %InstanceCall.type = struct_value () [template] -// CHECK:STDOUT: %.8: type = ptr_type i32 [template] +// CHECK:STDOUT: %.7: type = ptr_type i32 [template] // CHECK:STDOUT: %NonInstanceCallIndirect.type: type = fn_type @NonInstanceCallIndirect [template] // CHECK:STDOUT: %NonInstanceCallIndirect: %NonInstanceCallIndirect.type = struct_value () [template] // CHECK:STDOUT: %InstanceCallIndirect.type: type = fn_type @InstanceCallIndirect [template] @@ -91,12 +91,12 @@ fn InstanceCallIndirect(p: i32*) { // CHECK:STDOUT: .InstanceCallIndirect = %InstanceCallIndirect.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %Simple.decl: type = interface_decl @Simple [template = constants.%.1] {} {} +// CHECK:STDOUT: %Simple.decl: type = interface_decl @Simple [template = constants.%Simple.type] {} {} // CHECK:STDOUT: impl_decl @impl [template] {} { // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc16_6.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc16_6.2: type = converted %int.make_type_32, %.loc16_6.1 [template = i32] -// CHECK:STDOUT: %Simple.ref: type = name_ref Simple, file.%Simple.decl [template = constants.%.1] +// CHECK:STDOUT: %Simple.ref: type = name_ref Simple, file.%Simple.decl [template = constants.%Simple.type] // CHECK:STDOUT: } // CHECK:STDOUT: %NonInstanceCall.decl: %NonInstanceCall.type = fn_decl @NonInstanceCall [template = constants.%NonInstanceCall] { // CHECK:STDOUT: %n.patt: i32 = binding_pattern n @@ -117,41 +117,41 @@ fn InstanceCallIndirect(p: i32*) { // CHECK:STDOUT: %n: i32 = bind_name n, %n.param // CHECK:STDOUT: } // CHECK:STDOUT: %NonInstanceCallIndirect.decl: %NonInstanceCallIndirect.type = fn_decl @NonInstanceCallIndirect [template = constants.%NonInstanceCallIndirect] { -// CHECK:STDOUT: %p.patt: %.8 = binding_pattern p +// CHECK:STDOUT: %p.patt: %.7 = binding_pattern p // CHECK:STDOUT: } { // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc29_34.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc29_34.2: type = converted %int.make_type_32, %.loc29_34.1 [template = i32] -// CHECK:STDOUT: %.loc29_34.3: type = ptr_type i32 [template = constants.%.8] -// CHECK:STDOUT: %p.param: %.8 = param p, runtime_param0 -// CHECK:STDOUT: %p: %.8 = bind_name p, %p.param +// CHECK:STDOUT: %.loc29_34.3: type = ptr_type i32 [template = constants.%.7] +// CHECK:STDOUT: %p.param: %.7 = param p, runtime_param0 +// CHECK:STDOUT: %p: %.7 = bind_name p, %p.param // CHECK:STDOUT: } // CHECK:STDOUT: %InstanceCallIndirect.decl: %InstanceCallIndirect.type = fn_decl @InstanceCallIndirect [template = constants.%InstanceCallIndirect] { -// CHECK:STDOUT: %p.patt: %.8 = binding_pattern p +// CHECK:STDOUT: %p.patt: %.7 = binding_pattern p // CHECK:STDOUT: } { // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc33_31.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc33_31.2: type = converted %int.make_type_32, %.loc33_31.1 [template = i32] -// CHECK:STDOUT: %.loc33_31.3: type = ptr_type i32 [template = constants.%.8] -// CHECK:STDOUT: %p.param: %.8 = param p, runtime_param0 -// CHECK:STDOUT: %p: %.8 = bind_name p, %p.param +// CHECK:STDOUT: %.loc33_31.3: type = ptr_type i32 [template = constants.%.7] +// CHECK:STDOUT: %p.param: %.7 = param p, runtime_param0 +// CHECK:STDOUT: %p: %.7 = bind_name p, %p.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @Simple { -// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self, 0 [symbolic = constants.%Self] +// CHECK:STDOUT: %Self: %Simple.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self] // CHECK:STDOUT: %F.decl: %F.type.1 = fn_decl @F.1 [template = constants.%F.1] {} {} -// CHECK:STDOUT: %.loc12: %.3 = assoc_entity element0, %F.decl [template = constants.%.4] +// CHECK:STDOUT: %.loc12: %.2 = assoc_entity element0, %F.decl [template = constants.%.3] // CHECK:STDOUT: %G.decl: %G.type.1 = fn_decl @G.1 [template = constants.%G.1] { // CHECK:STDOUT: %self.patt: @G.1.%Self (%Self) = binding_pattern self // CHECK:STDOUT: } { -// CHECK:STDOUT: %Self.ref: %.1 = name_ref Self, @Simple.%Self [symbolic = %Self (constants.%Self)] +// CHECK:STDOUT: %Self.ref: %Simple.type = name_ref Self, @Simple.%Self [symbolic = %Self (constants.%Self)] // CHECK:STDOUT: %.loc13_14.1: type = facet_type_access %Self.ref [symbolic = %Self (constants.%Self)] // CHECK:STDOUT: %.loc13_14.2: type = converted %Self.ref, %.loc13_14.1 [symbolic = %Self (constants.%Self)] // CHECK:STDOUT: %self.param: @G.1.%Self (%Self) = param self, runtime_param0 // CHECK:STDOUT: %self: @G.1.%Self (%Self) = bind_name self, %self.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc13: %.5 = assoc_entity element1, %G.decl [template = constants.%.6] +// CHECK:STDOUT: %.loc13: %.4 = assoc_entity element1, %G.decl [template = constants.%.5] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -171,7 +171,7 @@ fn InstanceCallIndirect(p: i32*) { // CHECK:STDOUT: %self.param: i32 = param self, runtime_param0 // CHECK:STDOUT: %self: i32 = bind_name self, %self.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc16_20: = interface_witness (%F.decl, %G.decl) [template = constants.%.7] +// CHECK:STDOUT: %.loc16_20: = interface_witness (%F.decl, %G.decl) [template = constants.%.6] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %F.decl @@ -179,13 +179,13 @@ fn InstanceCallIndirect(p: i32*) { // CHECK:STDOUT: witness = %.loc16_20 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @F.1(@Simple.%Self: %.1) { +// CHECK:STDOUT: generic fn @F.1(@Simple.%Self: %Simple.type) { // CHECK:STDOUT: // CHECK:STDOUT: fn(); // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @G.1(@Simple.%Self: %.1) { -// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self)] +// CHECK:STDOUT: generic fn @G.1(@Simple.%Self: %Simple.type) { +// CHECK:STDOUT: %Self: %Simple.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self)] // CHECK:STDOUT: // CHECK:STDOUT: fn[%self: @G.1.%Self (%Self)](); // CHECK:STDOUT: } @@ -199,45 +199,45 @@ fn InstanceCallIndirect(p: i32*) { // CHECK:STDOUT: fn @NonInstanceCall(%n: i32) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %n.ref: i32 = name_ref n, %n -// CHECK:STDOUT: %Simple.ref: type = name_ref Simple, file.%Simple.decl [template = constants.%.1] -// CHECK:STDOUT: %F.ref: %.3 = name_ref F, @Simple.%.loc12 [template = constants.%.4] -// CHECK:STDOUT: %.loc22: %F.type.1 = interface_witness_access constants.%.7, element0 [template = constants.%F.2] -// CHECK:STDOUT: %F.call: init %.2 = call %.loc22() +// CHECK:STDOUT: %Simple.ref: type = name_ref Simple, file.%Simple.decl [template = constants.%Simple.type] +// CHECK:STDOUT: %F.ref: %.2 = name_ref F, @Simple.%.loc12 [template = constants.%.3] +// CHECK:STDOUT: %.loc22: %F.type.1 = interface_witness_access constants.%.6, element0 [template = constants.%F.2] +// CHECK:STDOUT: %F.call: init %.1 = call %.loc22() // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @InstanceCall(%n: i32) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %n.ref: i32 = name_ref n, %n -// CHECK:STDOUT: %Simple.ref: type = name_ref Simple, file.%Simple.decl [template = constants.%.1] -// CHECK:STDOUT: %G.ref: %.5 = name_ref G, @Simple.%.loc13 [template = constants.%.6] -// CHECK:STDOUT: %.loc26_4.1: %G.type.1 = interface_witness_access constants.%.7, element1 [template = constants.%G.2] +// CHECK:STDOUT: %Simple.ref: type = name_ref Simple, file.%Simple.decl [template = constants.%Simple.type] +// CHECK:STDOUT: %G.ref: %.4 = name_ref G, @Simple.%.loc13 [template = constants.%.5] +// CHECK:STDOUT: %.loc26_4.1: %G.type.1 = interface_witness_access constants.%.6, element1 [template = constants.%G.2] // CHECK:STDOUT: %.loc26_4.2: = bound_method %n.ref, %.loc26_4.1 -// CHECK:STDOUT: %G.call: init %.2 = call %.loc26_4.2(%n.ref) +// CHECK:STDOUT: %G.call: init %.1 = call %.loc26_4.2(%n.ref) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @NonInstanceCallIndirect(%p: %.8) { +// CHECK:STDOUT: fn @NonInstanceCallIndirect(%p: %.7) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %p.ref: %.8 = name_ref p, %p -// CHECK:STDOUT: %Simple.ref: type = name_ref Simple, file.%Simple.decl [template = constants.%.1] -// CHECK:STDOUT: %F.ref: %.3 = name_ref F, @Simple.%.loc12 [template = constants.%.4] +// CHECK:STDOUT: %p.ref: %.7 = name_ref p, %p +// CHECK:STDOUT: %Simple.ref: type = name_ref Simple, file.%Simple.decl [template = constants.%Simple.type] +// CHECK:STDOUT: %F.ref: %.2 = name_ref F, @Simple.%.loc12 [template = constants.%.3] // CHECK:STDOUT: %.loc30_4.1: ref i32 = deref %p.ref -// CHECK:STDOUT: %.loc30_4.2: %F.type.1 = interface_witness_access constants.%.7, element0 [template = constants.%F.2] -// CHECK:STDOUT: %F.call: init %.2 = call %.loc30_4.2() +// CHECK:STDOUT: %.loc30_4.2: %F.type.1 = interface_witness_access constants.%.6, element0 [template = constants.%F.2] +// CHECK:STDOUT: %F.call: init %.1 = call %.loc30_4.2() // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @InstanceCallIndirect(%p: %.8) { +// CHECK:STDOUT: fn @InstanceCallIndirect(%p: %.7) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %p.ref: %.8 = name_ref p, %p -// CHECK:STDOUT: %Simple.ref: type = name_ref Simple, file.%Simple.decl [template = constants.%.1] -// CHECK:STDOUT: %G.ref: %.5 = name_ref G, @Simple.%.loc13 [template = constants.%.6] +// CHECK:STDOUT: %p.ref: %.7 = name_ref p, %p +// CHECK:STDOUT: %Simple.ref: type = name_ref Simple, file.%Simple.decl [template = constants.%Simple.type] +// CHECK:STDOUT: %G.ref: %.4 = name_ref G, @Simple.%.loc13 [template = constants.%.5] // CHECK:STDOUT: %.loc34_4.1: ref i32 = deref %p.ref -// CHECK:STDOUT: %.loc34_4.2: %G.type.1 = interface_witness_access constants.%.7, element1 [template = constants.%G.2] +// CHECK:STDOUT: %.loc34_4.2: %G.type.1 = interface_witness_access constants.%.6, element1 [template = constants.%G.2] // CHECK:STDOUT: %.loc34_4.3: = bound_method %.loc34_4.1, %.loc34_4.2 // CHECK:STDOUT: %.loc34_4.4: i32 = bind_value %.loc34_4.1 -// CHECK:STDOUT: %G.call: init %.2 = call %.loc34_4.3(%.loc34_4.4) +// CHECK:STDOUT: %G.call: init %.1 = call %.loc34_4.3(%.loc34_4.4) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/impl/declaration.carbon b/toolchain/check/testdata/impl/declaration.carbon index a94f3961972b9..77a48c165d50b 100644 --- a/toolchain/check/testdata/impl/declaration.carbon +++ b/toolchain/check/testdata/impl/declaration.carbon @@ -15,10 +15,10 @@ impl i32 as I; // CHECK:STDOUT: --- declaration.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: type = interface_type @I [template] -// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self, 0 [symbolic] +// CHECK:STDOUT: %I.type: type = interface_type @I [template] +// CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] -// CHECK:STDOUT: %.2: type = tuple_type () [template] +// CHECK:STDOUT: %.1: type = tuple_type () [template] // CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -43,17 +43,17 @@ impl i32 as I; // CHECK:STDOUT: .I = %I.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %I.decl: type = interface_decl @I [template = constants.%.1] {} {} +// CHECK:STDOUT: %I.decl: type = interface_decl @I [template = constants.%I.type] {} {} // CHECK:STDOUT: impl_decl @impl [template] {} { // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc13_6.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc13_6.2: type = converted %int.make_type_32, %.loc13_6.1 [template = i32] -// CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [template = constants.%.1] +// CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [template = constants.%I.type] // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @I { -// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self, 0 [symbolic = constants.%Self] +// CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self diff --git a/toolchain/check/testdata/impl/empty.carbon b/toolchain/check/testdata/impl/empty.carbon index 1028d810d7e11..f7aa54c25af03 100644 --- a/toolchain/check/testdata/impl/empty.carbon +++ b/toolchain/check/testdata/impl/empty.carbon @@ -17,12 +17,12 @@ impl i32 as Empty { // CHECK:STDOUT: --- empty.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: type = interface_type @Empty [template] -// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self, 0 [symbolic] +// CHECK:STDOUT: %Empty.type: type = interface_type @Empty [template] +// CHECK:STDOUT: %Self: %Empty.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] -// CHECK:STDOUT: %.2: type = tuple_type () [template] +// CHECK:STDOUT: %.1: type = tuple_type () [template] // CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] -// CHECK:STDOUT: %.3: = interface_witness () [template] +// CHECK:STDOUT: %.2: = interface_witness () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -46,17 +46,17 @@ impl i32 as Empty { // CHECK:STDOUT: .Empty = %Empty.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %Empty.decl: type = interface_decl @Empty [template = constants.%.1] {} {} +// CHECK:STDOUT: %Empty.decl: type = interface_decl @Empty [template = constants.%Empty.type] {} {} // CHECK:STDOUT: impl_decl @impl [template] {} { // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc14_6.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc14_6.2: type = converted %int.make_type_32, %.loc14_6.1 [template = i32] -// CHECK:STDOUT: %Empty.ref: type = name_ref Empty, file.%Empty.decl [template = constants.%.1] +// CHECK:STDOUT: %Empty.ref: type = name_ref Empty, file.%Empty.decl [template = constants.%Empty.type] // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @Empty { -// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self, 0 [symbolic = constants.%Self] +// CHECK:STDOUT: %Self: %Empty.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -64,7 +64,7 @@ impl i32 as Empty { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl: %.loc14_6.2 as %Empty.ref { -// CHECK:STDOUT: %.loc14_19: = interface_witness () [template = constants.%.3] +// CHECK:STDOUT: %.loc14_19: = interface_witness () [template = constants.%.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: witness = %.loc14_19 diff --git a/toolchain/check/testdata/impl/extend_impl.carbon b/toolchain/check/testdata/impl/extend_impl.carbon index c3b277e43da54..75fbb2f0b5c6a 100644 --- a/toolchain/check/testdata/impl/extend_impl.carbon +++ b/toolchain/check/testdata/impl/extend_impl.carbon @@ -26,22 +26,22 @@ fn G(c: C) { // CHECK:STDOUT: --- extend_impl.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: type = interface_type @HasF [template] -// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self, 0 [symbolic] +// CHECK:STDOUT: %HasF.type: type = interface_type @HasF [template] +// CHECK:STDOUT: %Self: %HasF.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %F.type.1: type = fn_type @F.1 [template] -// CHECK:STDOUT: %.2: type = tuple_type () [template] +// CHECK:STDOUT: %.1: type = tuple_type () [template] // CHECK:STDOUT: %F.1: %F.type.1 = struct_value () [template] -// CHECK:STDOUT: %.3: type = assoc_entity_type %.1, %F.type.1 [template] -// CHECK:STDOUT: %.4: %.3 = assoc_entity element0, @HasF.%F.decl [template] +// CHECK:STDOUT: %.2: type = assoc_entity_type %HasF.type, %F.type.1 [template] +// CHECK:STDOUT: %.3: %.2 = assoc_entity element0, @HasF.%F.decl [template] // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %F.type.2: type = fn_type @F.2 [template] // CHECK:STDOUT: %F.2: %F.type.2 = struct_value () [template] -// CHECK:STDOUT: %.5: = interface_witness (%F.2) [template] -// CHECK:STDOUT: %.6: type = struct_type {} [template] -// CHECK:STDOUT: %.7: = complete_type_witness %.6 [template] +// CHECK:STDOUT: %.4: = interface_witness (%F.2) [template] +// CHECK:STDOUT: %.5: type = struct_type {} [template] +// CHECK:STDOUT: %.6: = complete_type_witness %.5 [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %G: %G.type = struct_value () [template] -// CHECK:STDOUT: %.8: type = ptr_type %.6 [template] +// CHECK:STDOUT: %.7: type = ptr_type %.5 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -65,7 +65,7 @@ fn G(c: C) { // CHECK:STDOUT: .G = %G.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %HasF.decl: type = interface_decl @HasF [template = constants.%.1] {} {} +// CHECK:STDOUT: %HasF.decl: type = interface_decl @HasF [template = constants.%HasF.type] {} {} // CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {} {} // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] { // CHECK:STDOUT: %c.patt: %C = binding_pattern c @@ -77,9 +77,9 @@ fn G(c: C) { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @HasF { -// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self, 0 [symbolic = constants.%Self] +// CHECK:STDOUT: %Self: %HasF.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self] // CHECK:STDOUT: %F.decl: %F.type.1 = fn_decl @F.1 [template = constants.%F.1] {} {} -// CHECK:STDOUT: %.loc12: %.3 = assoc_entity element0, %F.decl [template = constants.%.4] +// CHECK:STDOUT: %.loc12: %.2 = assoc_entity element0, %F.decl [template = constants.%.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -89,7 +89,7 @@ fn G(c: C) { // CHECK:STDOUT: // CHECK:STDOUT: impl @impl: %Self.ref as %HasF.ref { // CHECK:STDOUT: %F.decl: %F.type.2 = fn_decl @F.2 [template = constants.%F.2] {} {} -// CHECK:STDOUT: %.loc16: = interface_witness (%F.decl) [template = constants.%.5] +// CHECK:STDOUT: %.loc16: = interface_witness (%F.decl) [template = constants.%.4] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %F.decl @@ -99,16 +99,16 @@ fn G(c: C) { // CHECK:STDOUT: class @C { // CHECK:STDOUT: impl_decl @impl [template] {} { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%C [template = constants.%C] -// CHECK:STDOUT: %HasF.ref: type = name_ref HasF, file.%HasF.decl [template = constants.%.1] +// CHECK:STDOUT: %HasF.ref: type = name_ref HasF, file.%HasF.decl [template = constants.%HasF.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc19: = complete_type_witness %.6 [template = constants.%.7] +// CHECK:STDOUT: %.loc19: = complete_type_witness %.5 [template = constants.%.6] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C // CHECK:STDOUT: extend name_scope2 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @F.1(@HasF.%Self: %.1) { +// CHECK:STDOUT: generic fn @F.1(@HasF.%Self: %HasF.type) { // CHECK:STDOUT: // CHECK:STDOUT: fn(); // CHECK:STDOUT: } @@ -121,13 +121,13 @@ fn G(c: C) { // CHECK:STDOUT: fn @G(%c: %C) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %C.ref.loc22: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %F.ref.loc22: %.3 = name_ref F, @HasF.%.loc12 [template = constants.%.4] -// CHECK:STDOUT: %.loc22: %F.type.1 = interface_witness_access constants.%.5, element0 [template = constants.%F.2] -// CHECK:STDOUT: %F.call.loc22: init %.2 = call %.loc22() +// CHECK:STDOUT: %F.ref.loc22: %.2 = name_ref F, @HasF.%.loc12 [template = constants.%.3] +// CHECK:STDOUT: %.loc22: %F.type.1 = interface_witness_access constants.%.4, element0 [template = constants.%F.2] +// CHECK:STDOUT: %F.call.loc22: init %.1 = call %.loc22() // CHECK:STDOUT: %c.ref: %C = name_ref c, %c -// CHECK:STDOUT: %F.ref.loc23: %.3 = name_ref F, @HasF.%.loc12 [template = constants.%.4] -// CHECK:STDOUT: %.loc23: %F.type.1 = interface_witness_access constants.%.5, element0 [template = constants.%F.2] -// CHECK:STDOUT: %F.call.loc23: init %.2 = call %.loc23() +// CHECK:STDOUT: %F.ref.loc23: %.2 = name_ref F, @HasF.%.loc12 [template = constants.%.3] +// CHECK:STDOUT: %.loc23: %F.type.1 = interface_witness_access constants.%.4, element0 [template = constants.%F.2] +// CHECK:STDOUT: %F.call.loc23: init %.1 = call %.loc23() // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/impl/fail_call_invalid.carbon b/toolchain/check/testdata/impl/fail_call_invalid.carbon index 12fd0178e8f99..4bbc15983412d 100644 --- a/toolchain/check/testdata/impl/fail_call_invalid.carbon +++ b/toolchain/check/testdata/impl/fail_call_invalid.carbon @@ -26,13 +26,13 @@ fn InstanceCall(n: i32) { // CHECK:STDOUT: --- fail_call_invalid.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: type = interface_type @Simple [template] -// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self, 0 [symbolic] +// CHECK:STDOUT: %Simple.type: type = interface_type @Simple [template] +// CHECK:STDOUT: %Self: %Simple.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %G.type.1: type = fn_type @G.1 [template] -// CHECK:STDOUT: %.2: type = tuple_type () [template] +// CHECK:STDOUT: %.1: type = tuple_type () [template] // CHECK:STDOUT: %G.1: %G.type.1 = struct_value () [template] -// CHECK:STDOUT: %.3: type = assoc_entity_type %.1, %G.type.1 [template] -// CHECK:STDOUT: %.4: %.3 = assoc_entity element0, @Simple.%G.decl [template] +// CHECK:STDOUT: %.2: type = assoc_entity_type %Simple.type, %G.type.1 [template] +// CHECK:STDOUT: %.3: %.2 = assoc_entity element0, @Simple.%G.decl [template] // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %G.type.2: type = fn_type @G.2 [template] @@ -63,12 +63,12 @@ fn InstanceCall(n: i32) { // CHECK:STDOUT: .InstanceCall = %InstanceCall.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %Simple.decl: type = interface_decl @Simple [template = constants.%.1] {} {} +// CHECK:STDOUT: %Simple.decl: type = interface_decl @Simple [template = constants.%Simple.type] {} {} // CHECK:STDOUT: impl_decl @impl [template] {} { // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc15_6.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc15_6.2: type = converted %int.make_type_32, %.loc15_6.1 [template = i32] -// CHECK:STDOUT: %Simple.ref: type = name_ref Simple, file.%Simple.decl [template = constants.%.1] +// CHECK:STDOUT: %Simple.ref: type = name_ref Simple, file.%Simple.decl [template = constants.%Simple.type] // CHECK:STDOUT: } // CHECK:STDOUT: %InstanceCall.decl: %InstanceCall.type = fn_decl @InstanceCall [template = constants.%InstanceCall] { // CHECK:STDOUT: %n.patt: i32 = binding_pattern n @@ -82,17 +82,17 @@ fn InstanceCall(n: i32) { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @Simple { -// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self, 0 [symbolic = constants.%Self] +// CHECK:STDOUT: %Self: %Simple.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self] // CHECK:STDOUT: %G.decl: %G.type.1 = fn_decl @G.1 [template = constants.%G.1] { // CHECK:STDOUT: %self.patt: @G.1.%Self (%Self) = binding_pattern self // CHECK:STDOUT: } { -// CHECK:STDOUT: %Self.ref: %.1 = name_ref Self, @Simple.%Self [symbolic = %Self (constants.%Self)] +// CHECK:STDOUT: %Self.ref: %Simple.type = name_ref Self, @Simple.%Self [symbolic = %Self (constants.%Self)] // CHECK:STDOUT: %.loc12_14.1: type = facet_type_access %Self.ref [symbolic = %Self (constants.%Self)] // CHECK:STDOUT: %.loc12_14.2: type = converted %Self.ref, %.loc12_14.1 [symbolic = %Self (constants.%Self)] // CHECK:STDOUT: %self.param: @G.1.%Self (%Self) = param self, runtime_param0 // CHECK:STDOUT: %self: @G.1.%Self (%Self) = bind_name self, %self.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc12: %.3 = assoc_entity element0, %G.decl [template = constants.%.4] +// CHECK:STDOUT: %.loc12: %.2 = assoc_entity element0, %G.decl [template = constants.%.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -115,8 +115,8 @@ fn InstanceCall(n: i32) { // CHECK:STDOUT: witness = %.loc15_20 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @G.1(@Simple.%Self: %.1) { -// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self)] +// CHECK:STDOUT: generic fn @G.1(@Simple.%Self: %Simple.type) { +// CHECK:STDOUT: %Self: %Simple.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self)] // CHECK:STDOUT: // CHECK:STDOUT: fn[%self: @G.1.%Self (%Self)](); // CHECK:STDOUT: } @@ -128,8 +128,8 @@ fn InstanceCall(n: i32) { // CHECK:STDOUT: fn @InstanceCall(%n: i32) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %n.ref: i32 = name_ref n, %n -// CHECK:STDOUT: %Simple.ref: type = name_ref Simple, file.%Simple.decl [template = constants.%.1] -// CHECK:STDOUT: %G.ref: %.3 = name_ref G, @Simple.%.loc12 [template = constants.%.4] +// CHECK:STDOUT: %Simple.ref: type = name_ref Simple, file.%Simple.decl [template = constants.%Simple.type] +// CHECK:STDOUT: %G.ref: %.2 = name_ref G, @Simple.%.loc12 [template = constants.%.3] // CHECK:STDOUT: %.loc23_4.1: %G.type.1 = interface_witness_access , element0 [template = ] // CHECK:STDOUT: %.loc23_4.2: = bound_method %n.ref, %.loc23_4.1 // CHECK:STDOUT: return diff --git a/toolchain/check/testdata/impl/fail_extend_impl_forall.carbon b/toolchain/check/testdata/impl/fail_extend_impl_forall.carbon index cba099ea2dcc1..105f7161884e3 100644 --- a/toolchain/check/testdata/impl/fail_extend_impl_forall.carbon +++ b/toolchain/check/testdata/impl/fail_extend_impl_forall.carbon @@ -25,21 +25,21 @@ class C { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] -// CHECK:STDOUT: %GenericInterface.type: type = generic_interface_type @GenericInterface [template] +// CHECK:STDOUT: %GenericInterface.type.1: type = generic_interface_type @GenericInterface [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %GenericInterface: %GenericInterface.type = struct_value () [template] -// CHECK:STDOUT: %.2: type = interface_type @GenericInterface, @GenericInterface(%T) [symbolic] -// CHECK:STDOUT: %Self: %.2 = bind_symbolic_name Self, 1 [symbolic] +// CHECK:STDOUT: %GenericInterface: %GenericInterface.type.1 = struct_value () [template] +// CHECK:STDOUT: %GenericInterface.type.2: type = interface_type @GenericInterface, @GenericInterface(%T) [symbolic] +// CHECK:STDOUT: %Self: %GenericInterface.type.2 = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: %F.type.1: type = fn_type @F.1, @GenericInterface(%T) [symbolic] // CHECK:STDOUT: %F.1: %F.type.1 = struct_value () [symbolic] -// CHECK:STDOUT: %.3: type = assoc_entity_type %.2, %F.type.1 [symbolic] -// CHECK:STDOUT: %.4: %.3 = assoc_entity element0, @GenericInterface.%F.decl [symbolic] +// CHECK:STDOUT: %.2: type = assoc_entity_type %GenericInterface.type.2, %F.type.1 [symbolic] +// CHECK:STDOUT: %.3: %.2 = assoc_entity element0, @GenericInterface.%F.decl [symbolic] // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %F.type.2: type = fn_type @F.2 [template] // CHECK:STDOUT: %F.2: %F.type.2 = struct_value () [template] -// CHECK:STDOUT: %.5: = interface_witness (%F.2) [template] -// CHECK:STDOUT: %.6: type = struct_type {} [template] -// CHECK:STDOUT: %.7: = complete_type_witness %.6 [template] +// CHECK:STDOUT: %.4: = interface_witness (%F.2) [template] +// CHECK:STDOUT: %.5: type = struct_type {} [template] +// CHECK:STDOUT: %.6: = complete_type_witness %.5 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -62,7 +62,7 @@ class C { // CHECK:STDOUT: .C = %C.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %GenericInterface.decl: %GenericInterface.type = interface_decl @GenericInterface [template = constants.%GenericInterface] { +// CHECK:STDOUT: %GenericInterface.decl: %GenericInterface.type.1 = interface_decl @GenericInterface [template = constants.%GenericInterface] { // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 // CHECK:STDOUT: } { // CHECK:STDOUT: %T.param: type = param T, runtime_param @@ -75,15 +75,15 @@ class C { // CHECK:STDOUT: %T.1: type = bind_symbolic_name T, 0 [symbolic = %T.1 (constants.%T)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.1: type = interface_type @GenericInterface, @GenericInterface(%T.1) [symbolic = %.1 (constants.%.2)] -// CHECK:STDOUT: %Self.2: %.2 = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self)] +// CHECK:STDOUT: %GenericInterface.type: type = interface_type @GenericInterface, @GenericInterface(%T.1) [symbolic = %GenericInterface.type (constants.%GenericInterface.type.2)] +// CHECK:STDOUT: %Self.2: %GenericInterface.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self)] // CHECK:STDOUT: %F.type: type = fn_type @F.1, @GenericInterface(%T.1) [symbolic = %F.type (constants.%F.type.1)] // CHECK:STDOUT: %F: @GenericInterface.%F.type (%F.type.1) = struct_value () [symbolic = %F (constants.%F.1)] -// CHECK:STDOUT: %.2: type = assoc_entity_type @GenericInterface.%.1 (%.2), @GenericInterface.%F.type (%F.type.1) [symbolic = %.2 (constants.%.3)] -// CHECK:STDOUT: %.3: @GenericInterface.%.2 (%.3) = assoc_entity element0, %F.decl [symbolic = %.3 (constants.%.4)] +// CHECK:STDOUT: %.1: type = assoc_entity_type @GenericInterface.%GenericInterface.type (%GenericInterface.type.2), @GenericInterface.%F.type (%F.type.1) [symbolic = %.1 (constants.%.2)] +// CHECK:STDOUT: %.2: @GenericInterface.%.1 (%.2) = assoc_entity element0, %F.decl [symbolic = %.2 (constants.%.3)] // CHECK:STDOUT: // CHECK:STDOUT: interface { -// CHECK:STDOUT: %Self.1: @GenericInterface.%.1 (%.2) = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self)] +// CHECK:STDOUT: %Self.1: @GenericInterface.%GenericInterface.type (%GenericInterface.type.2) = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self)] // CHECK:STDOUT: %F.decl: @GenericInterface.%F.type (%F.type.1) = fn_decl @F.1 [symbolic = @GenericInterface.%F (constants.%F.1)] { // CHECK:STDOUT: %x.patt: @F.1.%T (%T) = binding_pattern x // CHECK:STDOUT: } { @@ -91,7 +91,7 @@ class C { // CHECK:STDOUT: %x.param: @F.1.%T (%T) = param x, runtime_param0 // CHECK:STDOUT: %x: @F.1.%T (%T) = bind_name x, %x.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc12: @GenericInterface.%.2 (%.3) = assoc_entity element0, %F.decl [symbolic = %.3 (constants.%.4)] +// CHECK:STDOUT: %.loc12: @GenericInterface.%.1 (%.2) = assoc_entity element0, %F.decl [symbolic = %.2 (constants.%.3)] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self.1 @@ -102,9 +102,9 @@ class C { // CHECK:STDOUT: // CHECK:STDOUT: generic impl @impl(%T.loc19: type) { // CHECK:STDOUT: %T.1: type = bind_symbolic_name T, 0 [symbolic = %T.1 (constants.%T)] -// CHECK:STDOUT: %.1: type = interface_type @GenericInterface, @GenericInterface(%T.1) [symbolic = %.1 (constants.%.2)] +// CHECK:STDOUT: %GenericInterface.type.1: type = interface_type @GenericInterface, @GenericInterface(%T.1) [symbolic = %GenericInterface.type.1 (constants.%GenericInterface.type.2)] // CHECK:STDOUT: -// CHECK:STDOUT: impl: %Self.ref as %.loc19_52 { +// CHECK:STDOUT: impl: %Self.ref as %GenericInterface.type.loc19 { // CHECK:STDOUT: %F.decl: %F.type.2 = fn_decl @F.2 [template = constants.%F.2] { // CHECK:STDOUT: %x.patt: @F.2.%T (%T) = binding_pattern x // CHECK:STDOUT: } { @@ -112,11 +112,11 @@ class C { // CHECK:STDOUT: %x.param: @F.2.%T (%T) = param x, runtime_param0 // CHECK:STDOUT: %x: @F.2.%T (%T) = bind_name x, %x.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc19_56: = interface_witness (%F.decl) [template = constants.%.5] +// CHECK:STDOUT: %.loc19: = interface_witness (%F.decl) [template = constants.%.4] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %F.decl -// CHECK:STDOUT: witness = %.loc19_56 +// CHECK:STDOUT: witness = %.loc19 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -127,18 +127,18 @@ class C { // CHECK:STDOUT: %T.param: type = param T, runtime_param // CHECK:STDOUT: %T.loc19: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.1 (constants.%T)] // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%C [template = constants.%C] -// CHECK:STDOUT: %GenericInterface.ref: %GenericInterface.type = name_ref GenericInterface, file.%GenericInterface.decl [template = constants.%GenericInterface] +// CHECK:STDOUT: %GenericInterface.ref: %GenericInterface.type.1 = name_ref GenericInterface, file.%GenericInterface.decl [template = constants.%GenericInterface] // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc19 [symbolic = %T.1 (constants.%T)] -// CHECK:STDOUT: %.loc19_52: type = interface_type @GenericInterface, @GenericInterface(constants.%T) [symbolic = %.1 (constants.%.2)] +// CHECK:STDOUT: %GenericInterface.type.loc19: type = interface_type @GenericInterface, @GenericInterface(constants.%T) [symbolic = %GenericInterface.type.1 (constants.%GenericInterface.type.2)] // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc22: = complete_type_witness %.6 [template = constants.%.7] +// CHECK:STDOUT: %.loc22: = complete_type_witness %.5 [template = constants.%.6] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C // CHECK:STDOUT: has_error // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @F.1(@GenericInterface.%T.loc11: type, @GenericInterface.%Self.1: @GenericInterface.%.1 (%.2)) { +// CHECK:STDOUT: generic fn @F.1(@GenericInterface.%T.loc11: type, @GenericInterface.%Self.1: @GenericInterface.%GenericInterface.type (%GenericInterface.type.2)) { // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T)] // CHECK:STDOUT: // CHECK:STDOUT: fn(%x: @F.1.%T (%T)); @@ -159,12 +159,12 @@ class C { // CHECK:STDOUT: %T.1 => constants.%T // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.1 => constants.%.2 +// CHECK:STDOUT: %GenericInterface.type => constants.%GenericInterface.type.2 // CHECK:STDOUT: %Self.2 => constants.%Self // CHECK:STDOUT: %F.type => constants.%F.type.1 // CHECK:STDOUT: %F => constants.%F.1 +// CHECK:STDOUT: %.1 => constants.%.2 // CHECK:STDOUT: %.2 => constants.%.3 -// CHECK:STDOUT: %.3 => constants.%.4 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F.1(constants.%T, constants.%Self) { @@ -181,7 +181,7 @@ class C { // CHECK:STDOUT: // CHECK:STDOUT: specific @impl(constants.%T) { // CHECK:STDOUT: %T.1 => constants.%T -// CHECK:STDOUT: %.1 => constants.%.2 +// CHECK:STDOUT: %GenericInterface.type.1 => constants.%GenericInterface.type.2 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F.2(constants.%T) { diff --git a/toolchain/check/testdata/impl/fail_extend_impl_scope.carbon b/toolchain/check/testdata/impl/fail_extend_impl_scope.carbon index 93d382cdd736c..23845081ad24d 100644 --- a/toolchain/check/testdata/impl/fail_extend_impl_scope.carbon +++ b/toolchain/check/testdata/impl/fail_extend_impl_scope.carbon @@ -18,12 +18,12 @@ extend impl i32 as I {} // CHECK:STDOUT: --- fail_extend_impl_scope.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: type = interface_type @I [template] -// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self, 0 [symbolic] +// CHECK:STDOUT: %I.type: type = interface_type @I [template] +// CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] -// CHECK:STDOUT: %.2: type = tuple_type () [template] +// CHECK:STDOUT: %.1: type = tuple_type () [template] // CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] -// CHECK:STDOUT: %.3: = interface_witness () [template] +// CHECK:STDOUT: %.2: = interface_witness () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -47,17 +47,17 @@ extend impl i32 as I {} // CHECK:STDOUT: .I = %I.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %I.decl: type = interface_decl @I [template = constants.%.1] {} {} +// CHECK:STDOUT: %I.decl: type = interface_decl @I [template = constants.%I.type] {} {} // CHECK:STDOUT: impl_decl @impl [template] {} { // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc16_13.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc16_13.2: type = converted %int.make_type_32, %.loc16_13.1 [template = i32] -// CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [template = constants.%.1] +// CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [template = constants.%I.type] // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @I { -// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self, 0 [symbolic = constants.%Self] +// CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -65,7 +65,7 @@ extend impl i32 as I {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl: %.loc16_13.2 as %I.ref { -// CHECK:STDOUT: %.loc16_22: = interface_witness () [template = constants.%.3] +// CHECK:STDOUT: %.loc16_22: = interface_witness () [template = constants.%.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: witness = %.loc16_22 diff --git a/toolchain/check/testdata/impl/fail_extend_impl_type_as.carbon b/toolchain/check/testdata/impl/fail_extend_impl_type_as.carbon index 8a2b11908d01b..9f594ba0c4fe8 100644 --- a/toolchain/check/testdata/impl/fail_extend_impl_type_as.carbon +++ b/toolchain/check/testdata/impl/fail_extend_impl_type_as.carbon @@ -42,15 +42,15 @@ class E { // CHECK:STDOUT: --- fail_extend_impl_type_as.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: type = interface_type @I [template] -// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self, 0 [symbolic] +// CHECK:STDOUT: %I.type: type = interface_type @I [template] +// CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] -// CHECK:STDOUT: %.2: type = tuple_type () [template] +// CHECK:STDOUT: %.1: type = tuple_type () [template] // CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] -// CHECK:STDOUT: %.3: = interface_witness () [template] -// CHECK:STDOUT: %.4: type = struct_type {} [template] -// CHECK:STDOUT: %.5: = complete_type_witness %.4 [template] +// CHECK:STDOUT: %.2: = interface_witness () [template] +// CHECK:STDOUT: %.3: type = struct_type {} [template] +// CHECK:STDOUT: %.4: = complete_type_witness %.3 [template] // CHECK:STDOUT: %D: type = class_type @D [template] // CHECK:STDOUT: %E: type = class_type @E [template] // CHECK:STDOUT: } @@ -79,14 +79,14 @@ class E { // CHECK:STDOUT: .E = %E.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %I.decl: type = interface_decl @I [template = constants.%.1] {} {} +// CHECK:STDOUT: %I.decl: type = interface_decl @I [template = constants.%I.type] {} {} // CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {} {} // CHECK:STDOUT: %D.decl: type = class_decl @D [template = constants.%D] {} {} // CHECK:STDOUT: %E.decl: type = class_decl @E [template = constants.%E] {} {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @I { -// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self, 0 [symbolic = constants.%Self] +// CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -94,7 +94,7 @@ class E { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.1: %.loc18_15.2 as %I.ref { -// CHECK:STDOUT: %.loc18_24: = interface_witness () [template = constants.%.3] +// CHECK:STDOUT: %.loc18_24: = interface_witness () [template = constants.%.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: witness = %.loc18_24 @@ -103,7 +103,7 @@ class E { // CHECK:STDOUT: impl @impl.2: %D.ref as %I.ref; // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.3: %Self.ref as %I.ref { -// CHECK:STDOUT: %.loc39: = interface_witness () [template = constants.%.3] +// CHECK:STDOUT: %.loc39: = interface_witness () [template = constants.%.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: witness = %.loc39 @@ -114,9 +114,9 @@ class E { // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc18_15.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc18_15.2: type = converted %int.make_type_32, %.loc18_15.1 [template = i32] -// CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [template = constants.%.1] +// CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [template = constants.%I.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc19: = complete_type_witness %.4 [template = constants.%.5] +// CHECK:STDOUT: %.loc19: = complete_type_witness %.3 [template = constants.%.4] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C @@ -126,9 +126,9 @@ class E { // CHECK:STDOUT: class @D { // CHECK:STDOUT: impl_decl @impl.2 [template] {} { // CHECK:STDOUT: %D.ref: type = name_ref D, file.%D.decl [template = constants.%D] -// CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [template = constants.%.1] +// CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [template = constants.%I.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc30: = complete_type_witness %.4 [template = constants.%.5] +// CHECK:STDOUT: %.loc30: = complete_type_witness %.3 [template = constants.%.4] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%D @@ -138,9 +138,9 @@ class E { // CHECK:STDOUT: class @E { // CHECK:STDOUT: impl_decl @impl.3 [template] {} { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%E [template = constants.%E] -// CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [template = constants.%.1] +// CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [template = constants.%I.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc40: = complete_type_witness %.4 [template = constants.%.5] +// CHECK:STDOUT: %.loc40: = complete_type_witness %.3 [template = constants.%.4] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%E diff --git a/toolchain/check/testdata/impl/fail_extend_partially_defined_interface.carbon b/toolchain/check/testdata/impl/fail_extend_partially_defined_interface.carbon index 43a56c27fecbd..d201f5b4284bc 100644 --- a/toolchain/check/testdata/impl/fail_extend_partially_defined_interface.carbon +++ b/toolchain/check/testdata/impl/fail_extend_partially_defined_interface.carbon @@ -23,12 +23,12 @@ interface I { // CHECK:STDOUT: --- fail_extend_partially_defined_interface.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: type = interface_type @I [template] -// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self, 0 [symbolic] +// CHECK:STDOUT: %I.type: type = interface_type @I [template] +// CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %C.1: type = class_type @C [template] // CHECK:STDOUT: %C.2: type = class_type @C, @C(%Self) [symbolic] -// CHECK:STDOUT: %.2: type = struct_type {} [template] -// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] +// CHECK:STDOUT: %.1: type = struct_type {} [template] +// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -50,11 +50,11 @@ interface I { // CHECK:STDOUT: .I = %I.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %I.decl: type = interface_decl @I [template = constants.%.1] {} {} +// CHECK:STDOUT: %I.decl: type = interface_decl @I [template = constants.%I.type] {} {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @I { -// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self, 0 [symbolic = constants.%Self] +// CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self] // CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C.1] {} {} // CHECK:STDOUT: // CHECK:STDOUT: !members: @@ -63,22 +63,22 @@ interface I { // CHECK:STDOUT: witness = () // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic impl @impl(@I.%Self: %.1) { -// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self)] +// CHECK:STDOUT: generic impl @impl(@I.%Self: %I.type) { +// CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self)] // CHECK:STDOUT: %C: type = class_type @C, @C(%Self) [symbolic = %C (constants.%C.2)] // CHECK:STDOUT: // CHECK:STDOUT: impl: %Self.ref as %I.ref; // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic class @C(@I.%Self: %.1) { +// CHECK:STDOUT: generic class @C(@I.%Self: %I.type) { // CHECK:STDOUT: !definition: // CHECK:STDOUT: // CHECK:STDOUT: class { // CHECK:STDOUT: impl_decl @impl [template] {} { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%C.2 [symbolic = %C (constants.%C.2)] -// CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [template = constants.%.1] +// CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [template = constants.%I.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc20: = complete_type_witness %.2 [template = constants.%.3] +// CHECK:STDOUT: %.loc20: = complete_type_witness %.1 [template = constants.%.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C.2 diff --git a/toolchain/check/testdata/impl/fail_extend_undefined_interface.carbon b/toolchain/check/testdata/impl/fail_extend_undefined_interface.carbon index 28022aa5f1b11..4ecf0e45246b3 100644 --- a/toolchain/check/testdata/impl/fail_extend_undefined_interface.carbon +++ b/toolchain/check/testdata/impl/fail_extend_undefined_interface.carbon @@ -23,10 +23,10 @@ class C { // CHECK:STDOUT: --- fail_extend_undefined_interface.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: type = interface_type @I [template] +// CHECK:STDOUT: %I.type: type = interface_type @I [template] // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.2: type = struct_type {} [template] -// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] +// CHECK:STDOUT: %.1: type = struct_type {} [template] +// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -49,7 +49,7 @@ class C { // CHECK:STDOUT: .C = %C.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %I.decl: type = interface_decl @I [template = constants.%.1] {} {} +// CHECK:STDOUT: %I.decl: type = interface_decl @I [template = constants.%I.type] {} {} // CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {} {} // CHECK:STDOUT: } // CHECK:STDOUT: @@ -60,9 +60,9 @@ class C { // CHECK:STDOUT: class @C { // CHECK:STDOUT: impl_decl @impl [template] {} { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%C [template = constants.%C] -// CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [template = constants.%.1] +// CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [template = constants.%I.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc21: = complete_type_witness %.2 [template = constants.%.3] +// CHECK:STDOUT: %.loc21: = complete_type_witness %.1 [template = constants.%.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C diff --git a/toolchain/check/testdata/impl/fail_impl_as_scope.carbon b/toolchain/check/testdata/impl/fail_impl_as_scope.carbon index 5cde9a50c1c61..fe50528970924 100644 --- a/toolchain/check/testdata/impl/fail_impl_as_scope.carbon +++ b/toolchain/check/testdata/impl/fail_impl_as_scope.carbon @@ -22,16 +22,16 @@ impl as Simple { // CHECK:STDOUT: --- fail_impl_as_scope.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: type = interface_type @Simple [template] -// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self, 0 [symbolic] +// CHECK:STDOUT: %Simple.type: type = interface_type @Simple [template] +// CHECK:STDOUT: %Self: %Simple.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %F.type.1: type = fn_type @F.1 [template] -// CHECK:STDOUT: %.2: type = tuple_type () [template] +// CHECK:STDOUT: %.1: type = tuple_type () [template] // CHECK:STDOUT: %F.1: %F.type.1 = struct_value () [template] -// CHECK:STDOUT: %.3: type = assoc_entity_type %.1, %F.type.1 [template] -// CHECK:STDOUT: %.4: %.3 = assoc_entity element0, @Simple.%F.decl [template] +// CHECK:STDOUT: %.2: type = assoc_entity_type %Simple.type, %F.type.1 [template] +// CHECK:STDOUT: %.3: %.2 = assoc_entity element0, @Simple.%F.decl [template] // CHECK:STDOUT: %F.type.2: type = fn_type @F.2 [template] // CHECK:STDOUT: %F.2: %F.type.2 = struct_value () [template] -// CHECK:STDOUT: %.5: = interface_witness (%F.2) [template] +// CHECK:STDOUT: %.4: = interface_witness (%F.2) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -53,17 +53,17 @@ impl as Simple { // CHECK:STDOUT: .Simple = %Simple.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %Simple.decl: type = interface_decl @Simple [template = constants.%.1] {} {} +// CHECK:STDOUT: %Simple.decl: type = interface_decl @Simple [template = constants.%Simple.type] {} {} // CHECK:STDOUT: impl_decl @impl [template] {} { // CHECK:STDOUT: %Self.ref: type = name_ref Self, [template = ] -// CHECK:STDOUT: %Simple.ref: type = name_ref Simple, file.%Simple.decl [template = constants.%.1] +// CHECK:STDOUT: %Simple.ref: type = name_ref Simple, file.%Simple.decl [template = constants.%Simple.type] // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @Simple { -// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self, 0 [symbolic = constants.%Self] +// CHECK:STDOUT: %Self: %Simple.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self] // CHECK:STDOUT: %F.decl: %F.type.1 = fn_decl @F.1 [template = constants.%F.1] {} {} -// CHECK:STDOUT: %.loc12: %.3 = assoc_entity element0, %F.decl [template = constants.%.4] +// CHECK:STDOUT: %.loc12: %.2 = assoc_entity element0, %F.decl [template = constants.%.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -73,14 +73,14 @@ impl as Simple { // CHECK:STDOUT: // CHECK:STDOUT: impl @impl: %Self.ref as %Simple.ref { // CHECK:STDOUT: %F.decl: %F.type.2 = fn_decl @F.2 [template = constants.%F.2] {} {} -// CHECK:STDOUT: %.loc18: = interface_witness (%F.decl) [template = constants.%.5] +// CHECK:STDOUT: %.loc18: = interface_witness (%F.decl) [template = constants.%.4] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: witness = %.loc18 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @F.1(@Simple.%Self: %.1) { +// CHECK:STDOUT: generic fn @F.1(@Simple.%Self: %Simple.type) { // CHECK:STDOUT: // CHECK:STDOUT: fn(); // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/impl/fail_impl_bad_assoc_const.carbon b/toolchain/check/testdata/impl/fail_impl_bad_assoc_const.carbon index 9e1c11c7ebda4..c781834abe700 100644 --- a/toolchain/check/testdata/impl/fail_impl_bad_assoc_const.carbon +++ b/toolchain/check/testdata/impl/fail_impl_bad_assoc_const.carbon @@ -18,12 +18,12 @@ impl bool as I {} // CHECK:STDOUT: --- fail_impl_bad_assoc_const.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: type = interface_type @I [template] -// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self, 0 [symbolic] -// CHECK:STDOUT: %.2: type = assoc_entity_type %.1, type [template] -// CHECK:STDOUT: %.3: %.2 = assoc_entity element0, @I.%T [template] +// CHECK:STDOUT: %I.type: type = interface_type @I [template] +// CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic] +// CHECK:STDOUT: %.1: type = assoc_entity_type %I.type, type [template] +// CHECK:STDOUT: %.2: %.1 = assoc_entity element0, @I.%T [template] // CHECK:STDOUT: %Bool.type: type = fn_type @Bool [template] -// CHECK:STDOUT: %.4: type = tuple_type () [template] +// CHECK:STDOUT: %.3: type = tuple_type () [template] // CHECK:STDOUT: %Bool: %Bool.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -48,19 +48,19 @@ impl bool as I {} // CHECK:STDOUT: .I = %I.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %I.decl: type = interface_decl @I [template = constants.%.1] {} {} +// CHECK:STDOUT: %I.decl: type = interface_decl @I [template = constants.%I.type] {} {} // CHECK:STDOUT: impl_decl @impl [template] {} { // CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc16_6.1: type = value_of_initializer %bool.make_type [template = bool] // CHECK:STDOUT: %.loc16_6.2: type = converted %bool.make_type, %.loc16_6.1 [template = bool] -// CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [template = constants.%.1] +// CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [template = constants.%I.type] // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @I { -// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self, 0 [symbolic = constants.%Self] +// CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self] // CHECK:STDOUT: %T: type = assoc_const_decl T [template] -// CHECK:STDOUT: %.loc11: %.2 = assoc_entity element0, %T [template = constants.%.3] +// CHECK:STDOUT: %.loc11: %.1 = assoc_entity element0, %T [template = constants.%.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self diff --git a/toolchain/check/testdata/impl/fail_impl_bad_assoc_fn.carbon b/toolchain/check/testdata/impl/fail_impl_bad_assoc_fn.carbon index 27f7b728ae8c7..181436413f97c 100644 --- a/toolchain/check/testdata/impl/fail_impl_bad_assoc_fn.carbon +++ b/toolchain/check/testdata/impl/fail_impl_bad_assoc_fn.carbon @@ -216,16 +216,16 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: --- fail_impl_bad_assoc_fn.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: type = interface_type @I [template] -// CHECK:STDOUT: %Self.1: %.1 = bind_symbolic_name Self, 0 [symbolic] +// CHECK:STDOUT: %I.type: type = interface_type @I [template] +// CHECK:STDOUT: %Self.1: %I.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %F.type.1: type = fn_type @F.1 [template] -// CHECK:STDOUT: %.2: type = tuple_type () [template] +// CHECK:STDOUT: %.1: type = tuple_type () [template] // CHECK:STDOUT: %F.1: %F.type.1 = struct_value () [template] -// CHECK:STDOUT: %.3: type = assoc_entity_type %.1, %F.type.1 [template] -// CHECK:STDOUT: %.4: %.3 = assoc_entity element0, @I.%F.decl [template] +// CHECK:STDOUT: %.2: type = assoc_entity_type %I.type, %F.type.1 [template] +// CHECK:STDOUT: %.3: %.2 = assoc_entity element0, @I.%F.decl [template] // CHECK:STDOUT: %NoF: type = class_type @NoF [template] -// CHECK:STDOUT: %.5: type = struct_type {} [template] -// CHECK:STDOUT: %.6: = complete_type_witness %.5 [template] +// CHECK:STDOUT: %.4: type = struct_type {} [template] +// CHECK:STDOUT: %.5: = complete_type_witness %.4 [template] // CHECK:STDOUT: %FNotFunction: type = class_type @FNotFunction [template] // CHECK:STDOUT: %F.2: type = class_type @F.16 [template] // CHECK:STDOUT: %PossiblyF.type: type = fn_type @PossiblyF [template] @@ -242,12 +242,12 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: %FExtraReturnType: type = class_type @FExtraReturnType [template] // CHECK:STDOUT: %F.type.4: type = fn_type @F.4 [template] // CHECK:STDOUT: %F.5: %F.type.4 = struct_value () [template] -// CHECK:STDOUT: %.7: type = interface_type @J [template] -// CHECK:STDOUT: %Self.2: %.7 = bind_symbolic_name Self, 0 [symbolic] +// CHECK:STDOUT: %J.type: type = interface_type @J [template] +// CHECK:STDOUT: %Self.2: %J.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %F.type.5: type = fn_type @F.5 [template] // CHECK:STDOUT: %F.6: %F.type.5 = struct_value () [template] -// CHECK:STDOUT: %.8: type = assoc_entity_type %.7, %F.type.5 [template] -// CHECK:STDOUT: %.9: %.8 = assoc_entity element0, @J.%F.decl [template] +// CHECK:STDOUT: %.6: type = assoc_entity_type %J.type, %F.type.5 [template] +// CHECK:STDOUT: %.7: %.6 = assoc_entity element0, @J.%F.decl [template] // CHECK:STDOUT: %FMissingParam: type = class_type @FMissingParam [template] // CHECK:STDOUT: %F.type.6: type = fn_type @F.6 [template] // CHECK:STDOUT: %F.7: %F.type.6 = struct_value () [template] @@ -269,36 +269,36 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: %FDifferentParamName: type = class_type @FDifferentParamName [template] // CHECK:STDOUT: %F.type.12: type = fn_type @F.12 [template] // CHECK:STDOUT: %F.13: %F.type.12 = struct_value () [template] -// CHECK:STDOUT: %.10: type = interface_type @SelfNested [template] -// CHECK:STDOUT: %Self.3: %.10 = bind_symbolic_name Self, 0 [symbolic] -// CHECK:STDOUT: %.11: type = ptr_type %Self.3 [symbolic] +// CHECK:STDOUT: %SelfNested.type: type = interface_type @SelfNested [template] +// CHECK:STDOUT: %Self.3: %SelfNested.type = bind_symbolic_name Self, 0 [symbolic] +// CHECK:STDOUT: %.8: type = ptr_type %Self.3 [symbolic] // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] -// CHECK:STDOUT: %.12: type = struct_type {.x: %Self.3, .y: i32} [symbolic] -// CHECK:STDOUT: %.13: type = tuple_type (type, type) [template] -// CHECK:STDOUT: %.14: type = tuple_type (%.11, %.12) [symbolic] -// CHECK:STDOUT: %.15: i32 = int_literal 4 [template] -// CHECK:STDOUT: %.16: type = array_type %.15, %Self.3 [symbolic] +// CHECK:STDOUT: %.9: type = struct_type {.x: %Self.3, .y: i32} [symbolic] +// CHECK:STDOUT: %.10: type = tuple_type (type, type) [template] +// CHECK:STDOUT: %.11: type = tuple_type (%.8, %.9) [symbolic] +// CHECK:STDOUT: %.12: i32 = int_literal 4 [template] +// CHECK:STDOUT: %.13: type = array_type %.12, %Self.3 [symbolic] // CHECK:STDOUT: %F.type.13: type = fn_type @F.13 [template] // CHECK:STDOUT: %F.14: %F.type.13 = struct_value () [template] -// CHECK:STDOUT: %.17: type = assoc_entity_type %.10, %F.type.13 [template] -// CHECK:STDOUT: %.18: %.17 = assoc_entity element0, @SelfNested.%F.decl [template] +// CHECK:STDOUT: %.14: type = assoc_entity_type %SelfNested.type, %F.type.13 [template] +// CHECK:STDOUT: %.15: %.14 = assoc_entity element0, @SelfNested.%F.decl [template] // CHECK:STDOUT: %SelfNestedBadParam: type = class_type @SelfNestedBadParam [template] -// CHECK:STDOUT: %.19: type = ptr_type %SelfNestedBadParam [template] -// CHECK:STDOUT: %.20: type = struct_type {.x: i32, .y: i32} [template] -// CHECK:STDOUT: %.21: type = tuple_type (%.19, %.20) [template] -// CHECK:STDOUT: %.22: type = array_type %.15, %SelfNestedBadParam [template] +// CHECK:STDOUT: %.16: type = ptr_type %SelfNestedBadParam [template] +// CHECK:STDOUT: %.17: type = struct_type {.x: i32, .y: i32} [template] +// CHECK:STDOUT: %.18: type = tuple_type (%.16, %.17) [template] +// CHECK:STDOUT: %.19: type = array_type %.12, %SelfNestedBadParam [template] // CHECK:STDOUT: %F.type.14: type = fn_type @F.14 [template] // CHECK:STDOUT: %F.15: %F.type.14 = struct_value () [template] -// CHECK:STDOUT: %.23: type = struct_type {.x: %SelfNestedBadParam, .y: i32} [template] -// CHECK:STDOUT: %.24: type = tuple_type (%.19, %.23) [template] +// CHECK:STDOUT: %.20: type = struct_type {.x: %SelfNestedBadParam, .y: i32} [template] +// CHECK:STDOUT: %.21: type = tuple_type (%.16, %.20) [template] // CHECK:STDOUT: %SelfNestedBadReturnType: type = class_type @SelfNestedBadReturnType [template] -// CHECK:STDOUT: %.25: type = ptr_type %SelfNestedBadReturnType [template] -// CHECK:STDOUT: %.26: type = struct_type {.x: %SelfNestedBadReturnType, .y: i32} [template] -// CHECK:STDOUT: %.27: type = tuple_type (%.25, %.26) [template] +// CHECK:STDOUT: %.22: type = ptr_type %SelfNestedBadReturnType [template] +// CHECK:STDOUT: %.23: type = struct_type {.x: %SelfNestedBadReturnType, .y: i32} [template] +// CHECK:STDOUT: %.24: type = tuple_type (%.22, %.23) [template] // CHECK:STDOUT: %F.type.15: type = fn_type @F.15 [template] // CHECK:STDOUT: %F.16: %F.type.15 = struct_value () [template] -// CHECK:STDOUT: %.28: type = array_type %.15, %SelfNestedBadReturnType [template] +// CHECK:STDOUT: %.25: type = array_type %.12, %SelfNestedBadReturnType [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -342,7 +342,7 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: .SelfNestedBadReturnType = %SelfNestedBadReturnType.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %I.decl: type = interface_decl @I [template = constants.%.1] {} {} +// CHECK:STDOUT: %I.decl: type = interface_decl @I [template = constants.%I.type] {} {} // CHECK:STDOUT: %NoF.decl: type = class_decl @NoF [template = constants.%NoF] {} {} // CHECK:STDOUT: %FNotFunction.decl: type = class_decl @FNotFunction [template = constants.%FNotFunction] {} {} // CHECK:STDOUT: %PossiblyF.decl: %PossiblyF.type = fn_decl @PossiblyF [template = constants.%PossiblyF] {} {} @@ -350,7 +350,7 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: %FExtraParam.decl: type = class_decl @FExtraParam [template = constants.%FExtraParam] {} {} // CHECK:STDOUT: %FExtraImplicitParam.decl: type = class_decl @FExtraImplicitParam [template = constants.%FExtraImplicitParam] {} {} // CHECK:STDOUT: %FExtraReturnType.decl: type = class_decl @FExtraReturnType [template = constants.%FExtraReturnType] {} {} -// CHECK:STDOUT: %J.decl: type = interface_decl @J [template = constants.%.7] {} {} +// CHECK:STDOUT: %J.decl: type = interface_decl @J [template = constants.%J.type] {} {} // CHECK:STDOUT: %FMissingParam.decl: type = class_decl @FMissingParam [template = constants.%FMissingParam] {} {} // CHECK:STDOUT: %FMissingImplicitParam.decl: type = class_decl @FMissingImplicitParam [template = constants.%FMissingImplicitParam] {} {} // CHECK:STDOUT: %FMissingReturnType.decl: type = class_decl @FMissingReturnType [template = constants.%FMissingReturnType] {} {} @@ -358,15 +358,15 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: %FDifferentImplicitParamType.decl: type = class_decl @FDifferentImplicitParamType [template = constants.%FDifferentImplicitParamType] {} {} // CHECK:STDOUT: %FDifferentReturnType.decl: type = class_decl @FDifferentReturnType [template = constants.%FDifferentReturnType] {} {} // CHECK:STDOUT: %FDifferentParamName.decl: type = class_decl @FDifferentParamName [template = constants.%FDifferentParamName] {} {} -// CHECK:STDOUT: %SelfNested.decl: type = interface_decl @SelfNested [template = constants.%.10] {} {} +// CHECK:STDOUT: %SelfNested.decl: type = interface_decl @SelfNested [template = constants.%SelfNested.type] {} {} // CHECK:STDOUT: %SelfNestedBadParam.decl: type = class_decl @SelfNestedBadParam [template = constants.%SelfNestedBadParam] {} {} // CHECK:STDOUT: %SelfNestedBadReturnType.decl: type = class_decl @SelfNestedBadReturnType [template = constants.%SelfNestedBadReturnType] {} {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @I { -// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self, 0 [symbolic = constants.%Self.1] +// CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self.1] // CHECK:STDOUT: %F.decl: %F.type.1 = fn_decl @F.1 [template = constants.%F.1] {} {} -// CHECK:STDOUT: %.loc11: %.3 = assoc_entity element0, %F.decl [template = constants.%.4] +// CHECK:STDOUT: %.loc11: %.2 = assoc_entity element0, %F.decl [template = constants.%.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -375,7 +375,7 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @J { -// CHECK:STDOUT: %Self: %.7 = bind_symbolic_name Self, 0 [symbolic = constants.%Self.2] +// CHECK:STDOUT: %Self: %J.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self.2] // CHECK:STDOUT: %F.decl: %F.type.5 = fn_decl @F.5 [template = constants.%F.6] { // CHECK:STDOUT: %self.patt: bool = binding_pattern self // CHECK:STDOUT: %b.patt: bool = binding_pattern b @@ -395,7 +395,7 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: %.loc93_44.2: type = converted %bool.make_type.loc93_44, %.loc93_44.1 [template = bool] // CHECK:STDOUT: %return: ref bool = var // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc93: %.8 = assoc_entity element0, %F.decl [template = constants.%.9] +// CHECK:STDOUT: %.loc93: %.6 = assoc_entity element0, %F.decl [template = constants.%.7] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -404,33 +404,33 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @SelfNested { -// CHECK:STDOUT: %Self: %.10 = bind_symbolic_name Self, 0 [symbolic = constants.%Self.3] +// CHECK:STDOUT: %Self: %SelfNested.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self.3] // CHECK:STDOUT: %F.decl: %F.type.13 = fn_decl @F.13 [template = constants.%F.14] { -// CHECK:STDOUT: %x.patt: @F.13.%.3 (%.14) = binding_pattern x +// CHECK:STDOUT: %x.patt: @F.13.%.3 (%.11) = binding_pattern x // CHECK:STDOUT: } { -// CHECK:STDOUT: %Self.ref.loc188_12: %.10 = name_ref Self, @SelfNested.%Self [symbolic = %Self (constants.%Self.3)] +// CHECK:STDOUT: %Self.ref.loc188_12: %SelfNested.type = name_ref Self, @SelfNested.%Self [symbolic = %Self (constants.%Self.3)] // CHECK:STDOUT: %.loc188_16.1: type = facet_type_access %Self.ref.loc188_12 [symbolic = %Self (constants.%Self.3)] // CHECK:STDOUT: %.loc188_16.2: type = converted %Self.ref.loc188_12, %.loc188_16.1 [symbolic = %Self (constants.%Self.3)] -// CHECK:STDOUT: %.loc188_16.3: type = ptr_type %Self.3 [symbolic = %.1 (constants.%.11)] -// CHECK:STDOUT: %Self.ref.loc188_24: %.10 = name_ref Self, @SelfNested.%Self [symbolic = %Self (constants.%Self.3)] +// CHECK:STDOUT: %.loc188_16.3: type = ptr_type %Self.3 [symbolic = %.1 (constants.%.8)] +// CHECK:STDOUT: %Self.ref.loc188_24: %SelfNested.type = name_ref Self, @SelfNested.%Self [symbolic = %Self (constants.%Self.3)] // CHECK:STDOUT: %.loc188_24.1: type = facet_type_access %Self.ref.loc188_24 [symbolic = %Self (constants.%Self.3)] // CHECK:STDOUT: %.loc188_24.2: type = converted %Self.ref.loc188_24, %.loc188_24.1 [symbolic = %Self (constants.%Self.3)] // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc188_34.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc188_34.2: type = converted %int.make_type_32, %.loc188_34.1 [template = i32] -// CHECK:STDOUT: %.loc188_37: type = struct_type {.x: %Self.3, .y: i32} [symbolic = %.2 (constants.%.12)] -// CHECK:STDOUT: %.loc188_38.1: %.13 = tuple_literal (%.loc188_16.3, %.loc188_37) -// CHECK:STDOUT: %.loc188_38.2: type = converted %.loc188_38.1, constants.%.14 [symbolic = %.3 (constants.%.14)] -// CHECK:STDOUT: %x.param: @F.13.%.3 (%.14) = param x, runtime_param0 -// CHECK:STDOUT: %x: @F.13.%.3 (%.14) = bind_name x, %x.param -// CHECK:STDOUT: %Self.ref.loc188_45: %.10 = name_ref Self, @SelfNested.%Self [symbolic = %Self (constants.%Self.3)] -// CHECK:STDOUT: %.loc188_51: i32 = int_literal 4 [template = constants.%.15] +// CHECK:STDOUT: %.loc188_37: type = struct_type {.x: %Self.3, .y: i32} [symbolic = %.2 (constants.%.9)] +// CHECK:STDOUT: %.loc188_38.1: %.10 = tuple_literal (%.loc188_16.3, %.loc188_37) +// CHECK:STDOUT: %.loc188_38.2: type = converted %.loc188_38.1, constants.%.11 [symbolic = %.3 (constants.%.11)] +// CHECK:STDOUT: %x.param: @F.13.%.3 (%.11) = param x, runtime_param0 +// CHECK:STDOUT: %x: @F.13.%.3 (%.11) = bind_name x, %x.param +// CHECK:STDOUT: %Self.ref.loc188_45: %SelfNested.type = name_ref Self, @SelfNested.%Self [symbolic = %Self (constants.%Self.3)] +// CHECK:STDOUT: %.loc188_51: i32 = int_literal 4 [template = constants.%.12] // CHECK:STDOUT: %.loc188_45.1: type = facet_type_access %Self.ref.loc188_45 [symbolic = %Self (constants.%Self.3)] // CHECK:STDOUT: %.loc188_45.2: type = converted %Self.ref.loc188_45, %.loc188_45.1 [symbolic = %Self (constants.%Self.3)] -// CHECK:STDOUT: %.loc188_52: type = array_type %.loc188_51, %Self.3 [symbolic = %.4 (constants.%.16)] -// CHECK:STDOUT: %return: ref @F.13.%.4 (%.16) = var +// CHECK:STDOUT: %.loc188_52: type = array_type %.loc188_51, %Self.3 [symbolic = %.4 (constants.%.13)] +// CHECK:STDOUT: %return: ref @F.13.%.4 (%.13) = var // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc188: %.17 = assoc_entity element0, %F.decl [template = constants.%.18] +// CHECK:STDOUT: %.loc188: %.14 = assoc_entity element0, %F.decl [template = constants.%.15] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -679,25 +679,25 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.14: %Self.ref as %SelfNested.ref { // CHECK:STDOUT: %F.decl: %F.type.14 = fn_decl @F.14 [template = constants.%F.15] { -// CHECK:STDOUT: %x.patt: %.21 = binding_pattern x +// CHECK:STDOUT: %x.patt: %.18 = binding_pattern x // CHECK:STDOUT: } { // CHECK:STDOUT: %SelfNestedBadParam.ref.loc200_14: type = name_ref SelfNestedBadParam, file.%SelfNestedBadParam.decl [template = constants.%SelfNestedBadParam] -// CHECK:STDOUT: %.loc200_32: type = ptr_type %SelfNestedBadParam [template = constants.%.19] +// CHECK:STDOUT: %.loc200_32: type = ptr_type %SelfNestedBadParam [template = constants.%.16] // CHECK:STDOUT: %int.make_type_32.loc200_40: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc200_40.1: type = value_of_initializer %int.make_type_32.loc200_40 [template = i32] // CHECK:STDOUT: %.loc200_40.2: type = converted %int.make_type_32.loc200_40, %.loc200_40.1 [template = i32] // CHECK:STDOUT: %int.make_type_32.loc200_49: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc200_49.1: type = value_of_initializer %int.make_type_32.loc200_49 [template = i32] // CHECK:STDOUT: %.loc200_49.2: type = converted %int.make_type_32.loc200_49, %.loc200_49.1 [template = i32] -// CHECK:STDOUT: %.loc200_52: type = struct_type {.x: i32, .y: i32} [template = constants.%.20] -// CHECK:STDOUT: %.loc200_53.1: %.13 = tuple_literal (%.loc200_32, %.loc200_52) -// CHECK:STDOUT: %.loc200_53.2: type = converted %.loc200_53.1, constants.%.21 [template = constants.%.21] -// CHECK:STDOUT: %x.param: %.21 = param x, runtime_param0 -// CHECK:STDOUT: %x: %.21 = bind_name x, %x.param +// CHECK:STDOUT: %.loc200_52: type = struct_type {.x: i32, .y: i32} [template = constants.%.17] +// CHECK:STDOUT: %.loc200_53.1: %.10 = tuple_literal (%.loc200_32, %.loc200_52) +// CHECK:STDOUT: %.loc200_53.2: type = converted %.loc200_53.1, constants.%.18 [template = constants.%.18] +// CHECK:STDOUT: %x.param: %.18 = param x, runtime_param0 +// CHECK:STDOUT: %x: %.18 = bind_name x, %x.param // CHECK:STDOUT: %SelfNestedBadParam.ref.loc200_60: type = name_ref SelfNestedBadParam, file.%SelfNestedBadParam.decl [template = constants.%SelfNestedBadParam] -// CHECK:STDOUT: %.loc200_80: i32 = int_literal 4 [template = constants.%.15] -// CHECK:STDOUT: %.loc200_81: type = array_type %.loc200_80, %SelfNestedBadParam [template = constants.%.22] -// CHECK:STDOUT: %return: ref %.22 = var +// CHECK:STDOUT: %.loc200_80: i32 = int_literal 4 [template = constants.%.12] +// CHECK:STDOUT: %.loc200_81: type = array_type %.loc200_80, %SelfNestedBadParam [template = constants.%.19] +// CHECK:STDOUT: %return: ref %.19 = var // CHECK:STDOUT: } // CHECK:STDOUT: %.loc192: = interface_witness () [template = ] // CHECK:STDOUT: @@ -708,23 +708,23 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.15: %Self.ref as %SelfNested.ref { // CHECK:STDOUT: %F.decl: %F.type.15 = fn_decl @F.15 [template = constants.%F.16] { -// CHECK:STDOUT: %x.patt: %.27 = binding_pattern x +// CHECK:STDOUT: %x.patt: %.24 = binding_pattern x // CHECK:STDOUT: } { // CHECK:STDOUT: %SelfNestedBadReturnType.ref.loc212_14: type = name_ref SelfNestedBadReturnType, file.%SelfNestedBadReturnType.decl [template = constants.%SelfNestedBadReturnType] -// CHECK:STDOUT: %.loc212_37: type = ptr_type %SelfNestedBadReturnType [template = constants.%.25] +// CHECK:STDOUT: %.loc212_37: type = ptr_type %SelfNestedBadReturnType [template = constants.%.22] // CHECK:STDOUT: %SelfNestedBadReturnType.ref.loc212_45: type = name_ref SelfNestedBadReturnType, file.%SelfNestedBadReturnType.decl [template = constants.%SelfNestedBadReturnType] // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc212_74.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc212_74.2: type = converted %int.make_type_32, %.loc212_74.1 [template = i32] -// CHECK:STDOUT: %.loc212_77: type = struct_type {.x: %SelfNestedBadReturnType, .y: i32} [template = constants.%.26] -// CHECK:STDOUT: %.loc212_78.1: %.13 = tuple_literal (%.loc212_37, %.loc212_77) -// CHECK:STDOUT: %.loc212_78.2: type = converted %.loc212_78.1, constants.%.27 [template = constants.%.27] -// CHECK:STDOUT: %x.param: %.27 = param x, runtime_param0 -// CHECK:STDOUT: %x: %.27 = bind_name x, %x.param +// CHECK:STDOUT: %.loc212_77: type = struct_type {.x: %SelfNestedBadReturnType, .y: i32} [template = constants.%.23] +// CHECK:STDOUT: %.loc212_78.1: %.10 = tuple_literal (%.loc212_37, %.loc212_77) +// CHECK:STDOUT: %.loc212_78.2: type = converted %.loc212_78.1, constants.%.24 [template = constants.%.24] +// CHECK:STDOUT: %x.param: %.24 = param x, runtime_param0 +// CHECK:STDOUT: %x: %.24 = bind_name x, %x.param // CHECK:STDOUT: %SelfNestedBadParam.ref: type = name_ref SelfNestedBadParam, file.%SelfNestedBadParam.decl [template = constants.%SelfNestedBadParam] -// CHECK:STDOUT: %.loc212_105: i32 = int_literal 4 [template = constants.%.15] -// CHECK:STDOUT: %.loc212_106: type = array_type %.loc212_105, %SelfNestedBadParam [template = constants.%.22] -// CHECK:STDOUT: %return: ref %.22 = var +// CHECK:STDOUT: %.loc212_105: i32 = int_literal 4 [template = constants.%.12] +// CHECK:STDOUT: %.loc212_106: type = array_type %.loc212_105, %SelfNestedBadParam [template = constants.%.19] +// CHECK:STDOUT: %return: ref %.19 = var // CHECK:STDOUT: } // CHECK:STDOUT: %.loc205: = interface_witness () [template = ] // CHECK:STDOUT: @@ -736,9 +736,9 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: class @NoF { // CHECK:STDOUT: impl_decl @impl.1 [template] {} { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%NoF [template = constants.%NoF] -// CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [template = constants.%.1] +// CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [template = constants.%I.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc22: = complete_type_witness %.5 [template = constants.%.6] +// CHECK:STDOUT: %.loc22: = complete_type_witness %.4 [template = constants.%.5] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%NoF @@ -747,9 +747,9 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: class @FNotFunction { // CHECK:STDOUT: impl_decl @impl.2 [template] {} { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%FNotFunction [template = constants.%FNotFunction] -// CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [template = constants.%.1] +// CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [template = constants.%I.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc35: = complete_type_witness %.5 [template = constants.%.6] +// CHECK:STDOUT: %.loc35: = complete_type_witness %.4 [template = constants.%.5] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%FNotFunction @@ -760,9 +760,9 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: class @FAlias { // CHECK:STDOUT: impl_decl @impl.3 [template] {} { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%FAlias [template = constants.%FAlias] -// CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [template = constants.%.1] +// CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [template = constants.%I.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc51: = complete_type_witness %.5 [template = constants.%.6] +// CHECK:STDOUT: %.loc51: = complete_type_witness %.4 [template = constants.%.5] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%FAlias @@ -771,9 +771,9 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: class @FExtraParam { // CHECK:STDOUT: impl_decl @impl.4 [template] {} { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%FExtraParam [template = constants.%FExtraParam] -// CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [template = constants.%.1] +// CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [template = constants.%I.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc64: = complete_type_witness %.5 [template = constants.%.6] +// CHECK:STDOUT: %.loc64: = complete_type_witness %.4 [template = constants.%.5] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%FExtraParam @@ -782,9 +782,9 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: class @FExtraImplicitParam { // CHECK:STDOUT: impl_decl @impl.5 [template] {} { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%FExtraImplicitParam [template = constants.%FExtraImplicitParam] -// CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [template = constants.%.1] +// CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [template = constants.%I.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc77: = complete_type_witness %.5 [template = constants.%.6] +// CHECK:STDOUT: %.loc77: = complete_type_witness %.4 [template = constants.%.5] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%FExtraImplicitParam @@ -793,9 +793,9 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: class @FExtraReturnType { // CHECK:STDOUT: impl_decl @impl.6 [template] {} { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%FExtraReturnType [template = constants.%FExtraReturnType] -// CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [template = constants.%.1] +// CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [template = constants.%I.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc91: = complete_type_witness %.5 [template = constants.%.6] +// CHECK:STDOUT: %.loc91: = complete_type_witness %.4 [template = constants.%.5] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%FExtraReturnType @@ -804,9 +804,9 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: class @FMissingParam { // CHECK:STDOUT: impl_decl @impl.7 [template] {} { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%FMissingParam [template = constants.%FMissingParam] -// CHECK:STDOUT: %J.ref: type = name_ref J, file.%J.decl [template = constants.%.7] +// CHECK:STDOUT: %J.ref: type = name_ref J, file.%J.decl [template = constants.%J.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc106: = complete_type_witness %.5 [template = constants.%.6] +// CHECK:STDOUT: %.loc106: = complete_type_witness %.4 [template = constants.%.5] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%FMissingParam @@ -815,9 +815,9 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: class @FMissingImplicitParam { // CHECK:STDOUT: impl_decl @impl.8 [template] {} { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%FMissingImplicitParam [template = constants.%FMissingImplicitParam] -// CHECK:STDOUT: %J.ref: type = name_ref J, file.%J.decl [template = constants.%.7] +// CHECK:STDOUT: %J.ref: type = name_ref J, file.%J.decl [template = constants.%J.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc119: = complete_type_witness %.5 [template = constants.%.6] +// CHECK:STDOUT: %.loc119: = complete_type_witness %.4 [template = constants.%.5] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%FMissingImplicitParam @@ -826,9 +826,9 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: class @FMissingReturnType { // CHECK:STDOUT: impl_decl @impl.9 [template] {} { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%FMissingReturnType [template = constants.%FMissingReturnType] -// CHECK:STDOUT: %J.ref: type = name_ref J, file.%J.decl [template = constants.%.7] +// CHECK:STDOUT: %J.ref: type = name_ref J, file.%J.decl [template = constants.%J.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc132: = complete_type_witness %.5 [template = constants.%.6] +// CHECK:STDOUT: %.loc132: = complete_type_witness %.4 [template = constants.%.5] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%FMissingReturnType @@ -837,9 +837,9 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: class @FDifferentParamType { // CHECK:STDOUT: impl_decl @impl.10 [template] {} { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%FDifferentParamType [template = constants.%FDifferentParamType] -// CHECK:STDOUT: %J.ref: type = name_ref J, file.%J.decl [template = constants.%.7] +// CHECK:STDOUT: %J.ref: type = name_ref J, file.%J.decl [template = constants.%J.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc145: = complete_type_witness %.5 [template = constants.%.6] +// CHECK:STDOUT: %.loc145: = complete_type_witness %.4 [template = constants.%.5] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%FDifferentParamType @@ -848,9 +848,9 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: class @FDifferentImplicitParamType { // CHECK:STDOUT: impl_decl @impl.11 [template] {} { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%FDifferentImplicitParamType [template = constants.%FDifferentImplicitParamType] -// CHECK:STDOUT: %J.ref: type = name_ref J, file.%J.decl [template = constants.%.7] +// CHECK:STDOUT: %J.ref: type = name_ref J, file.%J.decl [template = constants.%J.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc158: = complete_type_witness %.5 [template = constants.%.6] +// CHECK:STDOUT: %.loc158: = complete_type_witness %.4 [template = constants.%.5] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%FDifferentImplicitParamType @@ -859,9 +859,9 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: class @FDifferentReturnType { // CHECK:STDOUT: impl_decl @impl.12 [template] {} { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%FDifferentReturnType [template = constants.%FDifferentReturnType] -// CHECK:STDOUT: %J.ref: type = name_ref J, file.%J.decl [template = constants.%.7] +// CHECK:STDOUT: %J.ref: type = name_ref J, file.%J.decl [template = constants.%J.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc171: = complete_type_witness %.5 [template = constants.%.6] +// CHECK:STDOUT: %.loc171: = complete_type_witness %.4 [template = constants.%.5] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%FDifferentReturnType @@ -870,9 +870,9 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: class @FDifferentParamName { // CHECK:STDOUT: impl_decl @impl.13 [template] {} { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%FDifferentParamName [template = constants.%FDifferentParamName] -// CHECK:STDOUT: %J.ref: type = name_ref J, file.%J.decl [template = constants.%.7] +// CHECK:STDOUT: %J.ref: type = name_ref J, file.%J.decl [template = constants.%J.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc185: = complete_type_witness %.5 [template = constants.%.6] +// CHECK:STDOUT: %.loc185: = complete_type_witness %.4 [template = constants.%.5] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%FDifferentParamName @@ -881,9 +881,9 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: class @SelfNestedBadParam { // CHECK:STDOUT: impl_decl @impl.14 [template] {} { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%SelfNestedBadParam [template = constants.%SelfNestedBadParam] -// CHECK:STDOUT: %SelfNested.ref: type = name_ref SelfNested, file.%SelfNested.decl [template = constants.%.10] +// CHECK:STDOUT: %SelfNested.ref: type = name_ref SelfNested, file.%SelfNested.decl [template = constants.%SelfNested.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc202: = complete_type_witness %.5 [template = constants.%.6] +// CHECK:STDOUT: %.loc202: = complete_type_witness %.4 [template = constants.%.5] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%SelfNestedBadParam @@ -892,15 +892,15 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: class @SelfNestedBadReturnType { // CHECK:STDOUT: impl_decl @impl.15 [template] {} { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%SelfNestedBadReturnType [template = constants.%SelfNestedBadReturnType] -// CHECK:STDOUT: %SelfNested.ref: type = name_ref SelfNested, file.%SelfNested.decl [template = constants.%.10] +// CHECK:STDOUT: %SelfNested.ref: type = name_ref SelfNested, file.%SelfNested.decl [template = constants.%SelfNested.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc214: = complete_type_witness %.5 [template = constants.%.6] +// CHECK:STDOUT: %.loc214: = complete_type_witness %.4 [template = constants.%.5] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%SelfNestedBadReturnType // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @F.1(@I.%Self: %.1) { +// CHECK:STDOUT: generic fn @F.1(@I.%Self: %I.type) { // CHECK:STDOUT: // CHECK:STDOUT: fn(); // CHECK:STDOUT: } @@ -915,7 +915,7 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: // CHECK:STDOUT: fn @F.4() -> bool; // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @F.5(@J.%Self: %.7) { +// CHECK:STDOUT: generic fn @F.5(@J.%Self: %J.type) { // CHECK:STDOUT: // CHECK:STDOUT: fn[%self: bool](%b: bool) -> bool; // CHECK:STDOUT: } @@ -936,19 +936,19 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32"; // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @F.13(@SelfNested.%Self: %.10) { -// CHECK:STDOUT: %Self: %.10 = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self.3)] -// CHECK:STDOUT: %.1: type = ptr_type @F.13.%Self (%Self.3) [symbolic = %.1 (constants.%.11)] -// CHECK:STDOUT: %.2: type = struct_type {.x: @F.13.%Self (%Self.3), .y: i32} [symbolic = %.2 (constants.%.12)] -// CHECK:STDOUT: %.3: type = tuple_type (@F.13.%.1 (%.11), @F.13.%.2 (%.12)) [symbolic = %.3 (constants.%.14)] -// CHECK:STDOUT: %.4: type = array_type constants.%.15, @F.13.%Self (%Self.3) [symbolic = %.4 (constants.%.16)] +// CHECK:STDOUT: generic fn @F.13(@SelfNested.%Self: %SelfNested.type) { +// CHECK:STDOUT: %Self: %SelfNested.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self.3)] +// CHECK:STDOUT: %.1: type = ptr_type @F.13.%Self (%Self.3) [symbolic = %.1 (constants.%.8)] +// CHECK:STDOUT: %.2: type = struct_type {.x: @F.13.%Self (%Self.3), .y: i32} [symbolic = %.2 (constants.%.9)] +// CHECK:STDOUT: %.3: type = tuple_type (@F.13.%.1 (%.8), @F.13.%.2 (%.9)) [symbolic = %.3 (constants.%.11)] +// CHECK:STDOUT: %.4: type = array_type constants.%.12, @F.13.%Self (%Self.3) [symbolic = %.4 (constants.%.13)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%x: @F.13.%.3 (%.14)) -> @F.13.%.4 (%.16); +// CHECK:STDOUT: fn(%x: @F.13.%.3 (%.11)) -> @F.13.%.4 (%.13); // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @F.14(%x: %.21) -> %.22; +// CHECK:STDOUT: fn @F.14(%x: %.18) -> %.19; // CHECK:STDOUT: -// CHECK:STDOUT: fn @F.15(%x: %.27) -> %.22; +// CHECK:STDOUT: fn @F.15(%x: %.24) -> %.19; // CHECK:STDOUT: // CHECK:STDOUT: specific @F.1(constants.%Self.1) {} // CHECK:STDOUT: @@ -976,25 +976,25 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: // CHECK:STDOUT: specific @F.13(constants.%Self.3) { // CHECK:STDOUT: %Self => constants.%Self.3 -// CHECK:STDOUT: %.1 => constants.%.11 -// CHECK:STDOUT: %.2 => constants.%.12 -// CHECK:STDOUT: %.3 => constants.%.14 -// CHECK:STDOUT: %.4 => constants.%.16 +// CHECK:STDOUT: %.1 => constants.%.8 +// CHECK:STDOUT: %.2 => constants.%.9 +// CHECK:STDOUT: %.3 => constants.%.11 +// CHECK:STDOUT: %.4 => constants.%.13 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F.13(constants.%SelfNestedBadParam) { // CHECK:STDOUT: %Self => constants.%SelfNestedBadParam -// CHECK:STDOUT: %.1 => constants.%.19 -// CHECK:STDOUT: %.2 => constants.%.23 -// CHECK:STDOUT: %.3 => constants.%.24 -// CHECK:STDOUT: %.4 => constants.%.22 +// CHECK:STDOUT: %.1 => constants.%.16 +// CHECK:STDOUT: %.2 => constants.%.20 +// CHECK:STDOUT: %.3 => constants.%.21 +// CHECK:STDOUT: %.4 => constants.%.19 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F.13(constants.%SelfNestedBadReturnType) { // CHECK:STDOUT: %Self => constants.%SelfNestedBadReturnType -// CHECK:STDOUT: %.1 => constants.%.25 -// CHECK:STDOUT: %.2 => constants.%.26 -// CHECK:STDOUT: %.3 => constants.%.27 -// CHECK:STDOUT: %.4 => constants.%.28 +// CHECK:STDOUT: %.1 => constants.%.22 +// CHECK:STDOUT: %.2 => constants.%.23 +// CHECK:STDOUT: %.3 => constants.%.24 +// CHECK:STDOUT: %.4 => constants.%.25 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/impl/fail_impl_bad_interface.carbon b/toolchain/check/testdata/impl/fail_impl_bad_interface.carbon index 4a745c9ccf77a..d760b53792892 100644 --- a/toolchain/check/testdata/impl/fail_impl_bad_interface.carbon +++ b/toolchain/check/testdata/impl/fail_impl_bad_interface.carbon @@ -27,22 +27,22 @@ impl i32 as false {} // CHECK:STDOUT: %.1: type = tuple_type () [template] // CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %.2: bool = bool_literal false [template] -// CHECK:STDOUT: %ImplicitAs.type: type = generic_interface_type @ImplicitAs [template] -// CHECK:STDOUT: %ImplicitAs: %ImplicitAs.type = struct_value () [template] +// CHECK:STDOUT: %ImplicitAs.type.1: type = generic_interface_type @ImplicitAs [template] +// CHECK:STDOUT: %ImplicitAs: %ImplicitAs.type.1 = struct_value () [template] // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic] -// CHECK:STDOUT: %.3: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic] -// CHECK:STDOUT: %Self.1: @ImplicitAs.%.1 (%.3) = bind_symbolic_name Self, 1 [symbolic] -// CHECK:STDOUT: %Self.2: %.3 = bind_symbolic_name Self, 1 [symbolic] +// CHECK:STDOUT: %ImplicitAs.type.2: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic] +// CHECK:STDOUT: %Self.1: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2) = bind_symbolic_name Self, 1 [symbolic] +// CHECK:STDOUT: %Self.2: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: %Convert.type.1: type = fn_type @Convert, @ImplicitAs(%Dest) [symbolic] // CHECK:STDOUT: %Convert.1: %Convert.type.1 = struct_value () [symbolic] -// CHECK:STDOUT: %.4: type = assoc_entity_type %.3, %Convert.type.1 [symbolic] -// CHECK:STDOUT: %.5: %.4 = assoc_entity element0, imports.%import_ref.6 [symbolic] -// CHECK:STDOUT: %.6: type = interface_type @ImplicitAs, @ImplicitAs(type) [template] +// CHECK:STDOUT: %.3: type = assoc_entity_type %ImplicitAs.type.2, %Convert.type.1 [symbolic] +// CHECK:STDOUT: %.4: %.3 = assoc_entity element0, imports.%import_ref.6 [symbolic] +// CHECK:STDOUT: %ImplicitAs.type.3: type = interface_type @ImplicitAs, @ImplicitAs(type) [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert, @ImplicitAs(type) [template] // CHECK:STDOUT: %Convert.2: %Convert.type.2 = struct_value () [template] -// CHECK:STDOUT: %.7: type = assoc_entity_type %.6, %Convert.type.2 [template] -// CHECK:STDOUT: %.8: %.7 = assoc_entity element0, imports.%import_ref.6 [template] -// CHECK:STDOUT: %.9: %.4 = assoc_entity element0, imports.%import_ref.7 [symbolic] +// CHECK:STDOUT: %.5: type = assoc_entity_type %ImplicitAs.type.3, %Convert.type.2 [template] +// CHECK:STDOUT: %.6: %.5 = assoc_entity element0, imports.%import_ref.6 [template] +// CHECK:STDOUT: %.7: %.3 = assoc_entity element0, imports.%import_ref.7 [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -59,9 +59,9 @@ impl i32 as false {} // CHECK:STDOUT: import Core//prelude/types/bool // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref Core//prelude/types, inst+4, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.2: %ImplicitAs.type = import_ref Core//prelude/operators/as, inst+40, loaded [template = constants.%ImplicitAs] +// CHECK:STDOUT: %import_ref.2: %ImplicitAs.type.1 = import_ref Core//prelude/operators/as, inst+40, loaded [template = constants.%ImplicitAs] // CHECK:STDOUT: %import_ref.3 = import_ref Core//prelude/operators/as, inst+45, unloaded -// CHECK:STDOUT: %import_ref.4: @ImplicitAs.%.2 (%.4) = import_ref Core//prelude/operators/as, inst+63, loaded [symbolic = @ImplicitAs.%.3 (constants.%.9)] +// CHECK:STDOUT: %import_ref.4: @ImplicitAs.%.1 (%.3) = import_ref Core//prelude/operators/as, inst+63, loaded [symbolic = @ImplicitAs.%.2 (constants.%.7)] // CHECK:STDOUT: %import_ref.5 = import_ref Core//prelude/operators/as, inst+56, unloaded // CHECK:STDOUT: %import_ref.6 = import_ref Core//prelude/operators/as, inst+56, unloaded // CHECK:STDOUT: %import_ref.7 = import_ref Core//prelude/operators/as, inst+56, unloaded @@ -72,10 +72,10 @@ impl i32 as false {} // CHECK:STDOUT: .Core = imports.%Core // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %.loc21_13.1: type = interface_type @ImplicitAs, @ImplicitAs(type) [template = constants.%.6] -// CHECK:STDOUT: %.loc21_13.2: %.7 = specific_constant imports.%import_ref.4, @ImplicitAs(type) [template = constants.%.8] -// CHECK:STDOUT: %Convert.ref: %.7 = name_ref Convert, %.loc21_13.2 [template = constants.%.8] -// CHECK:STDOUT: %.loc21_13.3: type = converted @impl.%.loc21_13, [template = ] +// CHECK:STDOUT: %ImplicitAs.type: type = interface_type @ImplicitAs, @ImplicitAs(type) [template = constants.%ImplicitAs.type.3] +// CHECK:STDOUT: %.loc21_13.1: %.5 = specific_constant imports.%import_ref.4, @ImplicitAs(type) [template = constants.%.6] +// CHECK:STDOUT: %Convert.ref: %.5 = name_ref Convert, %.loc21_13.1 [template = constants.%.6] +// CHECK:STDOUT: %.loc21_13.2: type = converted @impl.%.loc21_13, [template = ] // CHECK:STDOUT: impl_decl @impl [template] {} { // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc21_6.1: type = value_of_initializer %int.make_type_32 [template = i32] @@ -88,12 +88,12 @@ impl i32 as false {} // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic = %Dest (constants.%Dest)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.1: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic = %.1 (constants.%.3)] -// CHECK:STDOUT: %Self: %.3 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] +// CHECK:STDOUT: %ImplicitAs.type: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.2)] +// CHECK:STDOUT: %Self: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] // CHECK:STDOUT: %Convert.type: type = fn_type @Convert, @ImplicitAs(%Dest) [symbolic = %Convert.type (constants.%Convert.type.1)] // CHECK:STDOUT: %Convert: @ImplicitAs.%Convert.type (%Convert.type.1) = struct_value () [symbolic = %Convert (constants.%Convert.1)] -// CHECK:STDOUT: %.2: type = assoc_entity_type @ImplicitAs.%.1 (%.3), @ImplicitAs.%Convert.type (%Convert.type.1) [symbolic = %.2 (constants.%.4)] -// CHECK:STDOUT: %.3: @ImplicitAs.%.2 (%.4) = assoc_entity element0, imports.%import_ref.6 [symbolic = %.3 (constants.%.5)] +// CHECK:STDOUT: %.1: type = assoc_entity_type @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2), @ImplicitAs.%Convert.type (%Convert.type.1) [symbolic = %.1 (constants.%.3)] +// CHECK:STDOUT: %.2: @ImplicitAs.%.1 (%.3) = assoc_entity element0, imports.%import_ref.6 [symbolic = %.2 (constants.%.4)] // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: !members: @@ -110,10 +110,10 @@ impl i32 as false {} // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32"; // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @Convert(constants.%Dest: type, constants.%Self.1: @ImplicitAs.%.1 (%.3)) { +// CHECK:STDOUT: generic fn @Convert(constants.%Dest: type, constants.%Self.1: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2)) { // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic = %Dest (constants.%Dest)] -// CHECK:STDOUT: %.1: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic = %.1 (constants.%.3)] -// CHECK:STDOUT: %Self: %.3 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] +// CHECK:STDOUT: %ImplicitAs.type: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.2)] +// CHECK:STDOUT: %Self: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] // CHECK:STDOUT: // CHECK:STDOUT: fn[%self: @Convert.%Self (%Self.2)]() -> @Convert.%Dest (%Dest); // CHECK:STDOUT: } @@ -132,7 +132,7 @@ impl i32 as false {} // CHECK:STDOUT: // CHECK:STDOUT: specific @Convert(constants.%Dest, constants.%Self.1) { // CHECK:STDOUT: %Dest => constants.%Dest -// CHECK:STDOUT: %.1 => constants.%.3 +// CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.2 // CHECK:STDOUT: %Self => constants.%Self.1 // CHECK:STDOUT: } // CHECK:STDOUT: @@ -140,11 +140,11 @@ impl i32 as false {} // CHECK:STDOUT: %Dest => type // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.1 => constants.%.6 +// CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.3 // CHECK:STDOUT: %Self => constants.%Self.2 // CHECK:STDOUT: %Convert.type => constants.%Convert.type.2 // CHECK:STDOUT: %Convert => constants.%Convert.2 -// CHECK:STDOUT: %.2 => constants.%.7 -// CHECK:STDOUT: %.3 => constants.%.8 +// CHECK:STDOUT: %.1 => constants.%.5 +// CHECK:STDOUT: %.2 => constants.%.6 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/impl/fail_redefinition.carbon b/toolchain/check/testdata/impl/fail_redefinition.carbon index 85ce178ff9e9c..a117a69016989 100644 --- a/toolchain/check/testdata/impl/fail_redefinition.carbon +++ b/toolchain/check/testdata/impl/fail_redefinition.carbon @@ -23,12 +23,12 @@ impl i32 as I {} // CHECK:STDOUT: --- fail_redefinition.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: type = interface_type @I [template] -// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self, 0 [symbolic] +// CHECK:STDOUT: %I.type: type = interface_type @I [template] +// CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] -// CHECK:STDOUT: %.2: type = tuple_type () [template] +// CHECK:STDOUT: %.1: type = tuple_type () [template] // CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] -// CHECK:STDOUT: %.3: = interface_witness () [template] +// CHECK:STDOUT: %.2: = interface_witness () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -52,23 +52,23 @@ impl i32 as I {} // CHECK:STDOUT: .I = %I.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %I.decl: type = interface_decl @I [template = constants.%.1] {} {} +// CHECK:STDOUT: %I.decl: type = interface_decl @I [template = constants.%I.type] {} {} // CHECK:STDOUT: impl_decl @impl [template] {} { // CHECK:STDOUT: %int.make_type_32.loc13: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc13_6.1: type = value_of_initializer %int.make_type_32.loc13 [template = i32] // CHECK:STDOUT: %.loc13_6.2: type = converted %int.make_type_32.loc13, %.loc13_6.1 [template = i32] -// CHECK:STDOUT: %I.ref.loc13: type = name_ref I, file.%I.decl [template = constants.%.1] +// CHECK:STDOUT: %I.ref.loc13: type = name_ref I, file.%I.decl [template = constants.%I.type] // CHECK:STDOUT: } // CHECK:STDOUT: impl_decl @impl [template] {} { // CHECK:STDOUT: %int.make_type_32.loc21: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc21_6.1: type = value_of_initializer %int.make_type_32.loc21 [template = i32] // CHECK:STDOUT: %.loc21_6.2: type = converted %int.make_type_32.loc21, %.loc21_6.1 [template = i32] -// CHECK:STDOUT: %I.ref.loc21: type = name_ref I, file.%I.decl [template = constants.%.1] +// CHECK:STDOUT: %I.ref.loc21: type = name_ref I, file.%I.decl [template = constants.%I.type] // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @I { -// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self, 0 [symbolic = constants.%Self] +// CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self diff --git a/toolchain/check/testdata/impl/fail_todo_impl_assoc_const.carbon b/toolchain/check/testdata/impl/fail_todo_impl_assoc_const.carbon index daefe60cedb63..071af998f7caf 100644 --- a/toolchain/check/testdata/impl/fail_todo_impl_assoc_const.carbon +++ b/toolchain/check/testdata/impl/fail_todo_impl_assoc_const.carbon @@ -18,14 +18,14 @@ impl bool as I where .T = bool {} // CHECK:STDOUT: --- fail_todo_impl_assoc_const.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: type = interface_type @I [template] -// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self, 0 [symbolic] -// CHECK:STDOUT: %.2: type = assoc_entity_type %.1, type [template] -// CHECK:STDOUT: %.3: %.2 = assoc_entity element0, @I.%T [template] +// CHECK:STDOUT: %I.type: type = interface_type @I [template] +// CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic] +// CHECK:STDOUT: %.1: type = assoc_entity_type %I.type, type [template] +// CHECK:STDOUT: %.2: %.1 = assoc_entity element0, @I.%T [template] // CHECK:STDOUT: %Bool.type: type = fn_type @Bool [template] -// CHECK:STDOUT: %.4: type = tuple_type () [template] +// CHECK:STDOUT: %.3: type = tuple_type () [template] // CHECK:STDOUT: %Bool: %Bool.type = struct_value () [template] -// CHECK:STDOUT: %.Self: %.1 = bind_symbolic_name .Self, 0 [symbolic] +// CHECK:STDOUT: %.Self: %I.type = bind_symbolic_name .Self, 0 [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -49,26 +49,26 @@ impl bool as I where .T = bool {} // CHECK:STDOUT: .I = %I.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %I.decl: type = interface_decl @I [template = constants.%.1] {} {} +// CHECK:STDOUT: %I.decl: type = interface_decl @I [template = constants.%I.type] {} {} // CHECK:STDOUT: impl_decl @impl [template] {} { // CHECK:STDOUT: %bool.make_type.loc16_6: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc16_6.1: type = value_of_initializer %bool.make_type.loc16_6 [template = bool] // CHECK:STDOUT: %.loc16_6.2: type = converted %bool.make_type.loc16_6, %.loc16_6.1 [template = bool] -// CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [template = constants.%.1] -// CHECK:STDOUT: %.Self: %.1 = bind_symbolic_name .Self, 0 [symbolic = constants.%.Self] -// CHECK:STDOUT: %.Self.ref: %.1 = name_ref .Self, %.Self [symbolic = constants.%.Self] -// CHECK:STDOUT: %T.ref: %.2 = name_ref T, @I.%.loc11 [template = constants.%.3] +// CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [template = constants.%I.type] +// CHECK:STDOUT: %.Self: %I.type = bind_symbolic_name .Self, 0 [symbolic = constants.%.Self] +// CHECK:STDOUT: %.Self.ref: %I.type = name_ref .Self, %.Self [symbolic = constants.%.Self] +// CHECK:STDOUT: %T.ref: %.1 = name_ref T, @I.%.loc11 [template = constants.%.2] // CHECK:STDOUT: %bool.make_type.loc16_27: init type = call constants.%Bool() [template = bool] -// CHECK:STDOUT: %.loc16_16: type = where_expr %.Self [template = constants.%.1] { +// CHECK:STDOUT: %.loc16_16: type = where_expr %.Self [template = constants.%I.type] { // CHECK:STDOUT: requirement_rewrite %T.ref, %bool.make_type.loc16_27 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @I { -// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self, 0 [symbolic = constants.%Self] +// CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self] // CHECK:STDOUT: %T: type = assoc_const_decl T [template] -// CHECK:STDOUT: %.loc11: %.2 = assoc_entity element0, %T [template = constants.%.3] +// CHECK:STDOUT: %.loc11: %.1 = assoc_entity element0, %T [template = constants.%.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self diff --git a/toolchain/check/testdata/impl/impl_as.carbon b/toolchain/check/testdata/impl/impl_as.carbon index 30ec3a4e5c1e8..c4e87e4273cdc 100644 --- a/toolchain/check/testdata/impl/impl_as.carbon +++ b/toolchain/check/testdata/impl/impl_as.carbon @@ -24,20 +24,20 @@ class C { // CHECK:STDOUT: --- impl_as.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: type = interface_type @Simple [template] -// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self, 0 [symbolic] +// CHECK:STDOUT: %Simple.type: type = interface_type @Simple [template] +// CHECK:STDOUT: %Self: %Simple.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %F.type.1: type = fn_type @F.1 [template] -// CHECK:STDOUT: %.2: type = tuple_type () [template] +// CHECK:STDOUT: %.1: type = tuple_type () [template] // CHECK:STDOUT: %F.1: %F.type.1 = struct_value () [template] -// CHECK:STDOUT: %.3: type = assoc_entity_type %.1, %F.type.1 [template] -// CHECK:STDOUT: %.4: %.3 = assoc_entity element0, @Simple.%F.decl [template] +// CHECK:STDOUT: %.2: type = assoc_entity_type %Simple.type, %F.type.1 [template] +// CHECK:STDOUT: %.3: %.2 = assoc_entity element0, @Simple.%F.decl [template] // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %F.type.2: type = fn_type @F.2 [template] // CHECK:STDOUT: %F.2: %F.type.2 = struct_value () [template] -// CHECK:STDOUT: %.5: = interface_witness (%F.2) [template] -// CHECK:STDOUT: %.6: type = struct_type {} [template] -// CHECK:STDOUT: %.7: = complete_type_witness %.6 [template] -// CHECK:STDOUT: %.8: type = ptr_type %.6 [template] +// CHECK:STDOUT: %.4: = interface_witness (%F.2) [template] +// CHECK:STDOUT: %.5: type = struct_type {} [template] +// CHECK:STDOUT: %.6: = complete_type_witness %.5 [template] +// CHECK:STDOUT: %.7: type = ptr_type %.5 [template] // CHECK:STDOUT: %struct: %C = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -61,14 +61,14 @@ class C { // CHECK:STDOUT: .C = %C.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %Simple.decl: type = interface_decl @Simple [template = constants.%.1] {} {} +// CHECK:STDOUT: %Simple.decl: type = interface_decl @Simple [template = constants.%Simple.type] {} {} // CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {} {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @Simple { -// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self, 0 [symbolic = constants.%Self] +// CHECK:STDOUT: %Self: %Simple.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self] // CHECK:STDOUT: %F.decl: %F.type.1 = fn_decl @F.1 [template = constants.%F.1] {} {} -// CHECK:STDOUT: %.loc12: %.3 = assoc_entity element0, %F.decl [template = constants.%.4] +// CHECK:STDOUT: %.loc12: %.2 = assoc_entity element0, %F.decl [template = constants.%.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -78,7 +78,7 @@ class C { // CHECK:STDOUT: // CHECK:STDOUT: impl @impl: %Self.ref as %Simple.ref { // CHECK:STDOUT: %F.decl: %F.type.2 = fn_decl @F.2 [template = constants.%F.2] {} {} -// CHECK:STDOUT: %.loc16: = interface_witness (%F.decl) [template = constants.%.5] +// CHECK:STDOUT: %.loc16: = interface_witness (%F.decl) [template = constants.%.4] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %F.decl @@ -88,15 +88,15 @@ class C { // CHECK:STDOUT: class @C { // CHECK:STDOUT: impl_decl @impl [template] {} { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%C [template = constants.%C] -// CHECK:STDOUT: %Simple.ref: type = name_ref Simple, file.%Simple.decl [template = constants.%.1] +// CHECK:STDOUT: %Simple.ref: type = name_ref Simple, file.%Simple.decl [template = constants.%Simple.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc22: = complete_type_witness %.6 [template = constants.%.7] +// CHECK:STDOUT: %.loc22: = complete_type_witness %.5 [template = constants.%.6] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @F.1(@Simple.%Self: %.1) { +// CHECK:STDOUT: generic fn @F.1(@Simple.%Self: %Simple.type) { // CHECK:STDOUT: // CHECK:STDOUT: fn(); // CHECK:STDOUT: } @@ -106,7 +106,7 @@ class C { // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %c.var: ref %C = var c // CHECK:STDOUT: %c: ref %C = bind_name c, %c.var -// CHECK:STDOUT: %.loc19_19.1: %.6 = struct_literal () +// CHECK:STDOUT: %.loc19_19.1: %.5 = struct_literal () // CHECK:STDOUT: %.loc19_19.2: init %C = class_init (), %c.var [template = constants.%struct] // CHECK:STDOUT: %.loc19_20: init %C = converted %.loc19_19.1, %.loc19_19.2 [template = constants.%struct] // CHECK:STDOUT: assign %c.var, %.loc19_20 diff --git a/toolchain/check/testdata/impl/impl_forall.carbon b/toolchain/check/testdata/impl/impl_forall.carbon index fc96870385c4d..abe30adfd0bc1 100644 --- a/toolchain/check/testdata/impl/impl_forall.carbon +++ b/toolchain/check/testdata/impl/impl_forall.carbon @@ -19,17 +19,17 @@ impl forall [T:! type] T as Simple { // CHECK:STDOUT: --- impl_forall.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: type = interface_type @Simple [template] -// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self, 0 [symbolic] +// CHECK:STDOUT: %Simple.type: type = interface_type @Simple [template] +// CHECK:STDOUT: %Self: %Simple.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %F.type.1: type = fn_type @F.1 [template] -// CHECK:STDOUT: %.2: type = tuple_type () [template] +// CHECK:STDOUT: %.1: type = tuple_type () [template] // CHECK:STDOUT: %F.1: %F.type.1 = struct_value () [template] -// CHECK:STDOUT: %.3: type = assoc_entity_type %.1, %F.type.1 [template] -// CHECK:STDOUT: %.4: %.3 = assoc_entity element0, @Simple.%F.decl [template] +// CHECK:STDOUT: %.2: type = assoc_entity_type %Simple.type, %F.type.1 [template] +// CHECK:STDOUT: %.3: %.2 = assoc_entity element0, @Simple.%F.decl [template] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %F.type.2: type = fn_type @F.2 [template] // CHECK:STDOUT: %F.2: %F.type.2 = struct_value () [template] -// CHECK:STDOUT: %.5: = interface_witness (%F.2) [template] +// CHECK:STDOUT: %.4: = interface_witness (%F.2) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -51,21 +51,21 @@ impl forall [T:! type] T as Simple { // CHECK:STDOUT: .Simple = %Simple.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %Simple.decl: type = interface_decl @Simple [template = constants.%.1] {} {} +// CHECK:STDOUT: %Simple.decl: type = interface_decl @Simple [template = constants.%Simple.type] {} {} // CHECK:STDOUT: impl_decl @impl [template] { // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 // CHECK:STDOUT: } { // CHECK:STDOUT: %T.param: type = param T, runtime_param // CHECK:STDOUT: %T.loc15: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.1 (constants.%T)] // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc15 [symbolic = %T.1 (constants.%T)] -// CHECK:STDOUT: %Simple.ref: type = name_ref Simple, file.%Simple.decl [template = constants.%.1] +// CHECK:STDOUT: %Simple.ref: type = name_ref Simple, file.%Simple.decl [template = constants.%Simple.type] // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @Simple { -// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self, 0 [symbolic = constants.%Self] +// CHECK:STDOUT: %Self: %Simple.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self] // CHECK:STDOUT: %F.decl: %F.type.1 = fn_decl @F.1 [template = constants.%F.1] {} {} -// CHECK:STDOUT: %.loc12: %.3 = assoc_entity element0, %F.decl [template = constants.%.4] +// CHECK:STDOUT: %.loc12: %.2 = assoc_entity element0, %F.decl [template = constants.%.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -78,7 +78,7 @@ impl forall [T:! type] T as Simple { // CHECK:STDOUT: // CHECK:STDOUT: impl: %T.ref as %Simple.ref { // CHECK:STDOUT: %F.decl: %F.type.2 = fn_decl @F.2 [template = constants.%F.2] {} {} -// CHECK:STDOUT: %.loc15: = interface_witness (%F.decl) [template = constants.%.5] +// CHECK:STDOUT: %.loc15: = interface_witness (%F.decl) [template = constants.%.4] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %F.decl @@ -86,7 +86,7 @@ impl forall [T:! type] T as Simple { // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @F.1(@Simple.%Self: %.1) { +// CHECK:STDOUT: generic fn @F.1(@Simple.%Self: %Simple.type) { // CHECK:STDOUT: // CHECK:STDOUT: fn(); // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/impl/lookup/alias.carbon b/toolchain/check/testdata/impl/lookup/alias.carbon index b2b28a1ba5c0e..96214f8449aba 100644 --- a/toolchain/check/testdata/impl/lookup/alias.carbon +++ b/toolchain/check/testdata/impl/lookup/alias.carbon @@ -28,22 +28,22 @@ fn G(c: C) { // CHECK:STDOUT: --- alias.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: type = interface_type @HasF [template] -// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self, 0 [symbolic] +// CHECK:STDOUT: %HasF.type: type = interface_type @HasF [template] +// CHECK:STDOUT: %Self: %HasF.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %F.type.1: type = fn_type @F.1 [template] -// CHECK:STDOUT: %.2: type = tuple_type () [template] +// CHECK:STDOUT: %.1: type = tuple_type () [template] // CHECK:STDOUT: %F.1: %F.type.1 = struct_value () [template] -// CHECK:STDOUT: %.3: type = assoc_entity_type %.1, %F.type.1 [template] -// CHECK:STDOUT: %.4: %.3 = assoc_entity element0, @HasF.%F.decl [template] +// CHECK:STDOUT: %.2: type = assoc_entity_type %HasF.type, %F.type.1 [template] +// CHECK:STDOUT: %.3: %.2 = assoc_entity element0, @HasF.%F.decl [template] // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.5: type = struct_type {} [template] -// CHECK:STDOUT: %.6: = complete_type_witness %.5 [template] +// CHECK:STDOUT: %.4: type = struct_type {} [template] +// CHECK:STDOUT: %.5: = complete_type_witness %.4 [template] // CHECK:STDOUT: %F.type.2: type = fn_type @F.2 [template] // CHECK:STDOUT: %F.2: %F.type.2 = struct_value () [template] -// CHECK:STDOUT: %.7: = interface_witness (%F.2) [template] +// CHECK:STDOUT: %.6: = interface_witness (%F.2) [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %G: %G.type = struct_value () [template] -// CHECK:STDOUT: %.8: type = ptr_type %.5 [template] +// CHECK:STDOUT: %.7: type = ptr_type %.4 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -67,11 +67,11 @@ fn G(c: C) { // CHECK:STDOUT: .G = %G.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %HasF.decl: type = interface_decl @HasF [template = constants.%.1] {} {} +// CHECK:STDOUT: %HasF.decl: type = interface_decl @HasF [template = constants.%HasF.type] {} {} // CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {} {} // CHECK:STDOUT: impl_decl @impl [template] {} { // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %HasF.ref: type = name_ref HasF, file.%HasF.decl [template = constants.%.1] +// CHECK:STDOUT: %HasF.ref: type = name_ref HasF, file.%HasF.decl [template = constants.%HasF.type] // CHECK:STDOUT: } // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] { // CHECK:STDOUT: %c.patt: %C = binding_pattern c @@ -83,9 +83,9 @@ fn G(c: C) { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @HasF { -// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self, 0 [symbolic = constants.%Self] +// CHECK:STDOUT: %Self: %HasF.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self] // CHECK:STDOUT: %F.decl: %F.type.1 = fn_decl @F.1 [template = constants.%F.1] {} {} -// CHECK:STDOUT: %.loc12: %.3 = assoc_entity element0, %F.decl [template = constants.%.4] +// CHECK:STDOUT: %.loc12: %.2 = assoc_entity element0, %F.decl [template = constants.%.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -95,7 +95,7 @@ fn G(c: C) { // CHECK:STDOUT: // CHECK:STDOUT: impl @impl: %C.ref as %HasF.ref { // CHECK:STDOUT: %F.decl: %F.type.2 = fn_decl @F.2 [template = constants.%F.2] {} {} -// CHECK:STDOUT: %.loc19: = interface_witness (%F.decl) [template = constants.%.7] +// CHECK:STDOUT: %.loc19: = interface_witness (%F.decl) [template = constants.%.6] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %F.decl @@ -103,17 +103,17 @@ fn G(c: C) { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { -// CHECK:STDOUT: %HasF.ref: type = name_ref HasF, file.%HasF.decl [template = constants.%.1] -// CHECK:STDOUT: %F.ref: %.3 = name_ref F, @HasF.%.loc12 [template = constants.%.4] -// CHECK:STDOUT: %G: %.3 = bind_alias G, @HasF.%.loc12 [template = constants.%.4] -// CHECK:STDOUT: %.loc17: = complete_type_witness %.5 [template = constants.%.6] +// CHECK:STDOUT: %HasF.ref: type = name_ref HasF, file.%HasF.decl [template = constants.%HasF.type] +// CHECK:STDOUT: %F.ref: %.2 = name_ref F, @HasF.%.loc12 [template = constants.%.3] +// CHECK:STDOUT: %G: %.2 = bind_alias G, @HasF.%.loc12 [template = constants.%.3] +// CHECK:STDOUT: %.loc17: = complete_type_witness %.4 [template = constants.%.5] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C // CHECK:STDOUT: .G = %G // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @F.1(@HasF.%Self: %.1) { +// CHECK:STDOUT: generic fn @F.1(@HasF.%Self: %HasF.type) { // CHECK:STDOUT: // CHECK:STDOUT: fn(); // CHECK:STDOUT: } @@ -126,13 +126,13 @@ fn G(c: C) { // CHECK:STDOUT: fn @G(%c: %C) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %C.ref.loc24: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %G.ref.loc24: %.3 = name_ref G, @C.%G [template = constants.%.4] -// CHECK:STDOUT: %.loc24: %F.type.1 = interface_witness_access constants.%.7, element0 [template = constants.%F.2] -// CHECK:STDOUT: %F.call.loc24: init %.2 = call %.loc24() +// CHECK:STDOUT: %G.ref.loc24: %.2 = name_ref G, @C.%G [template = constants.%.3] +// CHECK:STDOUT: %.loc24: %F.type.1 = interface_witness_access constants.%.6, element0 [template = constants.%F.2] +// CHECK:STDOUT: %F.call.loc24: init %.1 = call %.loc24() // CHECK:STDOUT: %c.ref: %C = name_ref c, %c -// CHECK:STDOUT: %G.ref.loc25: %.3 = name_ref G, @C.%G [template = constants.%.4] -// CHECK:STDOUT: %.loc25: %F.type.1 = interface_witness_access constants.%.7, element0 [template = constants.%F.2] -// CHECK:STDOUT: %F.call.loc25: init %.2 = call %.loc25() +// CHECK:STDOUT: %G.ref.loc25: %.2 = name_ref G, @C.%G [template = constants.%.3] +// CHECK:STDOUT: %.loc25: %F.type.1 = interface_witness_access constants.%.6, element0 [template = constants.%F.2] +// CHECK:STDOUT: %F.call.loc25: init %.1 = call %.loc25() // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/impl/lookup/fail_alias_impl_not_found.carbon b/toolchain/check/testdata/impl/lookup/fail_alias_impl_not_found.carbon index d71d4ef374253..22b9c7060b412 100644 --- a/toolchain/check/testdata/impl/lookup/fail_alias_impl_not_found.carbon +++ b/toolchain/check/testdata/impl/lookup/fail_alias_impl_not_found.carbon @@ -31,19 +31,19 @@ fn F(c: C) { // CHECK:STDOUT: --- fail_alias_impl_not_found.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: type = interface_type @I [template] -// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self, 0 [symbolic] +// CHECK:STDOUT: %I.type: type = interface_type @I [template] +// CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %F.type.1: type = fn_type @F.1 [template] -// CHECK:STDOUT: %.2: type = tuple_type () [template] +// CHECK:STDOUT: %.1: type = tuple_type () [template] // CHECK:STDOUT: %F.1: %F.type.1 = struct_value () [template] -// CHECK:STDOUT: %.3: type = assoc_entity_type %.1, %F.type.1 [template] -// CHECK:STDOUT: %.4: %.3 = assoc_entity element0, @I.%F.decl [template] +// CHECK:STDOUT: %.2: type = assoc_entity_type %I.type, %F.type.1 [template] +// CHECK:STDOUT: %.3: %.2 = assoc_entity element0, @I.%F.decl [template] // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.5: type = struct_type {} [template] -// CHECK:STDOUT: %.6: = complete_type_witness %.5 [template] +// CHECK:STDOUT: %.4: type = struct_type {} [template] +// CHECK:STDOUT: %.5: = complete_type_witness %.4 [template] // CHECK:STDOUT: %F.type.2: type = fn_type @F.2 [template] // CHECK:STDOUT: %F.2: %F.type.2 = struct_value () [template] -// CHECK:STDOUT: %.7: type = ptr_type %.5 [template] +// CHECK:STDOUT: %.6: type = ptr_type %.4 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -67,7 +67,7 @@ fn F(c: C) { // CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %I.decl: type = interface_decl @I [template = constants.%.1] {} {} +// CHECK:STDOUT: %I.decl: type = interface_decl @I [template = constants.%I.type] {} {} // CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {} {} // CHECK:STDOUT: %F.decl: %F.type.2 = fn_decl @F.2 [template = constants.%F.2] { // CHECK:STDOUT: %c.patt: %C = binding_pattern c @@ -79,9 +79,9 @@ fn F(c: C) { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @I { -// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self, 0 [symbolic = constants.%Self] +// CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self] // CHECK:STDOUT: %F.decl: %F.type.1 = fn_decl @F.1 [template = constants.%F.1] {} {} -// CHECK:STDOUT: %.loc12: %.3 = assoc_entity element0, %F.decl [template = constants.%.4] +// CHECK:STDOUT: %.loc12: %.2 = assoc_entity element0, %F.decl [template = constants.%.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -90,17 +90,17 @@ fn F(c: C) { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { -// CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [template = constants.%.1] -// CHECK:STDOUT: %F.ref: %.3 = name_ref F, @I.%.loc12 [template = constants.%.4] -// CHECK:STDOUT: %F: %.3 = bind_alias F, @I.%.loc12 [template = constants.%.4] -// CHECK:STDOUT: %.loc17: = complete_type_witness %.5 [template = constants.%.6] +// CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [template = constants.%I.type] +// CHECK:STDOUT: %F.ref: %.2 = name_ref F, @I.%.loc12 [template = constants.%.3] +// CHECK:STDOUT: %F: %.2 = bind_alias F, @I.%.loc12 [template = constants.%.3] +// CHECK:STDOUT: %.loc17: = complete_type_witness %.4 [template = constants.%.5] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C // CHECK:STDOUT: .F = %F // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @F.1(@I.%Self: %.1) { +// CHECK:STDOUT: generic fn @F.1(@I.%Self: %I.type) { // CHECK:STDOUT: // CHECK:STDOUT: fn(); // CHECK:STDOUT: } @@ -108,9 +108,9 @@ fn F(c: C) { // CHECK:STDOUT: fn @F.2(%c: %C) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %C.ref.loc24: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %F.ref.loc24: %.3 = name_ref F, @C.%F [template = constants.%.4] +// CHECK:STDOUT: %F.ref.loc24: %.2 = name_ref F, @C.%F [template = constants.%.3] // CHECK:STDOUT: %c.ref: %C = name_ref c, %c -// CHECK:STDOUT: %F.ref.loc28: %.3 = name_ref F, @C.%F [template = constants.%.4] +// CHECK:STDOUT: %F.ref.loc28: %.2 = name_ref F, @C.%F [template = constants.%.3] // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/impl/lookup/fail_todo_undefined_impl.carbon b/toolchain/check/testdata/impl/lookup/fail_todo_undefined_impl.carbon index a4176522d9a9b..55c851b77ad13 100644 --- a/toolchain/check/testdata/impl/lookup/fail_todo_undefined_impl.carbon +++ b/toolchain/check/testdata/impl/lookup/fail_todo_undefined_impl.carbon @@ -31,24 +31,24 @@ impl C as I { // CHECK:STDOUT: --- fail_todo_undefined_impl.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: type = interface_type @I [template] -// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self, 0 [symbolic] +// CHECK:STDOUT: %I.type: type = interface_type @I [template] +// CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %F.type.1: type = fn_type @F.1 [template] -// CHECK:STDOUT: %.2: type = tuple_type () [template] +// CHECK:STDOUT: %.1: type = tuple_type () [template] // CHECK:STDOUT: %F.1: %F.type.1 = struct_value () [template] -// CHECK:STDOUT: %.3: type = assoc_entity_type %.1, %F.type.1 [template] -// CHECK:STDOUT: %.4: %.3 = assoc_entity element0, @I.%F.decl [template] +// CHECK:STDOUT: %.2: type = assoc_entity_type %I.type, %F.type.1 [template] +// CHECK:STDOUT: %.3: %.2 = assoc_entity element0, @I.%F.decl [template] // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.5: type = struct_type {} [template] -// CHECK:STDOUT: %.6: = complete_type_witness %.5 [template] +// CHECK:STDOUT: %.4: type = struct_type {} [template] +// CHECK:STDOUT: %.5: = complete_type_witness %.4 [template] // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %F.type.2: type = fn_type @F.2 [template] // CHECK:STDOUT: %F.2: %F.type.2 = struct_value () [template] -// CHECK:STDOUT: %.7: type = ptr_type %.5 [template] +// CHECK:STDOUT: %.6: type = ptr_type %.4 [template] // CHECK:STDOUT: %F.type.3: type = fn_type @F.3 [template] // CHECK:STDOUT: %F.3: %F.type.3 = struct_value () [template] -// CHECK:STDOUT: %.8: = interface_witness (%F.3) [template] +// CHECK:STDOUT: %.7: = interface_witness (%F.3) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -74,7 +74,7 @@ impl C as I { // CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %I.decl: type = interface_decl @I [template = constants.%.1] {} {} +// CHECK:STDOUT: %I.decl: type = interface_decl @I [template = constants.%I.type] {} {} // CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {} {} // CHECK:STDOUT: %F.decl: %F.type.2 = fn_decl @F.2 [template = constants.%F.2] {} { // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] @@ -84,14 +84,14 @@ impl C as I { // CHECK:STDOUT: } // CHECK:STDOUT: impl_decl @impl.2 [template] {} { // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [template = constants.%.1] +// CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [template = constants.%I.type] // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @I { -// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self, 0 [symbolic = constants.%Self] +// CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self] // CHECK:STDOUT: %F.decl: %F.type.1 = fn_decl @F.1 [template = constants.%F.1] {} {} -// CHECK:STDOUT: %.loc12: %.3 = assoc_entity element0, %F.decl [template = constants.%.4] +// CHECK:STDOUT: %.loc12: %.2 = assoc_entity element0, %F.decl [template = constants.%.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -103,7 +103,7 @@ impl C as I { // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.2: %C.ref as %I.ref { // CHECK:STDOUT: %F.decl: %F.type.3 = fn_decl @F.3 [template = constants.%F.3] {} {} -// CHECK:STDOUT: %.loc27: = interface_witness (%F.decl) [template = constants.%.8] +// CHECK:STDOUT: %.loc27: = interface_witness (%F.decl) [template = constants.%.7] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %F.decl @@ -113,16 +113,16 @@ impl C as I { // CHECK:STDOUT: class @C { // CHECK:STDOUT: impl_decl @impl.1 [template] {} { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%C [template = constants.%C] -// CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [template = constants.%.1] +// CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [template = constants.%I.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc17: = complete_type_witness %.5 [template = constants.%.6] +// CHECK:STDOUT: %.loc17: = complete_type_witness %.4 [template = constants.%.5] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C // CHECK:STDOUT: extend name_scope2 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @F.1(@I.%Self: %.1) { +// CHECK:STDOUT: generic fn @F.1(@I.%Self: %I.type) { // CHECK:STDOUT: // CHECK:STDOUT: fn(); // CHECK:STDOUT: } @@ -132,7 +132,7 @@ impl C as I { // CHECK:STDOUT: fn @F.2() -> i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %F.ref: %.3 = name_ref F, @I.%.loc12 [template = constants.%.4] +// CHECK:STDOUT: %F.ref: %.2 = name_ref F, @I.%.loc12 [template = constants.%.3] // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/impl/lookup/import.carbon b/toolchain/check/testdata/impl/lookup/import.carbon index e3876d972479a..bf1d0e166ef0d 100644 --- a/toolchain/check/testdata/impl/lookup/import.carbon +++ b/toolchain/check/testdata/impl/lookup/import.carbon @@ -33,19 +33,19 @@ fn G(c: Impl.C) { // CHECK:STDOUT: --- impl.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: type = interface_type @HasF [template] -// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self, 0 [symbolic] +// CHECK:STDOUT: %HasF.type: type = interface_type @HasF [template] +// CHECK:STDOUT: %Self: %HasF.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %F.type.1: type = fn_type @F.1 [template] -// CHECK:STDOUT: %.2: type = tuple_type () [template] +// CHECK:STDOUT: %.1: type = tuple_type () [template] // CHECK:STDOUT: %F.1: %F.type.1 = struct_value () [template] -// CHECK:STDOUT: %.3: type = assoc_entity_type %.1, %F.type.1 [template] -// CHECK:STDOUT: %.4: %.3 = assoc_entity element0, @HasF.%F.decl [template] +// CHECK:STDOUT: %.2: type = assoc_entity_type %HasF.type, %F.type.1 [template] +// CHECK:STDOUT: %.3: %.2 = assoc_entity element0, @HasF.%F.decl [template] // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.5: type = struct_type {} [template] -// CHECK:STDOUT: %.6: = complete_type_witness %.5 [template] +// CHECK:STDOUT: %.4: type = struct_type {} [template] +// CHECK:STDOUT: %.5: = complete_type_witness %.4 [template] // CHECK:STDOUT: %F.type.2: type = fn_type @F.2 [template] // CHECK:STDOUT: %F.2: %F.type.2 = struct_value () [template] -// CHECK:STDOUT: %.7: = interface_witness (%F.2) [template] +// CHECK:STDOUT: %.6: = interface_witness (%F.2) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -68,18 +68,18 @@ fn G(c: Impl.C) { // CHECK:STDOUT: .C = %C.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %HasF.decl: type = interface_decl @HasF [template = constants.%.1] {} {} +// CHECK:STDOUT: %HasF.decl: type = interface_decl @HasF [template = constants.%HasF.type] {} {} // CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {} {} // CHECK:STDOUT: impl_decl @impl [template] {} { // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %HasF.ref: type = name_ref HasF, file.%HasF.decl [template = constants.%.1] +// CHECK:STDOUT: %HasF.ref: type = name_ref HasF, file.%HasF.decl [template = constants.%HasF.type] // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @HasF { -// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self, 0 [symbolic = constants.%Self] +// CHECK:STDOUT: %Self: %HasF.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self] // CHECK:STDOUT: %F.decl: %F.type.1 = fn_decl @F.1 [template = constants.%F.1] {} {} -// CHECK:STDOUT: %.loc5: %.3 = assoc_entity element0, %F.decl [template = constants.%.4] +// CHECK:STDOUT: %.loc5: %.2 = assoc_entity element0, %F.decl [template = constants.%.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -89,7 +89,7 @@ fn G(c: Impl.C) { // CHECK:STDOUT: // CHECK:STDOUT: impl @impl: %C.ref as %HasF.ref { // CHECK:STDOUT: %F.decl: %F.type.2 = fn_decl @F.2 [template = constants.%F.2] {} {} -// CHECK:STDOUT: %.loc10: = interface_witness (%F.decl) [template = constants.%.7] +// CHECK:STDOUT: %.loc10: = interface_witness (%F.decl) [template = constants.%.6] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %F.decl @@ -97,13 +97,13 @@ fn G(c: Impl.C) { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { -// CHECK:STDOUT: %.loc8: = complete_type_witness %.5 [template = constants.%.6] +// CHECK:STDOUT: %.loc8: = complete_type_witness %.4 [template = constants.%.5] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @F.1(@HasF.%Self: %.1) { +// CHECK:STDOUT: generic fn @F.1(@HasF.%Self: %HasF.type) { // CHECK:STDOUT: // CHECK:STDOUT: fn(); // CHECK:STDOUT: } @@ -120,22 +120,22 @@ fn G(c: Impl.C) { // CHECK:STDOUT: --- use.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: type = interface_type @HasF [template] -// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self, 0 [symbolic] +// CHECK:STDOUT: %HasF.type: type = interface_type @HasF [template] +// CHECK:STDOUT: %Self: %HasF.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.2: type = struct_type {} [template] -// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] +// CHECK:STDOUT: %.1: type = struct_type {} [template] +// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] -// CHECK:STDOUT: %.4: type = tuple_type () [template] +// CHECK:STDOUT: %.3: type = tuple_type () [template] // CHECK:STDOUT: %G: %G.type = struct_value () [template] -// CHECK:STDOUT: %.5: type = ptr_type %.2 [template] +// CHECK:STDOUT: %.4: type = ptr_type %.1 [template] // CHECK:STDOUT: %F.type.1: type = fn_type @F.1 [template] // CHECK:STDOUT: %F.1: %F.type.1 = struct_value () [template] -// CHECK:STDOUT: %.6: type = assoc_entity_type %.1, %F.type.1 [template] -// CHECK:STDOUT: %.7: %.6 = assoc_entity element0, imports.%import_ref.10 [template] +// CHECK:STDOUT: %.5: type = assoc_entity_type %HasF.type, %F.type.1 [template] +// CHECK:STDOUT: %.6: %.5 = assoc_entity element0, imports.%import_ref.10 [template] // CHECK:STDOUT: %F.type.2: type = fn_type @F.2 [template] // CHECK:STDOUT: %F.2: %F.type.2 = struct_value () [template] -// CHECK:STDOUT: %.8: = interface_witness (%F.2) [template] +// CHECK:STDOUT: %.7: = interface_witness (%F.2) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -155,14 +155,14 @@ fn G(c: Impl.C) { // CHECK:STDOUT: import Impl//default // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.1 = import_ref Impl//default, inst+5, unloaded -// CHECK:STDOUT: %import_ref.2: %.6 = import_ref Impl//default, inst+12, loaded [template = constants.%.7] +// CHECK:STDOUT: %import_ref.2: %.5 = import_ref Impl//default, inst+12, loaded [template = constants.%.6] // CHECK:STDOUT: %import_ref.3 = import_ref Impl//default, inst+7, unloaded // CHECK:STDOUT: %import_ref.4 = import_ref Impl//default, inst+15, unloaded // CHECK:STDOUT: %import_ref.5: type = import_ref Impl//default, inst+19, loaded [template = constants.%C] -// CHECK:STDOUT: %import_ref.6: type = import_ref Impl//default, inst+20, loaded [template = constants.%.1] -// CHECK:STDOUT: %import_ref.7: = import_ref Impl//default, inst+25, loaded [template = constants.%.8] +// CHECK:STDOUT: %import_ref.6: type = import_ref Impl//default, inst+20, loaded [template = constants.%HasF.type] +// CHECK:STDOUT: %import_ref.7: = import_ref Impl//default, inst+25, loaded [template = constants.%.7] // CHECK:STDOUT: %import_ref.8: type = import_ref Impl//default, inst+14, loaded [template = constants.%C] -// CHECK:STDOUT: %import_ref.9: type = import_ref Impl//default, inst+3, loaded [template = constants.%.1] +// CHECK:STDOUT: %import_ref.9: type = import_ref Impl//default, inst+3, loaded [template = constants.%HasF.type] // CHECK:STDOUT: %import_ref.10 = import_ref Impl//default, inst+7, unloaded // CHECK:STDOUT: } // CHECK:STDOUT: @@ -205,14 +205,14 @@ fn G(c: Impl.C) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %c.ref: %C = name_ref c, %c // CHECK:STDOUT: %Impl.ref.loc5: = name_ref Impl, imports.%Impl [template = imports.%Impl] -// CHECK:STDOUT: %HasF.ref: type = name_ref HasF, imports.%import_ref.9 [template = constants.%.1] -// CHECK:STDOUT: %F.ref: %.6 = name_ref F, imports.%import_ref.2 [template = constants.%.7] -// CHECK:STDOUT: %.loc5: %F.type.1 = interface_witness_access constants.%.8, element0 [template = constants.%F.2] -// CHECK:STDOUT: %F.call: init %.4 = call %.loc5() +// CHECK:STDOUT: %HasF.ref: type = name_ref HasF, imports.%import_ref.9 [template = constants.%HasF.type] +// CHECK:STDOUT: %F.ref: %.5 = name_ref F, imports.%import_ref.2 [template = constants.%.6] +// CHECK:STDOUT: %.loc5: %F.type.1 = interface_witness_access constants.%.7, element0 [template = constants.%F.2] +// CHECK:STDOUT: %F.call: init %.3 = call %.loc5() // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @F.1(constants.%Self: %.1) { +// CHECK:STDOUT: generic fn @F.1(constants.%Self: %HasF.type) { // CHECK:STDOUT: // CHECK:STDOUT: fn(); // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/impl/lookup/instance_method.carbon b/toolchain/check/testdata/impl/lookup/instance_method.carbon index 01ac383acb589..74f0bf0b1c06a 100644 --- a/toolchain/check/testdata/impl/lookup/instance_method.carbon +++ b/toolchain/check/testdata/impl/lookup/instance_method.carbon @@ -28,23 +28,23 @@ fn F(c: C) -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.1: type = interface_type @I [template] -// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self, 0 [symbolic] +// CHECK:STDOUT: %I.type: type = interface_type @I [template] +// CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] -// CHECK:STDOUT: %.2: type = tuple_type () [template] +// CHECK:STDOUT: %.1: type = tuple_type () [template] // CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %F.type.1: type = fn_type @F.1 [template] // CHECK:STDOUT: %F.1: %F.type.1 = struct_value () [template] -// CHECK:STDOUT: %.3: type = assoc_entity_type %.1, %F.type.1 [template] -// CHECK:STDOUT: %.4: %.3 = assoc_entity element0, @I.%F.decl [template] +// CHECK:STDOUT: %.2: type = assoc_entity_type %I.type, %F.type.1 [template] +// CHECK:STDOUT: %.3: %.2 = assoc_entity element0, @I.%F.decl [template] // CHECK:STDOUT: %F.type.2: type = fn_type @F.2 [template] // CHECK:STDOUT: %F.2: %F.type.2 = struct_value () [template] -// CHECK:STDOUT: %.5: = interface_witness (%F.2) [template] -// CHECK:STDOUT: %.6: type = struct_type {} [template] -// CHECK:STDOUT: %.7: = complete_type_witness %.6 [template] +// CHECK:STDOUT: %.4: = interface_witness (%F.2) [template] +// CHECK:STDOUT: %.5: type = struct_type {} [template] +// CHECK:STDOUT: %.6: = complete_type_witness %.5 [template] // CHECK:STDOUT: %F.type.3: type = fn_type @F.3 [template] // CHECK:STDOUT: %F.3: %F.type.3 = struct_value () [template] -// CHECK:STDOUT: %.8: type = ptr_type %.6 [template] +// CHECK:STDOUT: %.7: type = ptr_type %.5 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -71,7 +71,7 @@ fn F(c: C) -> i32 { // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %C.decl.loc11: type = class_decl @C [template = constants.%C] {} {} -// CHECK:STDOUT: %I.decl: type = interface_decl @I [template = constants.%.1] {} {} +// CHECK:STDOUT: %I.decl: type = interface_decl @I [template = constants.%I.type] {} {} // CHECK:STDOUT: %C.decl.loc17: type = class_decl @C [template = constants.%C] {} {} // CHECK:STDOUT: %F.decl: %F.type.3 = fn_decl @F.3 [template = constants.%F.3] { // CHECK:STDOUT: %c.patt: %C = binding_pattern c @@ -87,11 +87,11 @@ fn F(c: C) -> i32 { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @I { -// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self, 0 [symbolic = constants.%Self] +// CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self] // CHECK:STDOUT: %F.decl: %F.type.1 = fn_decl @F.1 [template = constants.%F.1] { // CHECK:STDOUT: %self.patt: @F.1.%Self (%Self) = binding_pattern self // CHECK:STDOUT: } { -// CHECK:STDOUT: %Self.ref: %.1 = name_ref Self, @I.%Self [symbolic = %Self (constants.%Self)] +// CHECK:STDOUT: %Self.ref: %I.type = name_ref Self, @I.%Self [symbolic = %Self (constants.%Self)] // CHECK:STDOUT: %.loc14_14.1: type = facet_type_access %Self.ref [symbolic = %Self (constants.%Self)] // CHECK:STDOUT: %.loc14_14.2: type = converted %Self.ref, %.loc14_14.1 [symbolic = %Self (constants.%Self)] // CHECK:STDOUT: %self.param: @F.1.%Self (%Self) = param self, runtime_param0 @@ -101,7 +101,7 @@ fn F(c: C) -> i32 { // CHECK:STDOUT: %.loc14_25.2: type = converted %int.make_type_32, %.loc14_25.1 [template = i32] // CHECK:STDOUT: %return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc14: %.3 = assoc_entity element0, %F.decl [template = constants.%.4] +// CHECK:STDOUT: %.loc14: %.2 = assoc_entity element0, %F.decl [template = constants.%.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -121,7 +121,7 @@ fn F(c: C) -> i32 { // CHECK:STDOUT: %.loc19_27.2: type = converted %int.make_type_32, %.loc19_27.1 [template = i32] // CHECK:STDOUT: %return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc18: = interface_witness (%F.decl) [template = constants.%.5] +// CHECK:STDOUT: %.loc18: = interface_witness (%F.decl) [template = constants.%.4] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %F.decl @@ -131,9 +131,9 @@ fn F(c: C) -> i32 { // CHECK:STDOUT: class @C { // CHECK:STDOUT: impl_decl @impl [template] {} { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%C [template = constants.%C] -// CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [template = constants.%.1] +// CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [template = constants.%I.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc21: = complete_type_witness %.6 [template = constants.%.7] +// CHECK:STDOUT: %.loc21: = complete_type_witness %.5 [template = constants.%.6] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C @@ -142,8 +142,8 @@ fn F(c: C) -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32"; // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @F.1(@I.%Self: %.1) { -// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self)] +// CHECK:STDOUT: generic fn @F.1(@I.%Self: %I.type) { +// CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self)] // CHECK:STDOUT: // CHECK:STDOUT: fn[%self: @F.1.%Self (%Self)]() -> i32; // CHECK:STDOUT: } @@ -153,8 +153,8 @@ fn F(c: C) -> i32 { // CHECK:STDOUT: fn @F.3(%c: %C) -> i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %c.ref: %C = name_ref c, %c -// CHECK:STDOUT: %F.ref: %.3 = name_ref F, @I.%.loc14 [template = constants.%.4] -// CHECK:STDOUT: %.loc24_11.1: %F.type.1 = interface_witness_access constants.%.5, element0 [template = constants.%F.2] +// CHECK:STDOUT: %F.ref: %.2 = name_ref F, @I.%.loc14 [template = constants.%.3] +// CHECK:STDOUT: %.loc24_11.1: %F.type.1 = interface_witness_access constants.%.4, element0 [template = constants.%F.2] // CHECK:STDOUT: %.loc24_11.2: = bound_method %c.ref, %.loc24_11.1 // CHECK:STDOUT: %F.call: init i32 = call %.loc24_11.2(%c.ref) // CHECK:STDOUT: %.loc24_15.1: i32 = value_of_initializer %F.call diff --git a/toolchain/check/testdata/impl/lookup/no_prelude/impl_forall.carbon b/toolchain/check/testdata/impl/lookup/no_prelude/impl_forall.carbon index 34d8856bf4cd2..e9fd8d4a19ac4 100644 --- a/toolchain/check/testdata/impl/lookup/no_prelude/impl_forall.carbon +++ b/toolchain/check/testdata/impl/lookup/no_prelude/impl_forall.carbon @@ -51,55 +51,55 @@ fn TestSpecific(a: A({})) -> {} { // CHECK:STDOUT: %.3: type = struct_type {.n: %T} [symbolic] // CHECK:STDOUT: %.4: = complete_type_witness %.3 [symbolic] // CHECK:STDOUT: %U: type = bind_symbolic_name U, 0 [symbolic] -// CHECK:STDOUT: %I.type: type = generic_interface_type @I [template] -// CHECK:STDOUT: %I: %I.type = struct_value () [template] -// CHECK:STDOUT: %.5: type = interface_type @I, @I(%U) [symbolic] -// CHECK:STDOUT: %Self: %.5 = bind_symbolic_name Self, 1 [symbolic] +// CHECK:STDOUT: %I.type.1: type = generic_interface_type @I [template] +// CHECK:STDOUT: %I: %I.type.1 = struct_value () [template] +// CHECK:STDOUT: %I.type.2: type = interface_type @I, @I(%U) [symbolic] +// CHECK:STDOUT: %Self: %I.type.2 = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: %F.type.1: type = fn_type @F.1, @I(%U) [symbolic] // CHECK:STDOUT: %F.1: %F.type.1 = struct_value () [symbolic] -// CHECK:STDOUT: %.6: type = assoc_entity_type %.5, %F.type.1 [symbolic] -// CHECK:STDOUT: %.7: %.6 = assoc_entity element0, @I.%F.decl [symbolic] +// CHECK:STDOUT: %.5: type = assoc_entity_type %I.type.2, %F.type.1 [symbolic] +// CHECK:STDOUT: %.6: %.5 = assoc_entity element0, @I.%F.decl [symbolic] // CHECK:STDOUT: %V: type = bind_symbolic_name V, 0 [symbolic] // CHECK:STDOUT: %A.3: type = class_type @A, @A(%V) [symbolic] -// CHECK:STDOUT: %.8: type = interface_type @I, @I(%V) [symbolic] +// CHECK:STDOUT: %I.type.3: type = interface_type @I, @I(%V) [symbolic] // CHECK:STDOUT: %F.type.2: type = fn_type @F.2 [template] // CHECK:STDOUT: %F.2: %F.type.2 = struct_value () [template] // CHECK:STDOUT: %F.type.3: type = fn_type @F.1, @I(%V) [symbolic] // CHECK:STDOUT: %F.3: %F.type.3 = struct_value () [symbolic] -// CHECK:STDOUT: %.9: type = assoc_entity_type %.8, %F.type.3 [symbolic] -// CHECK:STDOUT: %.10: %.9 = assoc_entity element0, @I.%F.decl [symbolic] -// CHECK:STDOUT: %.11: = interface_witness (%F.2) [template] -// CHECK:STDOUT: %.12: type = unbound_element_type %A.3, %V [symbolic] -// CHECK:STDOUT: %.13: type = struct_type {.n: %V} [symbolic] -// CHECK:STDOUT: %.14: = complete_type_witness %.13 [symbolic] -// CHECK:STDOUT: %.15: type = ptr_type %.13 [symbolic] +// CHECK:STDOUT: %.7: type = assoc_entity_type %I.type.3, %F.type.3 [symbolic] +// CHECK:STDOUT: %.8: %.7 = assoc_entity element0, @I.%F.decl [symbolic] +// CHECK:STDOUT: %.9: = interface_witness (%F.2) [template] +// CHECK:STDOUT: %.10: type = unbound_element_type %A.3, %V [symbolic] +// CHECK:STDOUT: %.11: type = struct_type {.n: %V} [symbolic] +// CHECK:STDOUT: %.12: = complete_type_witness %.11 [symbolic] +// CHECK:STDOUT: %.13: type = ptr_type %.11 [symbolic] // CHECK:STDOUT: %W: type = bind_symbolic_name W, 0 [symbolic] // CHECK:STDOUT: %A.4: type = class_type @A, @A(%W) [symbolic] // CHECK:STDOUT: %TestGeneric.type: type = fn_type @TestGeneric [template] // CHECK:STDOUT: %TestGeneric: %TestGeneric.type = struct_value () [template] -// CHECK:STDOUT: %.16: type = unbound_element_type %A.4, %W [symbolic] -// CHECK:STDOUT: %.17: type = struct_type {.n: %W} [symbolic] -// CHECK:STDOUT: %.18: = complete_type_witness %.17 [symbolic] -// CHECK:STDOUT: %.19: type = ptr_type %.17 [symbolic] -// CHECK:STDOUT: %.20: type = interface_type @I, @I(%W) [symbolic] +// CHECK:STDOUT: %.14: type = unbound_element_type %A.4, %W [symbolic] +// CHECK:STDOUT: %.15: type = struct_type {.n: %W} [symbolic] +// CHECK:STDOUT: %.16: = complete_type_witness %.15 [symbolic] +// CHECK:STDOUT: %.17: type = ptr_type %.15 [symbolic] +// CHECK:STDOUT: %I.type.4: type = interface_type @I, @I(%W) [symbolic] // CHECK:STDOUT: %F.type.4: type = fn_type @F.1, @I(%W) [symbolic] // CHECK:STDOUT: %F.4: %F.type.4 = struct_value () [symbolic] -// CHECK:STDOUT: %.21: type = assoc_entity_type %.20, %F.type.4 [symbolic] -// CHECK:STDOUT: %.22: %.21 = assoc_entity element0, @I.%F.decl [symbolic] -// CHECK:STDOUT: %.23: type = struct_type {} [template] -// CHECK:STDOUT: %A.5: type = class_type @A, @A(%.23) [template] +// CHECK:STDOUT: %.18: type = assoc_entity_type %I.type.4, %F.type.4 [symbolic] +// CHECK:STDOUT: %.19: %.18 = assoc_entity element0, @I.%F.decl [symbolic] +// CHECK:STDOUT: %.20: type = struct_type {} [template] +// CHECK:STDOUT: %A.5: type = class_type @A, @A(%.20) [template] // CHECK:STDOUT: %TestSpecific.type: type = fn_type @TestSpecific [template] // CHECK:STDOUT: %TestSpecific: %TestSpecific.type = struct_value () [template] -// CHECK:STDOUT: %.24: type = unbound_element_type %A.5, %.23 [template] -// CHECK:STDOUT: %.25: type = struct_type {.n: %.23} [template] -// CHECK:STDOUT: %.26: = complete_type_witness %.25 [template] -// CHECK:STDOUT: %.27: type = struct_type {.n: %.1} [template] -// CHECK:STDOUT: %.28: type = ptr_type %.25 [template] -// CHECK:STDOUT: %.29: type = interface_type @I, @I(%.23) [template] -// CHECK:STDOUT: %F.type.5: type = fn_type @F.1, @I(%.23) [template] +// CHECK:STDOUT: %.21: type = unbound_element_type %A.5, %.20 [template] +// CHECK:STDOUT: %.22: type = struct_type {.n: %.20} [template] +// CHECK:STDOUT: %.23: = complete_type_witness %.22 [template] +// CHECK:STDOUT: %.24: type = struct_type {.n: %.1} [template] +// CHECK:STDOUT: %.25: type = ptr_type %.22 [template] +// CHECK:STDOUT: %I.type.5: type = interface_type @I, @I(%.20) [template] +// CHECK:STDOUT: %F.type.5: type = fn_type @F.1, @I(%.20) [template] // CHECK:STDOUT: %F.5: %F.type.5 = struct_value () [template] -// CHECK:STDOUT: %.30: type = assoc_entity_type %.29, %F.type.5 [template] -// CHECK:STDOUT: %.31: %.30 = assoc_entity element0, @I.%F.decl [template] +// CHECK:STDOUT: %.26: type = assoc_entity_type %I.type.5, %F.type.5 [template] +// CHECK:STDOUT: %.27: %.26 = assoc_entity element0, @I.%F.decl [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -115,7 +115,7 @@ fn TestSpecific(a: A({})) -> {} { // CHECK:STDOUT: %T.param: type = param T, runtime_param // CHECK:STDOUT: %T.loc2: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.1 (constants.%T)] // CHECK:STDOUT: } -// CHECK:STDOUT: %I.decl: %I.type = interface_decl @I [template = constants.%I] { +// CHECK:STDOUT: %I.decl: %I.type.1 = interface_decl @I [template = constants.%I] { // CHECK:STDOUT: %U.patt: type = symbolic_binding_pattern U, 0 // CHECK:STDOUT: } { // CHECK:STDOUT: %U.param: type = param U, runtime_param @@ -129,9 +129,9 @@ fn TestSpecific(a: A({})) -> {} { // CHECK:STDOUT: %A.ref: %A.type = name_ref A, file.%A.decl [template = constants.%A.1] // CHECK:STDOUT: %V.ref.loc10_26: type = name_ref V, %V.loc10 [symbolic = %V.1 (constants.%V)] // CHECK:STDOUT: %A.loc10: type = class_type @A, @A(constants.%V) [symbolic = %A.1 (constants.%A.3)] -// CHECK:STDOUT: %I.ref: %I.type = name_ref I, file.%I.decl [template = constants.%I] +// CHECK:STDOUT: %I.ref: %I.type.1 = name_ref I, file.%I.decl [template = constants.%I] // CHECK:STDOUT: %V.ref.loc10_34: type = name_ref V, %V.loc10 [symbolic = %V.1 (constants.%V)] -// CHECK:STDOUT: %.loc10_33: type = interface_type @I, @I(constants.%V) [symbolic = %.1 (constants.%.8)] +// CHECK:STDOUT: %I.type.loc10: type = interface_type @I, @I(constants.%V) [symbolic = %I.type.1 (constants.%I.type.3)] // CHECK:STDOUT: } // CHECK:STDOUT: %TestGeneric.decl: %TestGeneric.type = fn_decl @TestGeneric [template = constants.%TestGeneric] { // CHECK:STDOUT: %W.patt: type = symbolic_binding_pattern W, 0 @@ -151,14 +151,14 @@ fn TestSpecific(a: A({})) -> {} { // CHECK:STDOUT: %a.patt: %A.5 = binding_pattern a // CHECK:STDOUT: } { // CHECK:STDOUT: %A.ref: %A.type = name_ref A, file.%A.decl [template = constants.%A.1] -// CHECK:STDOUT: %.loc24_23: %.23 = struct_literal () -// CHECK:STDOUT: %.loc24_21: type = converted %.loc24_23, constants.%.23 [template = constants.%.23] -// CHECK:STDOUT: %A: type = class_type @A, @A(constants.%.23) [template = constants.%A.5] +// CHECK:STDOUT: %.loc24_23: %.20 = struct_literal () +// CHECK:STDOUT: %.loc24_21: type = converted %.loc24_23, constants.%.20 [template = constants.%.20] +// CHECK:STDOUT: %A: type = class_type @A, @A(constants.%.20) [template = constants.%A.5] // CHECK:STDOUT: %a.param: %A.5 = param a, runtime_param0 // CHECK:STDOUT: %a: %A.5 = bind_name a, %a.param -// CHECK:STDOUT: %.loc24_31.1: %.23 = struct_literal () -// CHECK:STDOUT: %.loc24_31.2: type = converted %.loc24_31.1, constants.%.23 [template = constants.%.23] -// CHECK:STDOUT: %return: ref %.23 = var +// CHECK:STDOUT: %.loc24_31.1: %.20 = struct_literal () +// CHECK:STDOUT: %.loc24_31.2: type = converted %.loc24_31.1, constants.%.20 [template = constants.%.20] +// CHECK:STDOUT: %return: ref %.20 = var // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -166,20 +166,20 @@ fn TestSpecific(a: A({})) -> {} { // CHECK:STDOUT: %U.1: type = bind_symbolic_name U, 0 [symbolic = %U.1 (constants.%U)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.1: type = interface_type @I, @I(%U.1) [symbolic = %.1 (constants.%.5)] -// CHECK:STDOUT: %Self.2: %.5 = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self)] +// CHECK:STDOUT: %I.type: type = interface_type @I, @I(%U.1) [symbolic = %I.type (constants.%I.type.2)] +// CHECK:STDOUT: %Self.2: %I.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self)] // CHECK:STDOUT: %F.type: type = fn_type @F.1, @I(%U.1) [symbolic = %F.type (constants.%F.type.1)] // CHECK:STDOUT: %F: @I.%F.type (%F.type.1) = struct_value () [symbolic = %F (constants.%F.1)] -// CHECK:STDOUT: %.2: type = assoc_entity_type @I.%.1 (%.5), @I.%F.type (%F.type.1) [symbolic = %.2 (constants.%.6)] -// CHECK:STDOUT: %.3: @I.%.2 (%.6) = assoc_entity element0, %F.decl [symbolic = %.3 (constants.%.7)] +// CHECK:STDOUT: %.1: type = assoc_entity_type @I.%I.type (%I.type.2), @I.%F.type (%F.type.1) [symbolic = %.1 (constants.%.5)] +// CHECK:STDOUT: %.2: @I.%.1 (%.5) = assoc_entity element0, %F.decl [symbolic = %.2 (constants.%.6)] // CHECK:STDOUT: // CHECK:STDOUT: interface { -// CHECK:STDOUT: %Self.1: @I.%.1 (%.5) = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self)] +// CHECK:STDOUT: %Self.1: @I.%I.type (%I.type.2) = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self)] // CHECK:STDOUT: %F.decl: @I.%F.type (%F.type.1) = fn_decl @F.1 [symbolic = @I.%F (constants.%F.1)] { // CHECK:STDOUT: %self.patt: @F.1.%Self (%Self) = binding_pattern self // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc7_14.1: @F.1.%.1 (%.5) = specific_constant @I.%Self.1, @I(constants.%U) [symbolic = %Self (constants.%Self)] -// CHECK:STDOUT: %Self.ref: @F.1.%.1 (%.5) = name_ref Self, %.loc7_14.1 [symbolic = %Self (constants.%Self)] +// CHECK:STDOUT: %.loc7_14.1: @F.1.%I.type (%I.type.2) = specific_constant @I.%Self.1, @I(constants.%U) [symbolic = %Self (constants.%Self)] +// CHECK:STDOUT: %Self.ref: @F.1.%I.type (%I.type.2) = name_ref Self, %.loc7_14.1 [symbolic = %Self (constants.%Self)] // CHECK:STDOUT: %.loc7_14.2: type = facet_type_access %Self.ref [symbolic = %Self (constants.%Self)] // CHECK:STDOUT: %.loc7_14.3: type = converted %Self.ref, %.loc7_14.2 [symbolic = %Self (constants.%Self)] // CHECK:STDOUT: %self.param: @F.1.%Self (%Self) = param self, runtime_param0 @@ -187,7 +187,7 @@ fn TestSpecific(a: A({})) -> {} { // CHECK:STDOUT: %U.ref: type = name_ref U, @I.%U.loc6 [symbolic = %U (constants.%U)] // CHECK:STDOUT: %return: ref @F.1.%U (%U) = var // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc7: @I.%.2 (%.6) = assoc_entity element0, %F.decl [symbolic = %.3 (constants.%.7)] +// CHECK:STDOUT: %.loc7: @I.%.1 (%.5) = assoc_entity element0, %F.decl [symbolic = %.2 (constants.%.6)] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self.1 @@ -199,9 +199,9 @@ fn TestSpecific(a: A({})) -> {} { // CHECK:STDOUT: generic impl @impl(%V.loc10: type) { // CHECK:STDOUT: %V.1: type = bind_symbolic_name V, 0 [symbolic = %V.1 (constants.%V)] // CHECK:STDOUT: %A.1: type = class_type @A, @A(%V.1) [symbolic = %A.1 (constants.%A.3)] -// CHECK:STDOUT: %.1: type = interface_type @I, @I(%V.1) [symbolic = %.1 (constants.%.8)] +// CHECK:STDOUT: %I.type.1: type = interface_type @I, @I(%V.1) [symbolic = %I.type.1 (constants.%I.type.3)] // CHECK:STDOUT: -// CHECK:STDOUT: impl: %A.loc10 as %.loc10_33 { +// CHECK:STDOUT: impl: %A.loc10 as %I.type.loc10 { // CHECK:STDOUT: %F.decl: %F.type.2 = fn_decl @F.2 [template = constants.%F.2] { // CHECK:STDOUT: %self.patt: @F.2.%A (%A.3) = binding_pattern self // CHECK:STDOUT: } { @@ -211,11 +211,11 @@ fn TestSpecific(a: A({})) -> {} { // CHECK:STDOUT: %V.ref: type = name_ref V, @impl.%V.loc10 [symbolic = %V (constants.%V)] // CHECK:STDOUT: %return: ref @F.2.%V (%V) = var // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc10_37: = interface_witness (%F.decl) [template = constants.%.11] +// CHECK:STDOUT: %.loc10: = interface_witness (%F.decl) [template = constants.%.9] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %F.decl -// CHECK:STDOUT: witness = %.loc10_37 +// CHECK:STDOUT: witness = %.loc10 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -239,10 +239,10 @@ fn TestSpecific(a: A({})) -> {} { // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @F.1(@I.%U.loc6: type, @I.%Self.1: @I.%.1 (%.5)) { +// CHECK:STDOUT: generic fn @F.1(@I.%U.loc6: type, @I.%Self.1: @I.%I.type (%I.type.2)) { // CHECK:STDOUT: %U: type = bind_symbolic_name U, 0 [symbolic = %U (constants.%U)] -// CHECK:STDOUT: %.1: type = interface_type @I, @I(%U) [symbolic = %.1 (constants.%.5)] -// CHECK:STDOUT: %Self: %.5 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self)] +// CHECK:STDOUT: %I.type: type = interface_type @I, @I(%U) [symbolic = %I.type (constants.%I.type.2)] +// CHECK:STDOUT: %Self: %I.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self)] // CHECK:STDOUT: // CHECK:STDOUT: fn[%self: @F.1.%Self (%Self)]() -> @F.1.%U (%U); // CHECK:STDOUT: } @@ -252,12 +252,12 @@ fn TestSpecific(a: A({})) -> {} { // CHECK:STDOUT: %A: type = class_type @A, @A(%V) [symbolic = %A (constants.%A.3)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.1: type = unbound_element_type @F.2.%A (%A.3), @F.2.%V (%V) [symbolic = %.1 (constants.%.12)] +// CHECK:STDOUT: %.1: type = unbound_element_type @F.2.%A (%A.3), @F.2.%V (%V) [symbolic = %.1 (constants.%.10)] // CHECK:STDOUT: // CHECK:STDOUT: fn[%self: @F.2.%A (%A.3)]() -> @F.2.%V (%V) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %self.ref: @F.2.%A (%A.3) = name_ref self, %self -// CHECK:STDOUT: %n.ref: @F.2.%.1 (%.12) = name_ref n, @A.%.loc3 [template = @A.%.loc3] +// CHECK:STDOUT: %n.ref: @F.2.%.1 (%.10) = name_ref n, @A.%.loc3 [template = @A.%.loc3] // CHECK:STDOUT: %.loc12_16.1: ref @F.2.%V (%V) = class_element_access %self.ref, element0 // CHECK:STDOUT: %.loc12_16.2: @F.2.%V (%V) = bind_value %.loc12_16.1 // CHECK:STDOUT: return %.loc12_16.2 @@ -269,32 +269,32 @@ fn TestSpecific(a: A({})) -> {} { // CHECK:STDOUT: %A.1: type = class_type @A, @A(%W.1) [symbolic = %A.1 (constants.%A.4)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.1: type = interface_type @I, @I(%W.1) [symbolic = %.1 (constants.%.20)] +// CHECK:STDOUT: %I.type.1: type = interface_type @I, @I(%W.1) [symbolic = %I.type.1 (constants.%I.type.4)] // CHECK:STDOUT: %F.type: type = fn_type @F.1, @I(%W.1) [symbolic = %F.type (constants.%F.type.4)] -// CHECK:STDOUT: %.2: type = assoc_entity_type @TestGeneric.%.1 (%.20), @TestGeneric.%F.type (%F.type.4) [symbolic = %.2 (constants.%.21)] -// CHECK:STDOUT: %.3: @TestGeneric.%.2 (%.21) = assoc_entity element0, @I.%F.decl [symbolic = %.3 (constants.%.22)] +// CHECK:STDOUT: %.1: type = assoc_entity_type @TestGeneric.%I.type.1 (%I.type.4), @TestGeneric.%F.type (%F.type.4) [symbolic = %.1 (constants.%.18)] +// CHECK:STDOUT: %.2: @TestGeneric.%.1 (%.18) = assoc_entity element0, @I.%F.decl [symbolic = %.2 (constants.%.19)] // CHECK:STDOUT: // CHECK:STDOUT: fn[%W.loc16: type](%a: @TestGeneric.%A.1 (%A.4)) -> @TestGeneric.%W.1 (%W) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: @TestGeneric.%A.1 (%A.4) = name_ref a, %a -// CHECK:STDOUT: %I.ref: %I.type = name_ref I, file.%I.decl [template = constants.%I] +// CHECK:STDOUT: %I.ref: %I.type.1 = name_ref I, file.%I.decl [template = constants.%I] // CHECK:STDOUT: %W.ref.loc21: type = name_ref W, %W.loc16 [symbolic = %W.1 (constants.%W)] -// CHECK:STDOUT: %.loc21_14: type = interface_type @I, @I(constants.%W) [symbolic = %.1 (constants.%.20)] -// CHECK:STDOUT: %.loc21_17: @TestGeneric.%.2 (%.21) = specific_constant @I.%.loc7, @I(constants.%W) [symbolic = %.3 (constants.%.22)] -// CHECK:STDOUT: %F.ref: @TestGeneric.%.2 (%.21) = name_ref F, %.loc21_17 [symbolic = %.3 (constants.%.22)] +// CHECK:STDOUT: %I.type.loc21: type = interface_type @I, @I(constants.%W) [symbolic = %I.type.1 (constants.%I.type.4)] +// CHECK:STDOUT: %.loc21: @TestGeneric.%.1 (%.18) = specific_constant @I.%.loc7, @I(constants.%W) [symbolic = %.2 (constants.%.19)] +// CHECK:STDOUT: %F.ref: @TestGeneric.%.1 (%.18) = name_ref F, %.loc21 [symbolic = %.2 (constants.%.19)] // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @TestSpecific(%a: %A.5) -> %.23 { +// CHECK:STDOUT: fn @TestSpecific(%a: %A.5) -> %.20 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: %A.5 = name_ref a, %a -// CHECK:STDOUT: %I.ref: %I.type = name_ref I, file.%I.decl [template = constants.%I] -// CHECK:STDOUT: %.loc28_16: %.23 = struct_literal () -// CHECK:STDOUT: %.loc28_14.1: type = converted %.loc28_16, constants.%.23 [template = constants.%.23] -// CHECK:STDOUT: %.loc28_14.2: type = interface_type @I, @I(constants.%.23) [template = constants.%.29] -// CHECK:STDOUT: %.loc28_18: %.30 = specific_constant @I.%.loc7, @I(constants.%.23) [template = constants.%.31] -// CHECK:STDOUT: %F.ref: %.30 = name_ref F, %.loc28_18 [template = constants.%.31] +// CHECK:STDOUT: %I.ref: %I.type.1 = name_ref I, file.%I.decl [template = constants.%I] +// CHECK:STDOUT: %.loc28_16: %.20 = struct_literal () +// CHECK:STDOUT: %.loc28_14: type = converted %.loc28_16, constants.%.20 [template = constants.%.20] +// CHECK:STDOUT: %I.type: type = interface_type @I, @I(constants.%.20) [template = constants.%I.type.5] +// CHECK:STDOUT: %.loc28_18: %.26 = specific_constant @I.%.loc7, @I(constants.%.20) [template = constants.%.27] +// CHECK:STDOUT: %F.ref: %.26 = name_ref F, %.loc28_18 [template = constants.%.27] // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -316,7 +316,7 @@ fn TestSpecific(a: A({})) -> {} { // CHECK:STDOUT: // CHECK:STDOUT: specific @F.1(constants.%U, constants.%Self) { // CHECK:STDOUT: %U => constants.%U -// CHECK:STDOUT: %.1 => constants.%.5 +// CHECK:STDOUT: %I.type => constants.%I.type.2 // CHECK:STDOUT: %Self => constants.%Self // CHECK:STDOUT: } // CHECK:STDOUT: @@ -329,21 +329,21 @@ fn TestSpecific(a: A({})) -> {} { // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %A => constants.%A.3 -// CHECK:STDOUT: %.1 => constants.%.12 -// CHECK:STDOUT: %.2 => constants.%.13 -// CHECK:STDOUT: %.3 => constants.%.14 +// CHECK:STDOUT: %.1 => constants.%.10 +// CHECK:STDOUT: %.2 => constants.%.11 +// CHECK:STDOUT: %.3 => constants.%.12 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @I(constants.%V) { // CHECK:STDOUT: %U.1 => constants.%V // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.1 => constants.%.8 +// CHECK:STDOUT: %I.type => constants.%I.type.3 // CHECK:STDOUT: %Self.2 => constants.%Self // CHECK:STDOUT: %F.type => constants.%F.type.3 // CHECK:STDOUT: %F => constants.%F.3 -// CHECK:STDOUT: %.2 => constants.%.9 -// CHECK:STDOUT: %.3 => constants.%.10 +// CHECK:STDOUT: %.1 => constants.%.7 +// CHECK:STDOUT: %.2 => constants.%.8 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @A(@impl.%V.1) { @@ -357,7 +357,7 @@ fn TestSpecific(a: A({})) -> {} { // CHECK:STDOUT: specific @impl(constants.%V) { // CHECK:STDOUT: %V.1 => constants.%V // CHECK:STDOUT: %A.1 => constants.%A.3 -// CHECK:STDOUT: %.1 => constants.%.8 +// CHECK:STDOUT: %I.type.1 => constants.%I.type.3 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @A(@F.2.%V) { @@ -371,7 +371,7 @@ fn TestSpecific(a: A({})) -> {} { // CHECK:STDOUT: // CHECK:STDOUT: specific @F.1(constants.%V, constants.%A.3) { // CHECK:STDOUT: %U => constants.%V -// CHECK:STDOUT: %.1 => constants.%.8 +// CHECK:STDOUT: %I.type => constants.%I.type.3 // CHECK:STDOUT: %Self => constants.%A.3 // CHECK:STDOUT: } // CHECK:STDOUT: @@ -380,9 +380,9 @@ fn TestSpecific(a: A({})) -> {} { // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %A => constants.%A.4 -// CHECK:STDOUT: %.1 => constants.%.16 -// CHECK:STDOUT: %.2 => constants.%.17 -// CHECK:STDOUT: %.3 => constants.%.18 +// CHECK:STDOUT: %.1 => constants.%.14 +// CHECK:STDOUT: %.2 => constants.%.15 +// CHECK:STDOUT: %.3 => constants.%.16 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @A(@TestGeneric.%W.1) { @@ -398,37 +398,37 @@ fn TestSpecific(a: A({})) -> {} { // CHECK:STDOUT: %U.1 => constants.%W // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.1 => constants.%.20 +// CHECK:STDOUT: %I.type => constants.%I.type.4 // CHECK:STDOUT: %Self.2 => constants.%Self // CHECK:STDOUT: %F.type => constants.%F.type.4 // CHECK:STDOUT: %F => constants.%F.4 -// CHECK:STDOUT: %.2 => constants.%.21 -// CHECK:STDOUT: %.3 => constants.%.22 +// CHECK:STDOUT: %.1 => constants.%.18 +// CHECK:STDOUT: %.2 => constants.%.19 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @I(@TestGeneric.%W.1) { // CHECK:STDOUT: %U.1 => constants.%W // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @A(constants.%.23) { -// CHECK:STDOUT: %T.1 => constants.%.23 +// CHECK:STDOUT: specific @A(constants.%.20) { +// CHECK:STDOUT: %T.1 => constants.%.20 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %A => constants.%A.5 -// CHECK:STDOUT: %.1 => constants.%.24 -// CHECK:STDOUT: %.2 => constants.%.25 -// CHECK:STDOUT: %.3 => constants.%.26 +// CHECK:STDOUT: %.1 => constants.%.21 +// CHECK:STDOUT: %.2 => constants.%.22 +// CHECK:STDOUT: %.3 => constants.%.23 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @I(constants.%.23) { -// CHECK:STDOUT: %U.1 => constants.%.23 +// CHECK:STDOUT: specific @I(constants.%.20) { +// CHECK:STDOUT: %U.1 => constants.%.20 // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.1 => constants.%.29 +// CHECK:STDOUT: %I.type => constants.%I.type.5 // CHECK:STDOUT: %Self.2 => constants.%Self // CHECK:STDOUT: %F.type => constants.%F.type.5 // CHECK:STDOUT: %F => constants.%F.5 -// CHECK:STDOUT: %.2 => constants.%.30 -// CHECK:STDOUT: %.3 => constants.%.31 +// CHECK:STDOUT: %.1 => constants.%.26 +// CHECK:STDOUT: %.2 => constants.%.27 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/impl/lookup/no_prelude/import.carbon b/toolchain/check/testdata/impl/lookup/no_prelude/import.carbon index 3d3805a5d43e1..ed78c1746620a 100644 --- a/toolchain/check/testdata/impl/lookup/no_prelude/import.carbon +++ b/toolchain/check/testdata/impl/lookup/no_prelude/import.carbon @@ -33,19 +33,19 @@ fn G(c: Impl.C) { // CHECK:STDOUT: --- impl.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: type = interface_type @HasF [template] -// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self, 0 [symbolic] +// CHECK:STDOUT: %HasF.type: type = interface_type @HasF [template] +// CHECK:STDOUT: %Self: %HasF.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %F.type.1: type = fn_type @F.1 [template] -// CHECK:STDOUT: %.2: type = tuple_type () [template] +// CHECK:STDOUT: %.1: type = tuple_type () [template] // CHECK:STDOUT: %F.1: %F.type.1 = struct_value () [template] -// CHECK:STDOUT: %.3: type = assoc_entity_type %.1, %F.type.1 [template] -// CHECK:STDOUT: %.4: %.3 = assoc_entity element0, @HasF.%F.decl [template] +// CHECK:STDOUT: %.2: type = assoc_entity_type %HasF.type, %F.type.1 [template] +// CHECK:STDOUT: %.3: %.2 = assoc_entity element0, @HasF.%F.decl [template] // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.5: type = struct_type {} [template] -// CHECK:STDOUT: %.6: = complete_type_witness %.5 [template] +// CHECK:STDOUT: %.4: type = struct_type {} [template] +// CHECK:STDOUT: %.5: = complete_type_witness %.4 [template] // CHECK:STDOUT: %F.type.2: type = fn_type @F.2 [template] // CHECK:STDOUT: %F.2: %F.type.2 = struct_value () [template] -// CHECK:STDOUT: %.7: = interface_witness (%F.2) [template] +// CHECK:STDOUT: %.6: = interface_witness (%F.2) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -53,18 +53,18 @@ fn G(c: Impl.C) { // CHECK:STDOUT: .HasF = %HasF.decl // CHECK:STDOUT: .C = %C.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %HasF.decl: type = interface_decl @HasF [template = constants.%.1] {} {} +// CHECK:STDOUT: %HasF.decl: type = interface_decl @HasF [template = constants.%HasF.type] {} {} // CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {} {} // CHECK:STDOUT: impl_decl @impl [template] {} { // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %HasF.ref: type = name_ref HasF, file.%HasF.decl [template = constants.%.1] +// CHECK:STDOUT: %HasF.ref: type = name_ref HasF, file.%HasF.decl [template = constants.%HasF.type] // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @HasF { -// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self, 0 [symbolic = constants.%Self] +// CHECK:STDOUT: %Self: %HasF.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self] // CHECK:STDOUT: %F.decl: %F.type.1 = fn_decl @F.1 [template = constants.%F.1] {} {} -// CHECK:STDOUT: %.loc5: %.3 = assoc_entity element0, %F.decl [template = constants.%.4] +// CHECK:STDOUT: %.loc5: %.2 = assoc_entity element0, %F.decl [template = constants.%.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -74,7 +74,7 @@ fn G(c: Impl.C) { // CHECK:STDOUT: // CHECK:STDOUT: impl @impl: %C.ref as %HasF.ref { // CHECK:STDOUT: %F.decl: %F.type.2 = fn_decl @F.2 [template = constants.%F.2] {} {} -// CHECK:STDOUT: %.loc10: = interface_witness (%F.decl) [template = constants.%.7] +// CHECK:STDOUT: %.loc10: = interface_witness (%F.decl) [template = constants.%.6] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %F.decl @@ -82,13 +82,13 @@ fn G(c: Impl.C) { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { -// CHECK:STDOUT: %.loc8: = complete_type_witness %.5 [template = constants.%.6] +// CHECK:STDOUT: %.loc8: = complete_type_witness %.4 [template = constants.%.5] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @F.1(@HasF.%Self: %.1) { +// CHECK:STDOUT: generic fn @F.1(@HasF.%Self: %HasF.type) { // CHECK:STDOUT: // CHECK:STDOUT: fn(); // CHECK:STDOUT: } @@ -105,22 +105,22 @@ fn G(c: Impl.C) { // CHECK:STDOUT: --- use.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: type = interface_type @HasF [template] -// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self, 0 [symbolic] +// CHECK:STDOUT: %HasF.type: type = interface_type @HasF [template] +// CHECK:STDOUT: %Self: %HasF.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.2: type = struct_type {} [template] -// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] +// CHECK:STDOUT: %.1: type = struct_type {} [template] +// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] -// CHECK:STDOUT: %.4: type = tuple_type () [template] +// CHECK:STDOUT: %.3: type = tuple_type () [template] // CHECK:STDOUT: %G: %G.type = struct_value () [template] -// CHECK:STDOUT: %.5: type = ptr_type %.2 [template] +// CHECK:STDOUT: %.4: type = ptr_type %.1 [template] // CHECK:STDOUT: %F.type.1: type = fn_type @F.1 [template] // CHECK:STDOUT: %F.1: %F.type.1 = struct_value () [template] -// CHECK:STDOUT: %.6: type = assoc_entity_type %.1, %F.type.1 [template] -// CHECK:STDOUT: %.7: %.6 = assoc_entity element0, imports.%import_ref.10 [template] +// CHECK:STDOUT: %.5: type = assoc_entity_type %HasF.type, %F.type.1 [template] +// CHECK:STDOUT: %.6: %.5 = assoc_entity element0, imports.%import_ref.10 [template] // CHECK:STDOUT: %F.type.2: type = fn_type @F.2 [template] // CHECK:STDOUT: %F.2: %F.type.2 = struct_value () [template] -// CHECK:STDOUT: %.8: = interface_witness (%F.2) [template] +// CHECK:STDOUT: %.7: = interface_witness (%F.2) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -130,14 +130,14 @@ fn G(c: Impl.C) { // CHECK:STDOUT: import Impl//default // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.1 = import_ref Impl//default, inst+3, unloaded -// CHECK:STDOUT: %import_ref.2: %.6 = import_ref Impl//default, inst+10, loaded [template = constants.%.7] +// CHECK:STDOUT: %import_ref.2: %.5 = import_ref Impl//default, inst+10, loaded [template = constants.%.6] // CHECK:STDOUT: %import_ref.3 = import_ref Impl//default, inst+5, unloaded // CHECK:STDOUT: %import_ref.4 = import_ref Impl//default, inst+13, unloaded // CHECK:STDOUT: %import_ref.5: type = import_ref Impl//default, inst+17, loaded [template = constants.%C] -// CHECK:STDOUT: %import_ref.6: type = import_ref Impl//default, inst+18, loaded [template = constants.%.1] -// CHECK:STDOUT: %import_ref.7: = import_ref Impl//default, inst+23, loaded [template = constants.%.8] +// CHECK:STDOUT: %import_ref.6: type = import_ref Impl//default, inst+18, loaded [template = constants.%HasF.type] +// CHECK:STDOUT: %import_ref.7: = import_ref Impl//default, inst+23, loaded [template = constants.%.7] // CHECK:STDOUT: %import_ref.8: type = import_ref Impl//default, inst+12, loaded [template = constants.%C] -// CHECK:STDOUT: %import_ref.9: type = import_ref Impl//default, inst+1, loaded [template = constants.%.1] +// CHECK:STDOUT: %import_ref.9: type = import_ref Impl//default, inst+1, loaded [template = constants.%HasF.type] // CHECK:STDOUT: %import_ref.10 = import_ref Impl//default, inst+5, unloaded // CHECK:STDOUT: } // CHECK:STDOUT: @@ -178,14 +178,14 @@ fn G(c: Impl.C) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %c.ref: %C = name_ref c, %c // CHECK:STDOUT: %Impl.ref.loc5: = name_ref Impl, imports.%Impl [template = imports.%Impl] -// CHECK:STDOUT: %HasF.ref: type = name_ref HasF, imports.%import_ref.9 [template = constants.%.1] -// CHECK:STDOUT: %F.ref: %.6 = name_ref F, imports.%import_ref.2 [template = constants.%.7] -// CHECK:STDOUT: %.loc5: %F.type.1 = interface_witness_access constants.%.8, element0 [template = constants.%F.2] -// CHECK:STDOUT: %F.call: init %.4 = call %.loc5() +// CHECK:STDOUT: %HasF.ref: type = name_ref HasF, imports.%import_ref.9 [template = constants.%HasF.type] +// CHECK:STDOUT: %F.ref: %.5 = name_ref F, imports.%import_ref.2 [template = constants.%.6] +// CHECK:STDOUT: %.loc5: %F.type.1 = interface_witness_access constants.%.7, element0 [template = constants.%F.2] +// CHECK:STDOUT: %F.call: init %.3 = call %.loc5() // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @F.1(constants.%Self: %.1) { +// CHECK:STDOUT: generic fn @F.1(constants.%Self: %HasF.type) { // CHECK:STDOUT: // CHECK:STDOUT: fn(); // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/impl/no_prelude/basic.carbon b/toolchain/check/testdata/impl/no_prelude/basic.carbon index c362b03554cac..7ece4eaa3a4ba 100644 --- a/toolchain/check/testdata/impl/no_prelude/basic.carbon +++ b/toolchain/check/testdata/impl/no_prelude/basic.carbon @@ -21,19 +21,19 @@ impl C as Simple { // CHECK:STDOUT: --- basic.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: type = interface_type @Simple [template] -// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self, 0 [symbolic] +// CHECK:STDOUT: %Simple.type: type = interface_type @Simple [template] +// CHECK:STDOUT: %Self: %Simple.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %F.type.1: type = fn_type @F.1 [template] -// CHECK:STDOUT: %.2: type = tuple_type () [template] +// CHECK:STDOUT: %.1: type = tuple_type () [template] // CHECK:STDOUT: %F.1: %F.type.1 = struct_value () [template] -// CHECK:STDOUT: %.3: type = assoc_entity_type %.1, %F.type.1 [template] -// CHECK:STDOUT: %.4: %.3 = assoc_entity element0, @Simple.%F.decl [template] +// CHECK:STDOUT: %.2: type = assoc_entity_type %Simple.type, %F.type.1 [template] +// CHECK:STDOUT: %.3: %.2 = assoc_entity element0, @Simple.%F.decl [template] // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.5: type = struct_type {} [template] -// CHECK:STDOUT: %.6: = complete_type_witness %.5 [template] +// CHECK:STDOUT: %.4: type = struct_type {} [template] +// CHECK:STDOUT: %.5: = complete_type_witness %.4 [template] // CHECK:STDOUT: %F.type.2: type = fn_type @F.2 [template] // CHECK:STDOUT: %F.2: %F.type.2 = struct_value () [template] -// CHECK:STDOUT: %.7: = interface_witness (%F.2) [template] +// CHECK:STDOUT: %.6: = interface_witness (%F.2) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -41,18 +41,18 @@ impl C as Simple { // CHECK:STDOUT: .Simple = %Simple.decl // CHECK:STDOUT: .C = %C.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %Simple.decl: type = interface_decl @Simple [template = constants.%.1] {} {} +// CHECK:STDOUT: %Simple.decl: type = interface_decl @Simple [template = constants.%Simple.type] {} {} // CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {} {} // CHECK:STDOUT: impl_decl @impl [template] {} { // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %Simple.ref: type = name_ref Simple, file.%Simple.decl [template = constants.%.1] +// CHECK:STDOUT: %Simple.ref: type = name_ref Simple, file.%Simple.decl [template = constants.%Simple.type] // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @Simple { -// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self, 0 [symbolic = constants.%Self] +// CHECK:STDOUT: %Self: %Simple.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self] // CHECK:STDOUT: %F.decl: %F.type.1 = fn_decl @F.1 [template = constants.%F.1] {} {} -// CHECK:STDOUT: %.loc12: %.3 = assoc_entity element0, %F.decl [template = constants.%.4] +// CHECK:STDOUT: %.loc12: %.2 = assoc_entity element0, %F.decl [template = constants.%.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -62,7 +62,7 @@ impl C as Simple { // CHECK:STDOUT: // CHECK:STDOUT: impl @impl: %C.ref as %Simple.ref { // CHECK:STDOUT: %F.decl: %F.type.2 = fn_decl @F.2 [template = constants.%F.2] {} {} -// CHECK:STDOUT: %.loc17: = interface_witness (%F.decl) [template = constants.%.7] +// CHECK:STDOUT: %.loc17: = interface_witness (%F.decl) [template = constants.%.6] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %F.decl @@ -70,13 +70,13 @@ impl C as Simple { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { -// CHECK:STDOUT: %.loc15: = complete_type_witness %.5 [template = constants.%.6] +// CHECK:STDOUT: %.loc15: = complete_type_witness %.4 [template = constants.%.5] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @F.1(@Simple.%Self: %.1) { +// CHECK:STDOUT: generic fn @F.1(@Simple.%Self: %Simple.type) { // CHECK:STDOUT: // CHECK:STDOUT: fn(); // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/impl/no_prelude/fail_alias.carbon b/toolchain/check/testdata/impl/no_prelude/fail_alias.carbon index f956ab2a25d66..f5f4d3a6660a9 100644 --- a/toolchain/check/testdata/impl/no_prelude/fail_alias.carbon +++ b/toolchain/check/testdata/impl/no_prelude/fail_alias.carbon @@ -27,13 +27,13 @@ impl AC as AI {} // CHECK:STDOUT: --- fail_alias.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: type = interface_type @I [template] -// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self, 0 [symbolic] +// CHECK:STDOUT: %I.type: type = interface_type @I [template] +// CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.2: type = struct_type {} [template] -// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] -// CHECK:STDOUT: %.4: type = tuple_type () [template] -// CHECK:STDOUT: %.5: = interface_witness () [template] +// CHECK:STDOUT: %.1: type = struct_type {} [template] +// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %.3: type = tuple_type () [template] +// CHECK:STDOUT: %.4: = interface_witness () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -43,24 +43,24 @@ impl AC as AI {} // CHECK:STDOUT: .AI = %AI // CHECK:STDOUT: .AC = %AC // CHECK:STDOUT: } -// CHECK:STDOUT: %I.decl: type = interface_decl @I [template = constants.%.1] {} {} +// CHECK:STDOUT: %I.decl: type = interface_decl @I [template = constants.%I.type] {} {} // CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {} {} -// CHECK:STDOUT: %I.ref: type = name_ref I, %I.decl [template = constants.%.1] -// CHECK:STDOUT: %AI: type = bind_alias AI, %I.decl [template = constants.%.1] +// CHECK:STDOUT: %I.ref: type = name_ref I, %I.decl [template = constants.%I.type] +// CHECK:STDOUT: %AI: type = bind_alias AI, %I.decl [template = constants.%I.type] // CHECK:STDOUT: %C.ref: type = name_ref C, %C.decl [template = constants.%C] // CHECK:STDOUT: %AC: type = bind_alias AC, %C.decl [template = constants.%C] // CHECK:STDOUT: impl_decl @impl [template] {} { // CHECK:STDOUT: %AC.ref.loc17: type = name_ref AC, file.%AC [template = constants.%C] -// CHECK:STDOUT: %AI.ref.loc17: type = name_ref AI, file.%AI [template = constants.%.1] +// CHECK:STDOUT: %AI.ref.loc17: type = name_ref AI, file.%AI [template = constants.%I.type] // CHECK:STDOUT: } // CHECK:STDOUT: impl_decl @impl [template] {} { // CHECK:STDOUT: %AC.ref.loc25: type = name_ref AC, file.%AC [template = constants.%C] -// CHECK:STDOUT: %AI.ref.loc25: type = name_ref AI, file.%AI [template = constants.%.1] +// CHECK:STDOUT: %AI.ref.loc25: type = name_ref AI, file.%AI [template = constants.%I.type] // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @I { -// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self, 0 [symbolic = constants.%Self] +// CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -73,7 +73,7 @@ impl AC as AI {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { -// CHECK:STDOUT: %.loc12: = complete_type_witness %.2 [template = constants.%.3] +// CHECK:STDOUT: %.loc12: = complete_type_witness %.1 [template = constants.%.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C diff --git a/toolchain/check/testdata/impl/no_prelude/fail_impl_bad_type.carbon b/toolchain/check/testdata/impl/no_prelude/fail_impl_bad_type.carbon index 344f99bba0469..5aa695b0d77c6 100644 --- a/toolchain/check/testdata/impl/no_prelude/fail_impl_bad_type.carbon +++ b/toolchain/check/testdata/impl/no_prelude/fail_impl_bad_type.carbon @@ -18,27 +18,27 @@ impl true as I {} // CHECK:STDOUT: --- fail_impl_bad_type.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: type = interface_type @I [template] -// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self, 0 [symbolic] -// CHECK:STDOUT: %.2: bool = bool_literal true [template] -// CHECK:STDOUT: %.3: type = tuple_type () [template] -// CHECK:STDOUT: %.4: = interface_witness () [template] +// CHECK:STDOUT: %I.type: type = interface_type @I [template] +// CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic] +// CHECK:STDOUT: %.1: bool = bool_literal true [template] +// CHECK:STDOUT: %.2: type = tuple_type () [template] +// CHECK:STDOUT: %.3: = interface_witness () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: package: = namespace [template] { // CHECK:STDOUT: .I = %I.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %I.decl: type = interface_decl @I [template = constants.%.1] {} {} +// CHECK:STDOUT: %I.decl: type = interface_decl @I [template = constants.%I.type] {} {} // CHECK:STDOUT: impl_decl @impl [template] {} { -// CHECK:STDOUT: %.loc16_6.1: bool = bool_literal true [template = constants.%.2] +// CHECK:STDOUT: %.loc16_6.1: bool = bool_literal true [template = constants.%.1] // CHECK:STDOUT: %.loc16_6.2: type = converted %.loc16_6.1, [template = ] -// CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [template = constants.%.1] +// CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [template = constants.%I.type] // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @I { -// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self, 0 [symbolic = constants.%Self] +// CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -46,7 +46,7 @@ impl true as I {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl: as %I.ref { -// CHECK:STDOUT: %.loc16_16: = interface_witness () [template = constants.%.4] +// CHECK:STDOUT: %.loc16_16: = interface_witness () [template = constants.%.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: witness = %.loc16_16 diff --git a/toolchain/check/testdata/impl/no_prelude/generic_redeclaration.carbon b/toolchain/check/testdata/impl/no_prelude/generic_redeclaration.carbon index 99b4bb77c22e1..b0a777ad33062 100644 --- a/toolchain/check/testdata/impl/no_prelude/generic_redeclaration.carbon +++ b/toolchain/check/testdata/impl/no_prelude/generic_redeclaration.carbon @@ -66,22 +66,22 @@ impl (C, C).0 as I {} // CHECK:STDOUT: --- same_self_and_interface.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: type = interface_type @Interface [template] -// CHECK:STDOUT: %Self.1: %.1 = bind_symbolic_name Self, 0 [symbolic] -// CHECK:STDOUT: %.2: type = interface_type @I [template] -// CHECK:STDOUT: %Self.2: %.2 = bind_symbolic_name Self, 0 [symbolic] -// CHECK:STDOUT: %.3: type = interface_type @J [template] -// CHECK:STDOUT: %Self.3: %.3 = bind_symbolic_name Self, 0 [symbolic] -// CHECK:STDOUT: %.4: type = interface_type @K [template] -// CHECK:STDOUT: %Self.4: %.4 = bind_symbolic_name Self, 0 [symbolic] -// CHECK:STDOUT: %.5: type = interface_type @L [template] -// CHECK:STDOUT: %Self.5: %.5 = bind_symbolic_name Self, 0 [symbolic] -// CHECK:STDOUT: %T.1: %.2 = bind_symbolic_name T, 0 [symbolic] -// CHECK:STDOUT: %T.2: %.3 = bind_symbolic_name T, 0 [symbolic] -// CHECK:STDOUT: %T.3: %.4 = bind_symbolic_name T, 0 [symbolic] -// CHECK:STDOUT: %T.4: %.5 = bind_symbolic_name T, 0 [symbolic] -// CHECK:STDOUT: %.6: type = tuple_type () [template] -// CHECK:STDOUT: %.7: = interface_witness () [template] +// CHECK:STDOUT: %Interface.type: type = interface_type @Interface [template] +// CHECK:STDOUT: %Self.1: %Interface.type = bind_symbolic_name Self, 0 [symbolic] +// CHECK:STDOUT: %I.type: type = interface_type @I [template] +// CHECK:STDOUT: %Self.2: %I.type = bind_symbolic_name Self, 0 [symbolic] +// CHECK:STDOUT: %J.type: type = interface_type @J [template] +// CHECK:STDOUT: %Self.3: %J.type = bind_symbolic_name Self, 0 [symbolic] +// CHECK:STDOUT: %K.type: type = interface_type @K [template] +// CHECK:STDOUT: %Self.4: %K.type = bind_symbolic_name Self, 0 [symbolic] +// CHECK:STDOUT: %L.type: type = interface_type @L [template] +// CHECK:STDOUT: %Self.5: %L.type = bind_symbolic_name Self, 0 [symbolic] +// CHECK:STDOUT: %T.1: %I.type = bind_symbolic_name T, 0 [symbolic] +// CHECK:STDOUT: %T.2: %J.type = bind_symbolic_name T, 0 [symbolic] +// CHECK:STDOUT: %T.3: %K.type = bind_symbolic_name T, 0 [symbolic] +// CHECK:STDOUT: %T.4: %L.type = bind_symbolic_name T, 0 [symbolic] +// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %.2: = interface_witness () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -92,103 +92,103 @@ impl (C, C).0 as I {} // CHECK:STDOUT: .K = %K.decl // CHECK:STDOUT: .L = %L.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %Interface.decl: type = interface_decl @Interface [template = constants.%.1] {} {} -// CHECK:STDOUT: %I.decl: type = interface_decl @I [template = constants.%.2] {} {} -// CHECK:STDOUT: %J.decl: type = interface_decl @J [template = constants.%.3] {} {} -// CHECK:STDOUT: %K.decl: type = interface_decl @K [template = constants.%.4] {} {} -// CHECK:STDOUT: %L.decl: type = interface_decl @L [template = constants.%.5] {} {} +// CHECK:STDOUT: %Interface.decl: type = interface_decl @Interface [template = constants.%Interface.type] {} {} +// CHECK:STDOUT: %I.decl: type = interface_decl @I [template = constants.%I.type] {} {} +// CHECK:STDOUT: %J.decl: type = interface_decl @J [template = constants.%J.type] {} {} +// CHECK:STDOUT: %K.decl: type = interface_decl @K [template = constants.%K.type] {} {} +// CHECK:STDOUT: %L.decl: type = interface_decl @L [template = constants.%L.type] {} {} // CHECK:STDOUT: impl_decl @impl.1 [template] { -// CHECK:STDOUT: %T.patt: %.2 = symbolic_binding_pattern T, 0 +// CHECK:STDOUT: %T.patt: %I.type = symbolic_binding_pattern T, 0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [template = constants.%.2] -// CHECK:STDOUT: %T.param: %.2 = param T, runtime_param -// CHECK:STDOUT: %T.loc11: %.2 = bind_symbolic_name T, 0, %T.param [symbolic = %T.1 (constants.%T.1)] -// CHECK:STDOUT: %T.ref: %.2 = name_ref T, %T.loc11 [symbolic = %T.1 (constants.%T.1)] +// CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [template = constants.%I.type] +// CHECK:STDOUT: %T.param: %I.type = param T, runtime_param +// CHECK:STDOUT: %T.loc11: %I.type = bind_symbolic_name T, 0, %T.param [symbolic = %T.1 (constants.%T.1)] +// CHECK:STDOUT: %T.ref: %I.type = name_ref T, %T.loc11 [symbolic = %T.1 (constants.%T.1)] // CHECK:STDOUT: %.loc11_21.1: type = facet_type_access %T.ref [symbolic = %T.1 (constants.%T.1)] // CHECK:STDOUT: %.loc11_21.2: type = converted %T.ref, %.loc11_21.1 [symbolic = %T.1 (constants.%T.1)] -// CHECK:STDOUT: %Interface.ref: type = name_ref Interface, file.%Interface.decl [template = constants.%.1] +// CHECK:STDOUT: %Interface.ref: type = name_ref Interface, file.%Interface.decl [template = constants.%Interface.type] // CHECK:STDOUT: } // CHECK:STDOUT: impl_decl @impl.2 [template] { -// CHECK:STDOUT: %T.patt: %.3 = symbolic_binding_pattern T, 0 +// CHECK:STDOUT: %T.patt: %J.type = symbolic_binding_pattern T, 0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %J.ref: type = name_ref J, file.%J.decl [template = constants.%.3] -// CHECK:STDOUT: %T.param: %.3 = param T, runtime_param -// CHECK:STDOUT: %T.loc12: %.3 = bind_symbolic_name T, 0, %T.param [symbolic = %T.1 (constants.%T.2)] -// CHECK:STDOUT: %T.ref: %.3 = name_ref T, %T.loc12 [symbolic = %T.1 (constants.%T.2)] +// CHECK:STDOUT: %J.ref: type = name_ref J, file.%J.decl [template = constants.%J.type] +// CHECK:STDOUT: %T.param: %J.type = param T, runtime_param +// CHECK:STDOUT: %T.loc12: %J.type = bind_symbolic_name T, 0, %T.param [symbolic = %T.1 (constants.%T.2)] +// CHECK:STDOUT: %T.ref: %J.type = name_ref T, %T.loc12 [symbolic = %T.1 (constants.%T.2)] // CHECK:STDOUT: %.loc12_21.1: type = facet_type_access %T.ref [symbolic = %T.1 (constants.%T.2)] // CHECK:STDOUT: %.loc12_21.2: type = converted %T.ref, %.loc12_21.1 [symbolic = %T.1 (constants.%T.2)] -// CHECK:STDOUT: %Interface.ref: type = name_ref Interface, file.%Interface.decl [template = constants.%.1] +// CHECK:STDOUT: %Interface.ref: type = name_ref Interface, file.%Interface.decl [template = constants.%Interface.type] // CHECK:STDOUT: } // CHECK:STDOUT: impl_decl @impl.3 [template] { -// CHECK:STDOUT: %T.patt: %.4 = symbolic_binding_pattern T, 0 +// CHECK:STDOUT: %T.patt: %K.type = symbolic_binding_pattern T, 0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %K.ref: type = name_ref K, file.%K.decl [template = constants.%.4] -// CHECK:STDOUT: %T.param: %.4 = param T, runtime_param -// CHECK:STDOUT: %T.loc13: %.4 = bind_symbolic_name T, 0, %T.param [symbolic = %T.1 (constants.%T.3)] -// CHECK:STDOUT: %T.ref: %.4 = name_ref T, %T.loc13 [symbolic = %T.1 (constants.%T.3)] +// CHECK:STDOUT: %K.ref: type = name_ref K, file.%K.decl [template = constants.%K.type] +// CHECK:STDOUT: %T.param: %K.type = param T, runtime_param +// CHECK:STDOUT: %T.loc13: %K.type = bind_symbolic_name T, 0, %T.param [symbolic = %T.1 (constants.%T.3)] +// CHECK:STDOUT: %T.ref: %K.type = name_ref T, %T.loc13 [symbolic = %T.1 (constants.%T.3)] // CHECK:STDOUT: %.loc13_21.1: type = facet_type_access %T.ref [symbolic = %T.1 (constants.%T.3)] // CHECK:STDOUT: %.loc13_21.2: type = converted %T.ref, %.loc13_21.1 [symbolic = %T.1 (constants.%T.3)] -// CHECK:STDOUT: %Interface.ref: type = name_ref Interface, file.%Interface.decl [template = constants.%.1] +// CHECK:STDOUT: %Interface.ref: type = name_ref Interface, file.%Interface.decl [template = constants.%Interface.type] // CHECK:STDOUT: } // CHECK:STDOUT: impl_decl @impl.4 [template] { -// CHECK:STDOUT: %T.patt: %.5 = symbolic_binding_pattern T, 0 +// CHECK:STDOUT: %T.patt: %L.type = symbolic_binding_pattern T, 0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %L.ref: type = name_ref L, file.%L.decl [template = constants.%.5] -// CHECK:STDOUT: %T.param: %.5 = param T, runtime_param -// CHECK:STDOUT: %T.loc14: %.5 = bind_symbolic_name T, 0, %T.param [symbolic = %T.1 (constants.%T.4)] -// CHECK:STDOUT: %T.ref: %.5 = name_ref T, %T.loc14 [symbolic = %T.1 (constants.%T.4)] +// CHECK:STDOUT: %L.ref: type = name_ref L, file.%L.decl [template = constants.%L.type] +// CHECK:STDOUT: %T.param: %L.type = param T, runtime_param +// CHECK:STDOUT: %T.loc14: %L.type = bind_symbolic_name T, 0, %T.param [symbolic = %T.1 (constants.%T.4)] +// CHECK:STDOUT: %T.ref: %L.type = name_ref T, %T.loc14 [symbolic = %T.1 (constants.%T.4)] // CHECK:STDOUT: %.loc14_21.1: type = facet_type_access %T.ref [symbolic = %T.1 (constants.%T.4)] // CHECK:STDOUT: %.loc14_21.2: type = converted %T.ref, %.loc14_21.1 [symbolic = %T.1 (constants.%T.4)] -// CHECK:STDOUT: %Interface.ref: type = name_ref Interface, file.%Interface.decl [template = constants.%.1] +// CHECK:STDOUT: %Interface.ref: type = name_ref Interface, file.%Interface.decl [template = constants.%Interface.type] // CHECK:STDOUT: } // CHECK:STDOUT: impl_decl @impl.5 [template] { -// CHECK:STDOUT: %T.patt: %.2 = symbolic_binding_pattern T, 0 +// CHECK:STDOUT: %T.patt: %I.type = symbolic_binding_pattern T, 0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [template = constants.%.2] -// CHECK:STDOUT: %T.param: %.2 = param T, runtime_param -// CHECK:STDOUT: %T.loc18: %.2 = bind_symbolic_name T, 0, %T.param [symbolic = %T.1 (constants.%T.1)] -// CHECK:STDOUT: %T.ref: %.2 = name_ref T, %T.loc18 [symbolic = %T.1 (constants.%T.1)] +// CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [template = constants.%I.type] +// CHECK:STDOUT: %T.param: %I.type = param T, runtime_param +// CHECK:STDOUT: %T.loc18: %I.type = bind_symbolic_name T, 0, %T.param [symbolic = %T.1 (constants.%T.1)] +// CHECK:STDOUT: %T.ref: %I.type = name_ref T, %T.loc18 [symbolic = %T.1 (constants.%T.1)] // CHECK:STDOUT: %.loc18_21.1: type = facet_type_access %T.ref [symbolic = %T.1 (constants.%T.1)] // CHECK:STDOUT: %.loc18_21.2: type = converted %T.ref, %.loc18_21.1 [symbolic = %T.1 (constants.%T.1)] -// CHECK:STDOUT: %Interface.ref: type = name_ref Interface, file.%Interface.decl [template = constants.%.1] +// CHECK:STDOUT: %Interface.ref: type = name_ref Interface, file.%Interface.decl [template = constants.%Interface.type] // CHECK:STDOUT: } // CHECK:STDOUT: impl_decl @impl.6 [template] { -// CHECK:STDOUT: %T.patt: %.3 = symbolic_binding_pattern T, 0 +// CHECK:STDOUT: %T.patt: %J.type = symbolic_binding_pattern T, 0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %J.ref: type = name_ref J, file.%J.decl [template = constants.%.3] -// CHECK:STDOUT: %T.param: %.3 = param T, runtime_param -// CHECK:STDOUT: %T.loc19: %.3 = bind_symbolic_name T, 0, %T.param [symbolic = %T.1 (constants.%T.2)] -// CHECK:STDOUT: %T.ref: %.3 = name_ref T, %T.loc19 [symbolic = %T.1 (constants.%T.2)] +// CHECK:STDOUT: %J.ref: type = name_ref J, file.%J.decl [template = constants.%J.type] +// CHECK:STDOUT: %T.param: %J.type = param T, runtime_param +// CHECK:STDOUT: %T.loc19: %J.type = bind_symbolic_name T, 0, %T.param [symbolic = %T.1 (constants.%T.2)] +// CHECK:STDOUT: %T.ref: %J.type = name_ref T, %T.loc19 [symbolic = %T.1 (constants.%T.2)] // CHECK:STDOUT: %.loc19_21.1: type = facet_type_access %T.ref [symbolic = %T.1 (constants.%T.2)] // CHECK:STDOUT: %.loc19_21.2: type = converted %T.ref, %.loc19_21.1 [symbolic = %T.1 (constants.%T.2)] -// CHECK:STDOUT: %Interface.ref: type = name_ref Interface, file.%Interface.decl [template = constants.%.1] +// CHECK:STDOUT: %Interface.ref: type = name_ref Interface, file.%Interface.decl [template = constants.%Interface.type] // CHECK:STDOUT: } // CHECK:STDOUT: impl_decl @impl.7 [template] { -// CHECK:STDOUT: %T.patt: %.4 = symbolic_binding_pattern T, 0 +// CHECK:STDOUT: %T.patt: %K.type = symbolic_binding_pattern T, 0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %K.ref: type = name_ref K, file.%K.decl [template = constants.%.4] -// CHECK:STDOUT: %T.param: %.4 = param T, runtime_param -// CHECK:STDOUT: %T.loc20: %.4 = bind_symbolic_name T, 0, %T.param [symbolic = %T.1 (constants.%T.3)] -// CHECK:STDOUT: %T.ref: %.4 = name_ref T, %T.loc20 [symbolic = %T.1 (constants.%T.3)] +// CHECK:STDOUT: %K.ref: type = name_ref K, file.%K.decl [template = constants.%K.type] +// CHECK:STDOUT: %T.param: %K.type = param T, runtime_param +// CHECK:STDOUT: %T.loc20: %K.type = bind_symbolic_name T, 0, %T.param [symbolic = %T.1 (constants.%T.3)] +// CHECK:STDOUT: %T.ref: %K.type = name_ref T, %T.loc20 [symbolic = %T.1 (constants.%T.3)] // CHECK:STDOUT: %.loc20_21.1: type = facet_type_access %T.ref [symbolic = %T.1 (constants.%T.3)] // CHECK:STDOUT: %.loc20_21.2: type = converted %T.ref, %.loc20_21.1 [symbolic = %T.1 (constants.%T.3)] -// CHECK:STDOUT: %Interface.ref: type = name_ref Interface, file.%Interface.decl [template = constants.%.1] +// CHECK:STDOUT: %Interface.ref: type = name_ref Interface, file.%Interface.decl [template = constants.%Interface.type] // CHECK:STDOUT: } // CHECK:STDOUT: impl_decl @impl.8 [template] { -// CHECK:STDOUT: %T.patt: %.5 = symbolic_binding_pattern T, 0 +// CHECK:STDOUT: %T.patt: %L.type = symbolic_binding_pattern T, 0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %L.ref: type = name_ref L, file.%L.decl [template = constants.%.5] -// CHECK:STDOUT: %T.param: %.5 = param T, runtime_param -// CHECK:STDOUT: %T.loc21: %.5 = bind_symbolic_name T, 0, %T.param [symbolic = %T.1 (constants.%T.4)] -// CHECK:STDOUT: %T.ref: %.5 = name_ref T, %T.loc21 [symbolic = %T.1 (constants.%T.4)] +// CHECK:STDOUT: %L.ref: type = name_ref L, file.%L.decl [template = constants.%L.type] +// CHECK:STDOUT: %T.param: %L.type = param T, runtime_param +// CHECK:STDOUT: %T.loc21: %L.type = bind_symbolic_name T, 0, %T.param [symbolic = %T.1 (constants.%T.4)] +// CHECK:STDOUT: %T.ref: %L.type = name_ref T, %T.loc21 [symbolic = %T.1 (constants.%T.4)] // CHECK:STDOUT: %.loc21_21.1: type = facet_type_access %T.ref [symbolic = %T.1 (constants.%T.4)] // CHECK:STDOUT: %.loc21_21.2: type = converted %T.ref, %.loc21_21.1 [symbolic = %T.1 (constants.%T.4)] -// CHECK:STDOUT: %Interface.ref: type = name_ref Interface, file.%Interface.decl [template = constants.%.1] +// CHECK:STDOUT: %Interface.ref: type = name_ref Interface, file.%Interface.decl [template = constants.%Interface.type] // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @Interface { -// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self, 0 [symbolic = constants.%Self.1] +// CHECK:STDOUT: %Self: %Interface.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self.1] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -196,7 +196,7 @@ impl (C, C).0 as I {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @I { -// CHECK:STDOUT: %Self: %.2 = bind_symbolic_name Self, 0 [symbolic = constants.%Self.2] +// CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -204,7 +204,7 @@ impl (C, C).0 as I {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @J { -// CHECK:STDOUT: %Self: %.3 = bind_symbolic_name Self, 0 [symbolic = constants.%Self.3] +// CHECK:STDOUT: %Self: %J.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -212,7 +212,7 @@ impl (C, C).0 as I {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @K { -// CHECK:STDOUT: %Self: %.4 = bind_symbolic_name Self, 0 [symbolic = constants.%Self.4] +// CHECK:STDOUT: %Self: %K.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self.4] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -220,75 +220,75 @@ impl (C, C).0 as I {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @L { -// CHECK:STDOUT: %Self: %.5 = bind_symbolic_name Self, 0 [symbolic = constants.%Self.5] +// CHECK:STDOUT: %Self: %L.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self.5] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self // CHECK:STDOUT: witness = () // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic impl @impl.1(%T.loc11: %.2) { -// CHECK:STDOUT: %T.1: %.2 = bind_symbolic_name T, 0 [symbolic = %T.1 (constants.%T.1)] +// CHECK:STDOUT: generic impl @impl.1(%T.loc11: %I.type) { +// CHECK:STDOUT: %T.1: %I.type = bind_symbolic_name T, 0 [symbolic = %T.1 (constants.%T.1)] // CHECK:STDOUT: // CHECK:STDOUT: impl: %.loc11_21.2 as %Interface.ref; // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic impl @impl.2(%T.loc12: %.3) { -// CHECK:STDOUT: %T.1: %.3 = bind_symbolic_name T, 0 [symbolic = %T.1 (constants.%T.2)] +// CHECK:STDOUT: generic impl @impl.2(%T.loc12: %J.type) { +// CHECK:STDOUT: %T.1: %J.type = bind_symbolic_name T, 0 [symbolic = %T.1 (constants.%T.2)] // CHECK:STDOUT: // CHECK:STDOUT: impl: %.loc12_21.2 as %Interface.ref; // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic impl @impl.3(%T.loc13: %.4) { -// CHECK:STDOUT: %T.1: %.4 = bind_symbolic_name T, 0 [symbolic = %T.1 (constants.%T.3)] +// CHECK:STDOUT: generic impl @impl.3(%T.loc13: %K.type) { +// CHECK:STDOUT: %T.1: %K.type = bind_symbolic_name T, 0 [symbolic = %T.1 (constants.%T.3)] // CHECK:STDOUT: // CHECK:STDOUT: impl: %.loc13_21.2 as %Interface.ref; // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic impl @impl.4(%T.loc14: %.5) { -// CHECK:STDOUT: %T.1: %.5 = bind_symbolic_name T, 0 [symbolic = %T.1 (constants.%T.4)] +// CHECK:STDOUT: generic impl @impl.4(%T.loc14: %L.type) { +// CHECK:STDOUT: %T.1: %L.type = bind_symbolic_name T, 0 [symbolic = %T.1 (constants.%T.4)] // CHECK:STDOUT: // CHECK:STDOUT: impl: %.loc14_21.2 as %Interface.ref; // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic impl @impl.5(%T.loc18: %.2) { -// CHECK:STDOUT: %T.1: %.2 = bind_symbolic_name T, 0 [symbolic = %T.1 (constants.%T.1)] +// CHECK:STDOUT: generic impl @impl.5(%T.loc18: %I.type) { +// CHECK:STDOUT: %T.1: %I.type = bind_symbolic_name T, 0 [symbolic = %T.1 (constants.%T.1)] // CHECK:STDOUT: // CHECK:STDOUT: impl: %.loc18_21.2 as %Interface.ref { -// CHECK:STDOUT: %.loc18_36: = interface_witness () [template = constants.%.7] +// CHECK:STDOUT: %.loc18_36: = interface_witness () [template = constants.%.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: witness = %.loc18_36 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic impl @impl.6(%T.loc19: %.3) { -// CHECK:STDOUT: %T.1: %.3 = bind_symbolic_name T, 0 [symbolic = %T.1 (constants.%T.2)] +// CHECK:STDOUT: generic impl @impl.6(%T.loc19: %J.type) { +// CHECK:STDOUT: %T.1: %J.type = bind_symbolic_name T, 0 [symbolic = %T.1 (constants.%T.2)] // CHECK:STDOUT: // CHECK:STDOUT: impl: %.loc19_21.2 as %Interface.ref { -// CHECK:STDOUT: %.loc19_36: = interface_witness () [template = constants.%.7] +// CHECK:STDOUT: %.loc19_36: = interface_witness () [template = constants.%.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: witness = %.loc19_36 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic impl @impl.7(%T.loc20: %.4) { -// CHECK:STDOUT: %T.1: %.4 = bind_symbolic_name T, 0 [symbolic = %T.1 (constants.%T.3)] +// CHECK:STDOUT: generic impl @impl.7(%T.loc20: %K.type) { +// CHECK:STDOUT: %T.1: %K.type = bind_symbolic_name T, 0 [symbolic = %T.1 (constants.%T.3)] // CHECK:STDOUT: // CHECK:STDOUT: impl: %.loc20_21.2 as %Interface.ref { -// CHECK:STDOUT: %.loc20_36: = interface_witness () [template = constants.%.7] +// CHECK:STDOUT: %.loc20_36: = interface_witness () [template = constants.%.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: witness = %.loc20_36 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic impl @impl.8(%T.loc21: %.5) { -// CHECK:STDOUT: %T.1: %.5 = bind_symbolic_name T, 0 [symbolic = %T.1 (constants.%T.4)] +// CHECK:STDOUT: generic impl @impl.8(%T.loc21: %L.type) { +// CHECK:STDOUT: %T.1: %L.type = bind_symbolic_name T, 0 [symbolic = %T.1 (constants.%T.4)] // CHECK:STDOUT: // CHECK:STDOUT: impl: %.loc21_21.2 as %Interface.ref { -// CHECK:STDOUT: %.loc21_36: = interface_witness () [template = constants.%.7] +// CHECK:STDOUT: %.loc21_36: = interface_witness () [template = constants.%.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: witness = %.loc21_36 @@ -330,13 +330,13 @@ impl (C, C).0 as I {} // CHECK:STDOUT: --- fail_same_self_and_interface_redefined.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: type = interface_type @I [template] -// CHECK:STDOUT: %Self.1: %.1 = bind_symbolic_name Self, 0 [symbolic] -// CHECK:STDOUT: %.2: type = interface_type @J [template] -// CHECK:STDOUT: %Self.2: %.2 = bind_symbolic_name Self, 0 [symbolic] -// CHECK:STDOUT: %T: %.1 = bind_symbolic_name T, 0 [symbolic] -// CHECK:STDOUT: %.3: type = tuple_type () [template] -// CHECK:STDOUT: %.4: = interface_witness () [template] +// CHECK:STDOUT: %I.type: type = interface_type @I [template] +// CHECK:STDOUT: %Self.1: %I.type = bind_symbolic_name Self, 0 [symbolic] +// CHECK:STDOUT: %J.type: type = interface_type @J [template] +// CHECK:STDOUT: %Self.2: %J.type = bind_symbolic_name Self, 0 [symbolic] +// CHECK:STDOUT: %T: %I.type = bind_symbolic_name T, 0 [symbolic] +// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %.2: = interface_witness () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -344,34 +344,34 @@ impl (C, C).0 as I {} // CHECK:STDOUT: .I = %I.decl // CHECK:STDOUT: .J = %J.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %I.decl: type = interface_decl @I [template = constants.%.1] {} {} -// CHECK:STDOUT: %J.decl: type = interface_decl @J [template = constants.%.2] {} {} +// CHECK:STDOUT: %I.decl: type = interface_decl @I [template = constants.%I.type] {} {} +// CHECK:STDOUT: %J.decl: type = interface_decl @J [template = constants.%J.type] {} {} // CHECK:STDOUT: impl_decl @impl [template] { -// CHECK:STDOUT: %T.patt: %.1 = symbolic_binding_pattern T, 0 +// CHECK:STDOUT: %T.patt: %I.type = symbolic_binding_pattern T, 0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %I.ref.loc7: type = name_ref I, file.%I.decl [template = constants.%.1] -// CHECK:STDOUT: %T.param.loc7: %.1 = param T, runtime_param -// CHECK:STDOUT: %T.loc7: %.1 = bind_symbolic_name T, 0, %T.param.loc7 [symbolic = %T.1 (constants.%T)] -// CHECK:STDOUT: %T.ref.loc7: %.1 = name_ref T, %T.loc7 [symbolic = %T.1 (constants.%T)] +// CHECK:STDOUT: %I.ref.loc7: type = name_ref I, file.%I.decl [template = constants.%I.type] +// CHECK:STDOUT: %T.param.loc7: %I.type = param T, runtime_param +// CHECK:STDOUT: %T.loc7: %I.type = bind_symbolic_name T, 0, %T.param.loc7 [symbolic = %T.1 (constants.%T)] +// CHECK:STDOUT: %T.ref.loc7: %I.type = name_ref T, %T.loc7 [symbolic = %T.1 (constants.%T)] // CHECK:STDOUT: %.loc7_21.1: type = facet_type_access %T.ref.loc7 [symbolic = %T.1 (constants.%T)] // CHECK:STDOUT: %.loc7_21.2: type = converted %T.ref.loc7, %.loc7_21.1 [symbolic = %T.1 (constants.%T)] -// CHECK:STDOUT: %J.ref.loc7: type = name_ref J, file.%J.decl [template = constants.%.2] +// CHECK:STDOUT: %J.ref.loc7: type = name_ref J, file.%J.decl [template = constants.%J.type] // CHECK:STDOUT: } // CHECK:STDOUT: impl_decl @impl [template] { -// CHECK:STDOUT: %T.patt: %.1 = symbolic_binding_pattern T, 0 +// CHECK:STDOUT: %T.patt: %I.type = symbolic_binding_pattern T, 0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %I.ref.loc14: type = name_ref I, file.%I.decl [template = constants.%.1] -// CHECK:STDOUT: %T.param.loc14: %.1 = param T, runtime_param -// CHECK:STDOUT: %T.loc14: %.1 = bind_symbolic_name T, 0, %T.param.loc14 [symbolic = constants.%T] -// CHECK:STDOUT: %T.ref.loc14: %.1 = name_ref T, %T.loc14 [symbolic = constants.%T] +// CHECK:STDOUT: %I.ref.loc14: type = name_ref I, file.%I.decl [template = constants.%I.type] +// CHECK:STDOUT: %T.param.loc14: %I.type = param T, runtime_param +// CHECK:STDOUT: %T.loc14: %I.type = bind_symbolic_name T, 0, %T.param.loc14 [symbolic = constants.%T] +// CHECK:STDOUT: %T.ref.loc14: %I.type = name_ref T, %T.loc14 [symbolic = constants.%T] // CHECK:STDOUT: %.loc14_21.1: type = facet_type_access %T.ref.loc14 [symbolic = constants.%T] // CHECK:STDOUT: %.loc14_21.2: type = converted %T.ref.loc14, %.loc14_21.1 [symbolic = constants.%T] -// CHECK:STDOUT: %J.ref.loc14: type = name_ref J, file.%J.decl [template = constants.%.2] +// CHECK:STDOUT: %J.ref.loc14: type = name_ref J, file.%J.decl [template = constants.%J.type] // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @I { -// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self, 0 [symbolic = constants.%Self.1] +// CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self.1] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -379,15 +379,15 @@ impl (C, C).0 as I {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @J { -// CHECK:STDOUT: %Self: %.2 = bind_symbolic_name Self, 0 [symbolic = constants.%Self.2] +// CHECK:STDOUT: %Self: %J.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self // CHECK:STDOUT: witness = () // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic impl @impl(%T.loc7: %.1) { -// CHECK:STDOUT: %T.1: %.1 = bind_symbolic_name T, 0 [symbolic = %T.1 (constants.%T)] +// CHECK:STDOUT: generic impl @impl(%T.loc7: %I.type) { +// CHECK:STDOUT: %T.1: %I.type = bind_symbolic_name T, 0 [symbolic = %T.1 (constants.%T)] // CHECK:STDOUT: // CHECK:STDOUT: impl: %.loc7_21.2 as %J.ref.loc7 { // CHECK:STDOUT: !members: @@ -403,14 +403,14 @@ impl (C, C).0 as I {} // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.1: type = interface_type @I [template] -// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self, 0 [symbolic] -// CHECK:STDOUT: %.2: type = tuple_type () [template] -// CHECK:STDOUT: %.3: = interface_witness () [template] -// CHECK:STDOUT: %.4: type = tuple_type (type, type) [template] -// CHECK:STDOUT: %.5: i32 = int_literal 0 [template] -// CHECK:STDOUT: %.6: type = ptr_type %.4 [template] -// CHECK:STDOUT: %tuple: %.4 = tuple_value (%C, %C) [template] +// CHECK:STDOUT: %I.type: type = interface_type @I [template] +// CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic] +// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %.2: = interface_witness () [template] +// CHECK:STDOUT: %.3: type = tuple_type (type, type) [template] +// CHECK:STDOUT: %.4: i32 = int_literal 0 [template] +// CHECK:STDOUT: %.5: type = ptr_type %.3 [template] +// CHECK:STDOUT: %tuple: %.3 = tuple_value (%C, %C) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -419,25 +419,25 @@ impl (C, C).0 as I {} // CHECK:STDOUT: .I = %I.decl // CHECK:STDOUT: } // CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {} {} -// CHECK:STDOUT: %I.decl: type = interface_decl @I [template = constants.%.1] {} {} +// CHECK:STDOUT: %I.decl: type = interface_decl @I [template = constants.%I.type] {} {} // CHECK:STDOUT: impl_decl @impl.1 [template] {} { // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [template = constants.%.1] +// CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [template = constants.%I.type] // CHECK:STDOUT: } // CHECK:STDOUT: impl_decl @impl.2 [template] {} { // CHECK:STDOUT: %C.ref.loc14_7: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %C.ref.loc14_10: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %.loc14_11.1: %.4 = tuple_literal (%C.ref.loc14_7, %C.ref.loc14_10) -// CHECK:STDOUT: %.loc14_13: i32 = int_literal 0 [template = constants.%.5] -// CHECK:STDOUT: %tuple: %.4 = tuple_value (%C.ref.loc14_7, %C.ref.loc14_10) [template = constants.%tuple] -// CHECK:STDOUT: %.loc14_11.2: %.4 = converted %.loc14_11.1, %tuple [template = constants.%tuple] +// CHECK:STDOUT: %.loc14_11.1: %.3 = tuple_literal (%C.ref.loc14_7, %C.ref.loc14_10) +// CHECK:STDOUT: %.loc14_13: i32 = int_literal 0 [template = constants.%.4] +// CHECK:STDOUT: %tuple: %.3 = tuple_value (%C.ref.loc14_7, %C.ref.loc14_10) [template = constants.%tuple] +// CHECK:STDOUT: %.loc14_11.2: %.3 = converted %.loc14_11.1, %tuple [template = constants.%tuple] // CHECK:STDOUT: %.loc14_12: type = tuple_access %.loc14_11.2, element0 [template = constants.%C] -// CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [template = constants.%.1] +// CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [template = constants.%I.type] // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @I { -// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self, 0 [symbolic = constants.%Self] +// CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -445,14 +445,14 @@ impl (C, C).0 as I {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.1: %C.ref as %I.ref { -// CHECK:STDOUT: %.loc13: = interface_witness () [template = constants.%.3] +// CHECK:STDOUT: %.loc13: = interface_witness () [template = constants.%.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: witness = %.loc13 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.2: %.loc14_12 as %I.ref { -// CHECK:STDOUT: %.loc14_20: = interface_witness () [template = constants.%.3] +// CHECK:STDOUT: %.loc14_20: = interface_witness () [template = constants.%.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: witness = %.loc14_20 diff --git a/toolchain/check/testdata/impl/no_prelude/import_generic.carbon b/toolchain/check/testdata/impl/no_prelude/import_generic.carbon index 47f9fa4310a79..7db2e72b64f54 100644 --- a/toolchain/check/testdata/impl/no_prelude/import_generic.carbon +++ b/toolchain/check/testdata/impl/no_prelude/import_generic.carbon @@ -44,14 +44,14 @@ impl forall [T:! type] C as I(T*) {} // CHECK:STDOUT: %.1: type = struct_type {} [template] // CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] -// CHECK:STDOUT: %I.type: type = generic_interface_type @I [template] +// CHECK:STDOUT: %I.type.1: type = generic_interface_type @I [template] // CHECK:STDOUT: %.3: type = tuple_type () [template] -// CHECK:STDOUT: %I: %I.type = struct_value () [template] -// CHECK:STDOUT: %.4: type = interface_type @I, @I(%T) [symbolic] -// CHECK:STDOUT: %Self: %.4 = bind_symbolic_name Self, 1 [symbolic] -// CHECK:STDOUT: %.5: type = ptr_type %T [symbolic] -// CHECK:STDOUT: %.6: type = interface_type @I, @I(%.5) [symbolic] -// CHECK:STDOUT: %.7: = interface_witness () [template] +// CHECK:STDOUT: %I: %I.type.1 = struct_value () [template] +// CHECK:STDOUT: %I.type.2: type = interface_type @I, @I(%T) [symbolic] +// CHECK:STDOUT: %Self: %I.type.2 = bind_symbolic_name Self, 1 [symbolic] +// CHECK:STDOUT: %.4: type = ptr_type %T [symbolic] +// CHECK:STDOUT: %I.type.3: type = interface_type @I, @I(%.4) [symbolic] +// CHECK:STDOUT: %.5: = interface_witness () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -60,7 +60,7 @@ impl forall [T:! type] C as I(T*) {} // CHECK:STDOUT: .I = %I.decl // CHECK:STDOUT: } // CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {} {} -// CHECK:STDOUT: %I.decl: %I.type = interface_decl @I [template = constants.%I] { +// CHECK:STDOUT: %I.decl: %I.type.1 = interface_decl @I [template = constants.%I] { // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 // CHECK:STDOUT: } { // CHECK:STDOUT: %T.param: type = param T, runtime_param @@ -72,9 +72,9 @@ impl forall [T:! type] C as I(T*) {} // CHECK:STDOUT: %T.param: type = param T, runtime_param // CHECK:STDOUT: %T.loc7: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.1 (constants.%T)] // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %I.ref: %I.type = name_ref I, file.%I.decl [template = constants.%I] +// CHECK:STDOUT: %I.ref: %I.type.1 = name_ref I, file.%I.decl [template = constants.%I] // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc7 [symbolic = %T.1 (constants.%T)] -// CHECK:STDOUT: %.loc7: type = interface_type @I, @I(constants.%T) [symbolic = %.1 (constants.%.4)] +// CHECK:STDOUT: %I.type.loc7: type = interface_type @I, @I(constants.%T) [symbolic = %I.type.1 (constants.%I.type.2)] // CHECK:STDOUT: } // CHECK:STDOUT: impl_decl @impl.2 [template] { // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 @@ -82,10 +82,10 @@ impl forall [T:! type] C as I(T*) {} // CHECK:STDOUT: %T.param: type = param T, runtime_param // CHECK:STDOUT: %T.loc8: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.1 (constants.%T)] // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %I.ref: %I.type = name_ref I, file.%I.decl [template = constants.%I] +// CHECK:STDOUT: %I.ref: %I.type.1 = name_ref I, file.%I.decl [template = constants.%I] // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc8 [symbolic = %T.1 (constants.%T)] -// CHECK:STDOUT: %.loc8_32: type = ptr_type %T [symbolic = %.1 (constants.%.5)] -// CHECK:STDOUT: %.loc8_30: type = interface_type @I, @I(constants.%.5) [symbolic = %.2 (constants.%.6)] +// CHECK:STDOUT: %.loc8_32: type = ptr_type %T [symbolic = %.1 (constants.%.4)] +// CHECK:STDOUT: %I.type.loc8: type = interface_type @I, @I(constants.%.4) [symbolic = %I.type.1 (constants.%I.type.3)] // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -93,11 +93,11 @@ impl forall [T:! type] C as I(T*) {} // CHECK:STDOUT: %T.1: type = bind_symbolic_name T, 0 [symbolic = %T.1 (constants.%T)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.1: type = interface_type @I, @I(%T.1) [symbolic = %.1 (constants.%.4)] -// CHECK:STDOUT: %Self.2: %.4 = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self)] +// CHECK:STDOUT: %I.type: type = interface_type @I, @I(%T.1) [symbolic = %I.type (constants.%I.type.2)] +// CHECK:STDOUT: %Self.2: %I.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self)] // CHECK:STDOUT: // CHECK:STDOUT: interface { -// CHECK:STDOUT: %Self.1: @I.%.1 (%.4) = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self)] +// CHECK:STDOUT: %Self.1: @I.%I.type (%I.type.2) = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self)] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self.1 @@ -107,18 +107,18 @@ impl forall [T:! type] C as I(T*) {} // CHECK:STDOUT: // CHECK:STDOUT: generic impl @impl.1(%T.loc7: type) { // CHECK:STDOUT: %T.1: type = bind_symbolic_name T, 0 [symbolic = %T.1 (constants.%T)] -// CHECK:STDOUT: %.1: type = interface_type @I, @I(%T.1) [symbolic = %.1 (constants.%.4)] +// CHECK:STDOUT: %I.type.1: type = interface_type @I, @I(%T.1) [symbolic = %I.type.1 (constants.%I.type.2)] // CHECK:STDOUT: -// CHECK:STDOUT: impl: %C.ref as %.loc7; +// CHECK:STDOUT: impl: %C.ref as %I.type.loc7; // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic impl @impl.2(%T.loc8: type) { // CHECK:STDOUT: %T.1: type = bind_symbolic_name T, 0 [symbolic = %T.1 (constants.%T)] -// CHECK:STDOUT: %.1: type = ptr_type @impl.2.%T.1 (%T) [symbolic = %.1 (constants.%.5)] -// CHECK:STDOUT: %.2: type = interface_type @I, @I(%.1) [symbolic = %.2 (constants.%.6)] +// CHECK:STDOUT: %.1: type = ptr_type @impl.2.%T.1 (%T) [symbolic = %.1 (constants.%.4)] +// CHECK:STDOUT: %I.type.1: type = interface_type @I, @I(%.1) [symbolic = %I.type.1 (constants.%I.type.3)] // CHECK:STDOUT: -// CHECK:STDOUT: impl: %C.ref as %.loc8_30 { -// CHECK:STDOUT: %.loc8_35: = interface_witness () [template = constants.%.7] +// CHECK:STDOUT: impl: %C.ref as %I.type.loc8 { +// CHECK:STDOUT: %.loc8_35: = interface_witness () [template = constants.%.5] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: witness = %.loc8_35 @@ -146,54 +146,54 @@ impl forall [T:! type] C as I(T*) {} // CHECK:STDOUT: // CHECK:STDOUT: specific @impl.1(constants.%T) { // CHECK:STDOUT: %T.1 => constants.%T -// CHECK:STDOUT: %.1 => constants.%.4 +// CHECK:STDOUT: %I.type.1 => constants.%I.type.2 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @I(constants.%.5) { -// CHECK:STDOUT: %T.1 => constants.%.5 +// CHECK:STDOUT: specific @I(constants.%.4) { +// CHECK:STDOUT: %T.1 => constants.%.4 // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.1 => constants.%.6 +// CHECK:STDOUT: %I.type => constants.%I.type.3 // CHECK:STDOUT: %Self.2 => constants.%Self // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @I(@impl.2.%.1) { -// CHECK:STDOUT: %T.1 => constants.%.5 +// CHECK:STDOUT: %T.1 => constants.%.4 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @impl.2(constants.%T) { // CHECK:STDOUT: %T.1 => constants.%T -// CHECK:STDOUT: %.1 => constants.%.5 -// CHECK:STDOUT: %.2 => constants.%.6 +// CHECK:STDOUT: %.1 => constants.%.4 +// CHECK:STDOUT: %I.type.1 => constants.%I.type.3 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- import_generic.impl.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] -// CHECK:STDOUT: %I.type: type = generic_interface_type @I [template] +// CHECK:STDOUT: %I.type.1: type = generic_interface_type @I [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %I: %I.type = struct_value () [template] -// CHECK:STDOUT: %.2: type = interface_type @I, @I(%T) [symbolic] -// CHECK:STDOUT: %Self.1: @I.%.1 (%.2) = bind_symbolic_name Self, 1 [symbolic] +// CHECK:STDOUT: %I: %I.type.1 = struct_value () [template] +// CHECK:STDOUT: %I.type.2: type = interface_type @I, @I(%T) [symbolic] +// CHECK:STDOUT: %Self.1: @I.%I.type (%I.type.2) = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.3: type = struct_type {} [template] -// CHECK:STDOUT: %.4: = complete_type_witness %.3 [template] -// CHECK:STDOUT: %Self.2: %.2 = bind_symbolic_name Self, 1 [symbolic] -// CHECK:STDOUT: %.5: type = ptr_type %T [symbolic] -// CHECK:STDOUT: %.6: type = interface_type @I, @I(%.5) [symbolic] -// CHECK:STDOUT: %.7: = interface_witness () [template] +// CHECK:STDOUT: %.2: type = struct_type {} [template] +// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] +// CHECK:STDOUT: %Self.2: %I.type.2 = bind_symbolic_name Self, 1 [symbolic] +// CHECK:STDOUT: %.4: type = ptr_type %T [symbolic] +// CHECK:STDOUT: %I.type.3: type = interface_type @I, @I(%.4) [symbolic] +// CHECK:STDOUT: %.5: = interface_witness () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %import_ref.1: type = import_ref Main//import_generic, inst+1, loaded [template = constants.%C] -// CHECK:STDOUT: %import_ref.2: %I.type = import_ref Main//import_generic, inst+10, loaded [template = constants.%I] +// CHECK:STDOUT: %import_ref.2: %I.type.1 = import_ref Main//import_generic, inst+10, loaded [template = constants.%I] // CHECK:STDOUT: %import_ref.3 = import_ref Main//import_generic, inst+16, unloaded // CHECK:STDOUT: %import_ref.4 = import_ref Main//import_generic, inst+2, unloaded // CHECK:STDOUT: %import_ref.5: type = import_ref Main//import_generic, inst+23, loaded [template = constants.%C] -// CHECK:STDOUT: %import_ref.6: type = import_ref Main//import_generic, inst+26, loaded [symbolic = @impl.1.%.1 (constants.%.2)] +// CHECK:STDOUT: %import_ref.6: type = import_ref Main//import_generic, inst+26, loaded [symbolic = @impl.1.%I.type.1 (constants.%I.type.2)] // CHECK:STDOUT: %import_ref.7: type = import_ref Main//import_generic, inst+33, loaded [template = constants.%C] -// CHECK:STDOUT: %import_ref.8: type = import_ref Main//import_generic, inst+38, loaded [symbolic = @impl.2.%.2 (constants.%.6)] +// CHECK:STDOUT: %import_ref.8: type = import_ref Main//import_generic, inst+38, loaded [symbolic = @impl.2.%I.type (constants.%I.type.3)] // CHECK:STDOUT: %import_ref.9 = import_ref Main//import_generic, inst+44, unloaded // CHECK:STDOUT: } // CHECK:STDOUT: @@ -208,9 +208,9 @@ impl forall [T:! type] C as I(T*) {} // CHECK:STDOUT: %T.param: type = param T, runtime_param // CHECK:STDOUT: %T.loc4: type = bind_symbolic_name T, 0, %T.param [symbolic = constants.%T] // CHECK:STDOUT: %C.ref: type = name_ref C, imports.%import_ref.1 [template = constants.%C] -// CHECK:STDOUT: %I.ref: %I.type = name_ref I, imports.%import_ref.2 [template = constants.%I] +// CHECK:STDOUT: %I.ref: %I.type.1 = name_ref I, imports.%import_ref.2 [template = constants.%I] // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc4 [symbolic = constants.%T] -// CHECK:STDOUT: %.loc4_30: type = interface_type @I, @I(constants.%T) [symbolic = constants.%.2] +// CHECK:STDOUT: %I.type.loc4: type = interface_type @I, @I(constants.%T) [symbolic = constants.%I.type.2] // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -218,8 +218,8 @@ impl forall [T:! type] C as I(T*) {} // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.1: type = interface_type @I, @I(%T) [symbolic = %.1 (constants.%.2)] -// CHECK:STDOUT: %Self: %.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] +// CHECK:STDOUT: %I.type: type = interface_type @I, @I(%T) [symbolic = %I.type (constants.%I.type.2)] +// CHECK:STDOUT: %Self: %I.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: !members: @@ -230,20 +230,20 @@ impl forall [T:! type] C as I(T*) {} // CHECK:STDOUT: // CHECK:STDOUT: generic impl @impl.1(constants.%T: type) { // CHECK:STDOUT: %T.1: type = bind_symbolic_name T, 0 [symbolic = %T.1 (constants.%T)] -// CHECK:STDOUT: %.1: type = interface_type @I, @I(%T.1) [symbolic = %.1 (constants.%.2)] +// CHECK:STDOUT: %I.type.1: type = interface_type @I, @I(%T.1) [symbolic = %I.type.1 (constants.%I.type.2)] // CHECK:STDOUT: // CHECK:STDOUT: impl: imports.%import_ref.5 as imports.%import_ref.6 { -// CHECK:STDOUT: %.loc4_34: = interface_witness () [template = constants.%.7] +// CHECK:STDOUT: %.loc4: = interface_witness () [template = constants.%.5] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: witness = %.loc4_34 +// CHECK:STDOUT: witness = %.loc4 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic impl @impl.2(constants.%T: type) { // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T)] -// CHECK:STDOUT: %.1: type = ptr_type @impl.2.%T (%T) [symbolic = %.1 (constants.%.5)] -// CHECK:STDOUT: %.2: type = interface_type @I, @I(%.1) [symbolic = %.2 (constants.%.6)] +// CHECK:STDOUT: %.1: type = ptr_type @impl.2.%T (%T) [symbolic = %.1 (constants.%.4)] +// CHECK:STDOUT: %I.type: type = interface_type @I, @I(%.1) [symbolic = %I.type (constants.%I.type.3)] // CHECK:STDOUT: // CHECK:STDOUT: impl: imports.%import_ref.7 as imports.%import_ref.8 { // CHECK:STDOUT: !members: @@ -260,7 +260,7 @@ impl forall [T:! type] C as I(T*) {} // CHECK:STDOUT: %T => constants.%T // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.1 => constants.%.2 +// CHECK:STDOUT: %I.type => constants.%I.type.2 // CHECK:STDOUT: %Self => constants.%Self.2 // CHECK:STDOUT: } // CHECK:STDOUT: @@ -274,49 +274,49 @@ impl forall [T:! type] C as I(T*) {} // CHECK:STDOUT: // CHECK:STDOUT: specific @impl.1(constants.%T) { // CHECK:STDOUT: %T.1 => constants.%T -// CHECK:STDOUT: %.1 => constants.%.2 +// CHECK:STDOUT: %I.type.1 => constants.%I.type.2 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @I(constants.%.5) { -// CHECK:STDOUT: %T => constants.%.5 +// CHECK:STDOUT: specific @I(constants.%.4) { +// CHECK:STDOUT: %T => constants.%.4 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @I(@impl.2.%.1) { -// CHECK:STDOUT: %T => constants.%.5 +// CHECK:STDOUT: %T => constants.%.4 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @impl.2(constants.%T) { // CHECK:STDOUT: %T => constants.%T -// CHECK:STDOUT: %.1 => constants.%.5 -// CHECK:STDOUT: %.2 => constants.%.6 +// CHECK:STDOUT: %.1 => constants.%.4 +// CHECK:STDOUT: %I.type => constants.%I.type.3 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- fail_import_generic.impl.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] -// CHECK:STDOUT: %I.type: type = generic_interface_type @I [template] +// CHECK:STDOUT: %I.type.1: type = generic_interface_type @I [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %I: %I.type = struct_value () [template] -// CHECK:STDOUT: %.2: type = interface_type @I, @I(%T) [symbolic] -// CHECK:STDOUT: %Self.1: @I.%.1 (%.2) = bind_symbolic_name Self, 1 [symbolic] +// CHECK:STDOUT: %I: %I.type.1 = struct_value () [template] +// CHECK:STDOUT: %I.type.2: type = interface_type @I, @I(%T) [symbolic] +// CHECK:STDOUT: %Self.1: @I.%I.type (%I.type.2) = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.3: type = struct_type {} [template] -// CHECK:STDOUT: %.4: = complete_type_witness %.3 [template] -// CHECK:STDOUT: %Self.2: %.2 = bind_symbolic_name Self, 1 [symbolic] -// CHECK:STDOUT: %.5: type = ptr_type %T [symbolic] -// CHECK:STDOUT: %.6: type = interface_type @I, @I(%.5) [symbolic] +// CHECK:STDOUT: %.2: type = struct_type {} [template] +// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] +// CHECK:STDOUT: %Self.2: %I.type.2 = bind_symbolic_name Self, 1 [symbolic] +// CHECK:STDOUT: %.4: type = ptr_type %T [symbolic] +// CHECK:STDOUT: %I.type.3: type = interface_type @I, @I(%.4) [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %import_ref.1: type = import_ref Main//import_generic, inst+1, loaded [template = constants.%C] -// CHECK:STDOUT: %import_ref.2: %I.type = import_ref Main//import_generic, inst+10, loaded [template = constants.%I] +// CHECK:STDOUT: %import_ref.2: %I.type.1 = import_ref Main//import_generic, inst+10, loaded [template = constants.%I] // CHECK:STDOUT: %import_ref.3 = import_ref Main//import_generic, inst+16, unloaded // CHECK:STDOUT: %import_ref.4 = import_ref Main//import_generic, inst+2, unloaded // CHECK:STDOUT: %import_ref.5: type = import_ref Main//import_generic, inst+23, loaded [template = constants.%C] -// CHECK:STDOUT: %import_ref.6: type = import_ref Main//import_generic, inst+26, loaded [symbolic = @impl.1.%.1 (constants.%.2)] +// CHECK:STDOUT: %import_ref.6: type = import_ref Main//import_generic, inst+26, loaded [symbolic = @impl.1.%I.type (constants.%I.type.2)] // CHECK:STDOUT: %import_ref.7: type = import_ref Main//import_generic, inst+33, loaded [template = constants.%C] -// CHECK:STDOUT: %import_ref.8: type = import_ref Main//import_generic, inst+38, loaded [symbolic = @impl.2.%.2 (constants.%.6)] +// CHECK:STDOUT: %import_ref.8: type = import_ref Main//import_generic, inst+38, loaded [symbolic = @impl.2.%I.type.1 (constants.%I.type.3)] // CHECK:STDOUT: %import_ref.9 = import_ref Main//import_generic, inst+44, unloaded // CHECK:STDOUT: } // CHECK:STDOUT: @@ -331,10 +331,10 @@ impl forall [T:! type] C as I(T*) {} // CHECK:STDOUT: %T.param: type = param T, runtime_param // CHECK:STDOUT: %T.loc11: type = bind_symbolic_name T, 0, %T.param [symbolic = constants.%T] // CHECK:STDOUT: %C.ref: type = name_ref C, imports.%import_ref.1 [template = constants.%C] -// CHECK:STDOUT: %I.ref: %I.type = name_ref I, imports.%import_ref.2 [template = constants.%I] +// CHECK:STDOUT: %I.ref: %I.type.1 = name_ref I, imports.%import_ref.2 [template = constants.%I] // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc11 [symbolic = constants.%T] -// CHECK:STDOUT: %.loc11_32: type = ptr_type %T [symbolic = constants.%.5] -// CHECK:STDOUT: %.loc11_30: type = interface_type @I, @I(constants.%.5) [symbolic = constants.%.6] +// CHECK:STDOUT: %.loc11: type = ptr_type %T [symbolic = constants.%.4] +// CHECK:STDOUT: %I.type.loc11: type = interface_type @I, @I(constants.%.4) [symbolic = constants.%I.type.3] // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -342,8 +342,8 @@ impl forall [T:! type] C as I(T*) {} // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.1: type = interface_type @I, @I(%T) [symbolic = %.1 (constants.%.2)] -// CHECK:STDOUT: %Self: %.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] +// CHECK:STDOUT: %I.type: type = interface_type @I, @I(%T) [symbolic = %I.type (constants.%I.type.2)] +// CHECK:STDOUT: %Self: %I.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: !members: @@ -354,15 +354,15 @@ impl forall [T:! type] C as I(T*) {} // CHECK:STDOUT: // CHECK:STDOUT: generic impl @impl.1(constants.%T: type) { // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T)] -// CHECK:STDOUT: %.1: type = interface_type @I, @I(%T) [symbolic = %.1 (constants.%.2)] +// CHECK:STDOUT: %I.type: type = interface_type @I, @I(%T) [symbolic = %I.type (constants.%I.type.2)] // CHECK:STDOUT: // CHECK:STDOUT: impl: imports.%import_ref.5 as imports.%import_ref.6; // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic impl @impl.2(constants.%T: type) { // CHECK:STDOUT: %T.1: type = bind_symbolic_name T, 0 [symbolic = %T.1 (constants.%T)] -// CHECK:STDOUT: %.1: type = ptr_type @impl.2.%T.1 (%T) [symbolic = %.1 (constants.%.5)] -// CHECK:STDOUT: %.2: type = interface_type @I, @I(%.1) [symbolic = %.2 (constants.%.6)] +// CHECK:STDOUT: %.1: type = ptr_type @impl.2.%T.1 (%T) [symbolic = %.1 (constants.%.4)] +// CHECK:STDOUT: %I.type.1: type = interface_type @I, @I(%.1) [symbolic = %I.type.1 (constants.%I.type.3)] // CHECK:STDOUT: // CHECK:STDOUT: impl: imports.%import_ref.7 as imports.%import_ref.8 { // CHECK:STDOUT: !members: @@ -389,20 +389,20 @@ impl forall [T:! type] C as I(T*) {} // CHECK:STDOUT: // CHECK:STDOUT: specific @impl.1(constants.%T) { // CHECK:STDOUT: %T => constants.%T -// CHECK:STDOUT: %.1 => constants.%.2 +// CHECK:STDOUT: %I.type => constants.%I.type.2 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @I(constants.%.5) { -// CHECK:STDOUT: %T => constants.%.5 +// CHECK:STDOUT: specific @I(constants.%.4) { +// CHECK:STDOUT: %T => constants.%.4 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @I(@impl.2.%.1) { -// CHECK:STDOUT: %T => constants.%.5 +// CHECK:STDOUT: %T => constants.%.4 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @impl.2(constants.%T) { // CHECK:STDOUT: %T.1 => constants.%T -// CHECK:STDOUT: %.1 => constants.%.5 -// CHECK:STDOUT: %.2 => constants.%.6 +// CHECK:STDOUT: %.1 => constants.%.4 +// CHECK:STDOUT: %I.type.1 => constants.%I.type.3 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/impl/no_prelude/import_self.carbon b/toolchain/check/testdata/impl/no_prelude/import_self.carbon index 973352188d2d7..004024c9a6e6c 100644 --- a/toolchain/check/testdata/impl/no_prelude/import_self.carbon +++ b/toolchain/check/testdata/impl/no_prelude/import_self.carbon @@ -33,44 +33,44 @@ fn F(x: (), y: ()) -> () { // CHECK:STDOUT: --- a.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: type = interface_type @Add [template] -// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self, 0 [symbolic] +// CHECK:STDOUT: %Add.type: type = interface_type @Add [template] +// CHECK:STDOUT: %Self: %Add.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %Op.type: type = fn_type @Op [template] -// CHECK:STDOUT: %.2: type = tuple_type () [template] +// CHECK:STDOUT: %.1: type = tuple_type () [template] // CHECK:STDOUT: %Op: %Op.type = struct_value () [template] -// CHECK:STDOUT: %.3: type = assoc_entity_type %.1, %Op.type [template] -// CHECK:STDOUT: %.4: %.3 = assoc_entity element0, @Add.%Op.decl [template] +// CHECK:STDOUT: %.2: type = assoc_entity_type %Add.type, %Op.type [template] +// CHECK:STDOUT: %.3: %.2 = assoc_entity element0, @Add.%Op.decl [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: package: = namespace [template] { // CHECK:STDOUT: .Add = %Add.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %Add.decl: type = interface_decl @Add [template = constants.%.1] {} {} +// CHECK:STDOUT: %Add.decl: type = interface_decl @Add [template = constants.%Add.type] {} {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @Add { -// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self, 0 [symbolic = constants.%Self] +// CHECK:STDOUT: %Self: %Add.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self] // CHECK:STDOUT: %Op.decl: %Op.type = fn_decl @Op [template = constants.%Op] { // CHECK:STDOUT: %self.patt: @Op.%Self (%Self) = binding_pattern self // CHECK:STDOUT: %other.patt: @Op.%Self (%Self) = binding_pattern other // CHECK:STDOUT: } { -// CHECK:STDOUT: %Self.ref.loc5_15: %.1 = name_ref Self, @Add.%Self [symbolic = %Self (constants.%Self)] +// CHECK:STDOUT: %Self.ref.loc5_15: %Add.type = name_ref Self, @Add.%Self [symbolic = %Self (constants.%Self)] // CHECK:STDOUT: %.loc5_15.1: type = facet_type_access %Self.ref.loc5_15 [symbolic = %Self (constants.%Self)] // CHECK:STDOUT: %.loc5_15.2: type = converted %Self.ref.loc5_15, %.loc5_15.1 [symbolic = %Self (constants.%Self)] // CHECK:STDOUT: %self.param: @Op.%Self (%Self) = param self, runtime_param0 // CHECK:STDOUT: %self: @Op.%Self (%Self) = bind_name self, %self.param -// CHECK:STDOUT: %Self.ref.loc5_28: %.1 = name_ref Self, @Add.%Self [symbolic = %Self (constants.%Self)] +// CHECK:STDOUT: %Self.ref.loc5_28: %Add.type = name_ref Self, @Add.%Self [symbolic = %Self (constants.%Self)] // CHECK:STDOUT: %.loc5_28.1: type = facet_type_access %Self.ref.loc5_28 [symbolic = %Self (constants.%Self)] // CHECK:STDOUT: %.loc5_28.2: type = converted %Self.ref.loc5_28, %.loc5_28.1 [symbolic = %Self (constants.%Self)] // CHECK:STDOUT: %other.param: @Op.%Self (%Self) = param other, runtime_param1 // CHECK:STDOUT: %other: @Op.%Self (%Self) = bind_name other, %other.param -// CHECK:STDOUT: %Self.ref.loc5_37: %.1 = name_ref Self, @Add.%Self [symbolic = %Self (constants.%Self)] +// CHECK:STDOUT: %Self.ref.loc5_37: %Add.type = name_ref Self, @Add.%Self [symbolic = %Self (constants.%Self)] // CHECK:STDOUT: %.loc5_37.1: type = facet_type_access %Self.ref.loc5_37 [symbolic = %Self (constants.%Self)] // CHECK:STDOUT: %.loc5_37.2: type = converted %Self.ref.loc5_37, %.loc5_37.1 [symbolic = %Self (constants.%Self)] // CHECK:STDOUT: %return: ref @Op.%Self (%Self) = var // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc5: %.3 = assoc_entity element0, %Op.decl [template = constants.%.4] +// CHECK:STDOUT: %.loc5: %.2 = assoc_entity element0, %Op.decl [template = constants.%.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -78,8 +78,8 @@ fn F(x: (), y: ()) -> () { // CHECK:STDOUT: witness = (%Op.decl) // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @Op(@Add.%Self: %.1) { -// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self)] +// CHECK:STDOUT: generic fn @Op(@Add.%Self: %Add.type) { +// CHECK:STDOUT: %Self: %Add.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self)] // CHECK:STDOUT: // CHECK:STDOUT: fn[%self: @Op.%Self (%Self)](%other: @Op.%Self (%Self)) -> @Op.%Self (%Self); // CHECK:STDOUT: } @@ -92,24 +92,24 @@ fn F(x: (), y: ()) -> () { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %.2: type = interface_type @Add [template] -// CHECK:STDOUT: %Self: %.2 = bind_symbolic_name Self, 0 [symbolic] +// CHECK:STDOUT: %Add.type: type = interface_type @Add [template] +// CHECK:STDOUT: %Self: %Add.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %Op.type.1: type = fn_type @Op.1 [template] // CHECK:STDOUT: %Op.1: %Op.type.1 = struct_value () [template] // CHECK:STDOUT: %Op.type.2: type = fn_type @Op.2 [template] // CHECK:STDOUT: %Op.2: %Op.type.2 = struct_value () [template] -// CHECK:STDOUT: %.3: = interface_witness (%Op.1) [template] +// CHECK:STDOUT: %.2: = interface_witness (%Op.1) [template] // CHECK:STDOUT: %tuple: %.1 = tuple_value () [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.4: type = assoc_entity_type %.2, %Op.type.2 [template] -// CHECK:STDOUT: %.5: %.4 = assoc_entity element0, imports.%import_ref.5 [template] +// CHECK:STDOUT: %.3: type = assoc_entity_type %Add.type, %Op.type.2 [template] +// CHECK:STDOUT: %.4: %.3 = assoc_entity element0, imports.%import_ref.5 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { -// CHECK:STDOUT: %import_ref.1: type = import_ref Main//a, inst+1, loaded [template = constants.%.2] +// CHECK:STDOUT: %import_ref.1: type = import_ref Main//a, inst+1, loaded [template = constants.%Add.type] // CHECK:STDOUT: %import_ref.2 = import_ref Main//a, inst+3, unloaded -// CHECK:STDOUT: %import_ref.3: %.4 = import_ref Main//a, inst+27, loaded [template = constants.%.5] +// CHECK:STDOUT: %import_ref.3: %.3 = import_ref Main//a, inst+27, loaded [template = constants.%.4] // CHECK:STDOUT: %import_ref.4: %Op.type.2 = import_ref Main//a, inst+21, loaded [template = constants.%Op.2] // CHECK:STDOUT: %import_ref.5 = import_ref Main//a, inst+21, unloaded // CHECK:STDOUT: } @@ -123,7 +123,7 @@ fn F(x: (), y: ()) -> () { // CHECK:STDOUT: impl_decl @impl [template] {} { // CHECK:STDOUT: %.loc6_7.1: %.1 = tuple_literal () // CHECK:STDOUT: %.loc6_7.2: type = converted %.loc6_7.1, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %Add.ref: type = name_ref Add, imports.%import_ref.1 [template = constants.%.2] +// CHECK:STDOUT: %Add.ref: type = name_ref Add, imports.%import_ref.1 [template = constants.%Add.type] // CHECK:STDOUT: } // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %x.patt: %.1 = binding_pattern x @@ -164,7 +164,7 @@ fn F(x: (), y: ()) -> () { // CHECK:STDOUT: %Self.ref.loc7_37: type = name_ref Self, @impl.%.loc6_7.2 [template = constants.%.1] // CHECK:STDOUT: %return: ref %.1 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc6_16: = interface_witness (%Op.decl) [template = constants.%.3] +// CHECK:STDOUT: %.loc6_16: = interface_witness (%Op.decl) [template = constants.%.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Op = %Op.decl @@ -179,8 +179,8 @@ fn F(x: (), y: ()) -> () { // CHECK:STDOUT: return %.loc7_53 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @Op.2(constants.%Self: %.2) { -// CHECK:STDOUT: %Self: %.2 = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self)] +// CHECK:STDOUT: generic fn @Op.2(constants.%Self: %Add.type) { +// CHECK:STDOUT: %Self: %Add.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self)] // CHECK:STDOUT: // CHECK:STDOUT: fn[%self: @Op.2.%Self (%Self)](%other: @Op.2.%Self (%Self)) -> @Op.2.%Self (%Self); // CHECK:STDOUT: } @@ -188,9 +188,9 @@ fn F(x: (), y: ()) -> () { // CHECK:STDOUT: fn @F(%x: %.1, %y: %.1) -> %.1 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %x.ref: %.1 = name_ref x, %x -// CHECK:STDOUT: %Add.ref: type = name_ref Add, imports.%import_ref.1 [template = constants.%.2] -// CHECK:STDOUT: %Op.ref: %.4 = name_ref Op, imports.%import_ref.3 [template = constants.%.5] -// CHECK:STDOUT: %.loc11_11.1: %Op.type.2 = interface_witness_access constants.%.3, element0 [template = constants.%Op.1] +// CHECK:STDOUT: %Add.ref: type = name_ref Add, imports.%import_ref.1 [template = constants.%Add.type] +// CHECK:STDOUT: %Op.ref: %.3 = name_ref Op, imports.%import_ref.3 [template = constants.%.4] +// CHECK:STDOUT: %.loc11_11.1: %Op.type.2 = interface_witness_access constants.%.2, element0 [template = constants.%Op.1] // CHECK:STDOUT: %.loc11_11.2: = bound_method %x.ref, %.loc11_11.1 // CHECK:STDOUT: %y.ref: %.1 = name_ref y, %y // CHECK:STDOUT: %Op.call: init %.1 = call %.loc11_11.2(%x.ref, %y.ref) diff --git a/toolchain/check/testdata/impl/no_prelude/interface_args.carbon b/toolchain/check/testdata/impl/no_prelude/interface_args.carbon index 686e9122d6a0d..628dd104c0380 100644 --- a/toolchain/check/testdata/impl/no_prelude/interface_args.carbon +++ b/toolchain/check/testdata/impl/no_prelude/interface_args.carbon @@ -82,31 +82,31 @@ fn MakeC(a: A) -> C { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] -// CHECK:STDOUT: %Action.type: type = generic_interface_type @Action [template] +// CHECK:STDOUT: %Action.type.1: type = generic_interface_type @Action [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Action: %Action.type = struct_value () [template] -// CHECK:STDOUT: %.2: type = interface_type @Action, @Action(%T) [symbolic] -// CHECK:STDOUT: %Self: %.2 = bind_symbolic_name Self, 1 [symbolic] +// CHECK:STDOUT: %Action: %Action.type.1 = struct_value () [template] +// CHECK:STDOUT: %Action.type.2: type = interface_type @Action, @Action(%T) [symbolic] +// CHECK:STDOUT: %Self: %Action.type.2 = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: %Op.type.1: type = fn_type @Op.1, @Action(%T) [symbolic] // CHECK:STDOUT: %Op.1: %Op.type.1 = struct_value () [symbolic] -// CHECK:STDOUT: %.3: type = assoc_entity_type %.2, %Op.type.1 [symbolic] -// CHECK:STDOUT: %.4: %.3 = assoc_entity element0, @Action.%Op.decl [symbolic] +// CHECK:STDOUT: %.2: type = assoc_entity_type %Action.type.2, %Op.type.1 [symbolic] +// CHECK:STDOUT: %.3: %.2 = assoc_entity element0, @Action.%Op.decl [symbolic] // CHECK:STDOUT: %A: type = class_type @A [template] -// CHECK:STDOUT: %.5: type = struct_type {} [template] -// CHECK:STDOUT: %.6: = complete_type_witness %.5 [template] +// CHECK:STDOUT: %.4: type = struct_type {} [template] +// CHECK:STDOUT: %.5: = complete_type_witness %.4 [template] // CHECK:STDOUT: %B: type = class_type @B [template] // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.7: type = interface_type @Action, @Action(%B) [template] +// CHECK:STDOUT: %Action.type.3: type = interface_type @Action, @Action(%B) [template] // CHECK:STDOUT: %Op.type.2: type = fn_type @Op.2 [template] // CHECK:STDOUT: %Op.2: %Op.type.2 = struct_value () [template] // CHECK:STDOUT: %Op.type.3: type = fn_type @Op.1, @Action(%B) [template] // CHECK:STDOUT: %Op.3: %Op.type.3 = struct_value () [template] -// CHECK:STDOUT: %.8: type = assoc_entity_type %.7, %Op.type.3 [template] -// CHECK:STDOUT: %.9: %.8 = assoc_entity element0, @Action.%Op.decl [template] -// CHECK:STDOUT: %.10: = interface_witness (%Op.2) [template] +// CHECK:STDOUT: %.6: type = assoc_entity_type %Action.type.3, %Op.type.3 [template] +// CHECK:STDOUT: %.7: %.6 = assoc_entity element0, @Action.%Op.decl [template] +// CHECK:STDOUT: %.8: = interface_witness (%Op.2) [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.11: type = ptr_type %.5 [template] +// CHECK:STDOUT: %.9: type = ptr_type %.4 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -117,7 +117,7 @@ fn MakeC(a: A) -> C { // CHECK:STDOUT: .C = %C.decl // CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %Action.decl: %Action.type = interface_decl @Action [template = constants.%Action] { +// CHECK:STDOUT: %Action.decl: %Action.type.1 = interface_decl @Action [template = constants.%Action] { // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 // CHECK:STDOUT: } { // CHECK:STDOUT: %T.param: type = param T, runtime_param @@ -128,9 +128,9 @@ fn MakeC(a: A) -> C { // CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {} {} // CHECK:STDOUT: impl_decl @impl [template] {} { // CHECK:STDOUT: %A.ref: type = name_ref A, file.%A.decl [template = constants.%A] -// CHECK:STDOUT: %Action.ref: %Action.type = name_ref Action, file.%Action.decl [template = constants.%Action] +// CHECK:STDOUT: %Action.ref: %Action.type.1 = name_ref Action, file.%Action.decl [template = constants.%Action] // CHECK:STDOUT: %B.ref: type = name_ref B, file.%B.decl [template = constants.%B] -// CHECK:STDOUT: %.loc12_17: type = interface_type @Action, @Action(constants.%B) [template = constants.%.7] +// CHECK:STDOUT: %Action.type: type = interface_type @Action, @Action(constants.%B) [template = constants.%Action.type.3] // CHECK:STDOUT: } // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %a.patt: %A = binding_pattern a @@ -145,17 +145,17 @@ fn MakeC(a: A) -> C { // CHECK:STDOUT: %T.1: type = bind_symbolic_name T, 0 [symbolic = %T.1 (constants.%T)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.1: type = interface_type @Action, @Action(%T.1) [symbolic = %.1 (constants.%.2)] -// CHECK:STDOUT: %Self.2: %.2 = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self)] +// CHECK:STDOUT: %Action.type: type = interface_type @Action, @Action(%T.1) [symbolic = %Action.type (constants.%Action.type.2)] +// CHECK:STDOUT: %Self.2: %Action.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self)] // CHECK:STDOUT: %Op.type: type = fn_type @Op.1, @Action(%T.1) [symbolic = %Op.type (constants.%Op.type.1)] // CHECK:STDOUT: %Op: @Action.%Op.type (%Op.type.1) = struct_value () [symbolic = %Op (constants.%Op.1)] -// CHECK:STDOUT: %.2: type = assoc_entity_type @Action.%.1 (%.2), @Action.%Op.type (%Op.type.1) [symbolic = %.2 (constants.%.3)] -// CHECK:STDOUT: %.3: @Action.%.2 (%.3) = assoc_entity element0, %Op.decl [symbolic = %.3 (constants.%.4)] +// CHECK:STDOUT: %.1: type = assoc_entity_type @Action.%Action.type (%Action.type.2), @Action.%Op.type (%Op.type.1) [symbolic = %.1 (constants.%.2)] +// CHECK:STDOUT: %.2: @Action.%.1 (%.2) = assoc_entity element0, %Op.decl [symbolic = %.2 (constants.%.3)] // CHECK:STDOUT: // CHECK:STDOUT: interface { -// CHECK:STDOUT: %Self.1: @Action.%.1 (%.2) = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self)] +// CHECK:STDOUT: %Self.1: @Action.%Action.type (%Action.type.2) = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self)] // CHECK:STDOUT: %Op.decl: @Action.%Op.type (%Op.type.1) = fn_decl @Op.1 [symbolic = @Action.%Op (constants.%Op.1)] {} {} -// CHECK:STDOUT: %.loc5: @Action.%.2 (%.3) = assoc_entity element0, %Op.decl [symbolic = %.3 (constants.%.4)] +// CHECK:STDOUT: %.loc5: @Action.%.1 (%.2) = assoc_entity element0, %Op.decl [symbolic = %.2 (constants.%.3)] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self.1 @@ -164,37 +164,37 @@ fn MakeC(a: A) -> C { // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: impl @impl: %A.ref as %.loc12_17 { +// CHECK:STDOUT: impl @impl: %A.ref as %Action.type { // CHECK:STDOUT: %Op.decl: %Op.type.2 = fn_decl @Op.2 [template = constants.%Op.2] {} {} -// CHECK:STDOUT: %.loc12_21: = interface_witness (%Op.decl) [template = constants.%.10] +// CHECK:STDOUT: %.loc12: = interface_witness (%Op.decl) [template = constants.%.8] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Op = %Op.decl -// CHECK:STDOUT: witness = %.loc12_21 +// CHECK:STDOUT: witness = %.loc12 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @A { -// CHECK:STDOUT: %.loc8: = complete_type_witness %.5 [template = constants.%.6] +// CHECK:STDOUT: %.loc8: = complete_type_witness %.4 [template = constants.%.5] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%A // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @B { -// CHECK:STDOUT: %.loc9: = complete_type_witness %.5 [template = constants.%.6] +// CHECK:STDOUT: %.loc9: = complete_type_witness %.4 [template = constants.%.5] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%B // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { -// CHECK:STDOUT: %.loc10: = complete_type_witness %.5 [template = constants.%.6] +// CHECK:STDOUT: %.loc10: = complete_type_witness %.4 [template = constants.%.5] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @Op.1(@Action.%T.loc4: type, @Action.%Self.1: @Action.%.1 (%.2)) { +// CHECK:STDOUT: generic fn @Op.1(@Action.%T.loc4: type, @Action.%Self.1: @Action.%Action.type (%Action.type.2)) { // CHECK:STDOUT: // CHECK:STDOUT: fn(); // CHECK:STDOUT: } @@ -207,12 +207,12 @@ fn MakeC(a: A) -> C { // CHECK:STDOUT: fn @F(%a: %A) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: %A = name_ref a, %a -// CHECK:STDOUT: %Action.ref: %Action.type = name_ref Action, file.%Action.decl [template = constants.%Action] +// CHECK:STDOUT: %Action.ref: %Action.type.1 = name_ref Action, file.%Action.decl [template = constants.%Action] // CHECK:STDOUT: %B.ref: type = name_ref B, file.%B.decl [template = constants.%B] -// CHECK:STDOUT: %.loc16_23: type = interface_type @Action, @Action(constants.%B) [template = constants.%.7] -// CHECK:STDOUT: %.loc16_26: %.8 = specific_constant @Action.%.loc5, @Action(constants.%B) [template = constants.%.9] -// CHECK:STDOUT: %Op.ref: %.8 = name_ref Op, %.loc16_26 [template = constants.%.9] -// CHECK:STDOUT: %.loc16_15: %Op.type.3 = interface_witness_access constants.%.10, element0 [template = constants.%Op.2] +// CHECK:STDOUT: %Action.type: type = interface_type @Action, @Action(constants.%B) [template = constants.%Action.type.3] +// CHECK:STDOUT: %.loc16_26: %.6 = specific_constant @Action.%.loc5, @Action(constants.%B) [template = constants.%.7] +// CHECK:STDOUT: %Op.ref: %.6 = name_ref Op, %.loc16_26 [template = constants.%.7] +// CHECK:STDOUT: %.loc16_15: %Op.type.3 = interface_witness_access constants.%.8, element0 [template = constants.%Op.2] // CHECK:STDOUT: %Op.call: init %.1 = call %.loc16_15() // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -231,12 +231,12 @@ fn MakeC(a: A) -> C { // CHECK:STDOUT: %T.1 => constants.%B // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.1 => constants.%.7 +// CHECK:STDOUT: %Action.type => constants.%Action.type.3 // CHECK:STDOUT: %Self.2 => constants.%Self // CHECK:STDOUT: %Op.type => constants.%Op.type.3 // CHECK:STDOUT: %Op => constants.%Op.3 -// CHECK:STDOUT: %.2 => constants.%.8 -// CHECK:STDOUT: %.3 => constants.%.9 +// CHECK:STDOUT: %.1 => constants.%.6 +// CHECK:STDOUT: %.2 => constants.%.7 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Op.1(constants.%B, constants.%A) {} @@ -247,46 +247,46 @@ fn MakeC(a: A) -> C { // CHECK:STDOUT: %B: type = class_type @B [template] // CHECK:STDOUT: %.1: type = struct_type {} [template] // CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] -// CHECK:STDOUT: %Action.type: type = generic_interface_type @Action [template] +// CHECK:STDOUT: %Action.type.1: type = generic_interface_type @Action [template] // CHECK:STDOUT: %.3: type = tuple_type () [template] -// CHECK:STDOUT: %Action: %Action.type = struct_value () [template] +// CHECK:STDOUT: %Action: %Action.type.1 = struct_value () [template] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] -// CHECK:STDOUT: %.4: type = interface_type @Action, @Action(%T) [symbolic] -// CHECK:STDOUT: %Self.1: @Action.%.1 (%.4) = bind_symbolic_name Self, 1 [symbolic] -// CHECK:STDOUT: %.5: type = interface_type @Action, @Action(%B) [template] +// CHECK:STDOUT: %Action.type.2: type = interface_type @Action, @Action(%T) [symbolic] +// CHECK:STDOUT: %Self.1: @Action.%Action.type (%Action.type.2) = bind_symbolic_name Self, 1 [symbolic] +// CHECK:STDOUT: %Action.type.3: type = interface_type @Action, @Action(%B) [template] // CHECK:STDOUT: %A: type = class_type @A [template] -// CHECK:STDOUT: %Self.2: %.4 = bind_symbolic_name Self, 1 [symbolic] +// CHECK:STDOUT: %Self.2: %Action.type.2 = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: %Op.type.1: type = fn_type @Op.1, @Action(%T) [symbolic] // CHECK:STDOUT: %Op.1: %Op.type.1 = struct_value () [symbolic] -// CHECK:STDOUT: %.6: type = assoc_entity_type %.4, %Op.type.1 [symbolic] -// CHECK:STDOUT: %.7: %.6 = assoc_entity element0, imports.%import_ref.15 [symbolic] +// CHECK:STDOUT: %.4: type = assoc_entity_type %Action.type.2, %Op.type.1 [symbolic] +// CHECK:STDOUT: %.5: %.4 = assoc_entity element0, imports.%import_ref.15 [symbolic] // CHECK:STDOUT: %Op.type.2: type = fn_type @Op.1, @Action(%B) [template] // CHECK:STDOUT: %Op.2: %Op.type.2 = struct_value () [template] -// CHECK:STDOUT: %.8: type = assoc_entity_type %.5, %Op.type.2 [template] -// CHECK:STDOUT: %.9: %.8 = assoc_entity element0, imports.%import_ref.16 [template] +// CHECK:STDOUT: %.6: type = assoc_entity_type %Action.type.3, %Op.type.2 [template] +// CHECK:STDOUT: %.7: %.6 = assoc_entity element0, imports.%import_ref.16 [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %G: %G.type = struct_value () [template] -// CHECK:STDOUT: %.10: type = ptr_type %.1 [template] -// CHECK:STDOUT: %.11: %.6 = assoc_entity element0, imports.%import_ref.17 [symbolic] +// CHECK:STDOUT: %.8: type = ptr_type %.1 [template] +// CHECK:STDOUT: %.9: %.4 = assoc_entity element0, imports.%import_ref.17 [symbolic] // CHECK:STDOUT: %Op.type.3: type = fn_type @Op.2 [template] // CHECK:STDOUT: %Op.3: %Op.type.3 = struct_value () [template] -// CHECK:STDOUT: %.12: = interface_witness (%Op.3) [template] +// CHECK:STDOUT: %.10: = interface_witness (%Op.3) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { -// CHECK:STDOUT: %import_ref.1: %Action.type = import_ref Main//action, inst+5, loaded [template = constants.%Action] +// CHECK:STDOUT: %import_ref.1: %Action.type.1 = import_ref Main//action, inst+5, loaded [template = constants.%Action] // CHECK:STDOUT: %import_ref.2: type = import_ref Main//action, inst+25, loaded [template = constants.%A] // CHECK:STDOUT: %import_ref.3: type = import_ref Main//action, inst+30, loaded [template = constants.%B] // CHECK:STDOUT: %import_ref.4 = import_ref Main//action, inst+33, unloaded // CHECK:STDOUT: %import_ref.5 = import_ref Main//action, inst+56, unloaded // CHECK:STDOUT: %import_ref.6 = import_ref Main//action, inst+31, unloaded // CHECK:STDOUT: %import_ref.7 = import_ref Main//action, inst+11, unloaded -// CHECK:STDOUT: %import_ref.8: @Action.%.2 (%.6) = import_ref Main//action, inst+17, loaded [symbolic = @Action.%.3 (constants.%.11)] +// CHECK:STDOUT: %import_ref.8: @Action.%.1 (%.4) = import_ref Main//action, inst+17, loaded [symbolic = @Action.%.2 (constants.%.9)] // CHECK:STDOUT: %import_ref.9 = import_ref Main//action, inst+13, unloaded // CHECK:STDOUT: %import_ref.10 = import_ref Main//action, inst+26, unloaded // CHECK:STDOUT: %import_ref.11: type = import_ref Main//action, inst+36, loaded [template = constants.%A] -// CHECK:STDOUT: %import_ref.12: type = import_ref Main//action, inst+39, loaded [template = constants.%.5] -// CHECK:STDOUT: %import_ref.13: = import_ref Main//action, inst+49, loaded [template = constants.%.12] +// CHECK:STDOUT: %import_ref.12: type = import_ref Main//action, inst+39, loaded [template = constants.%Action.type.3] +// CHECK:STDOUT: %import_ref.13: = import_ref Main//action, inst+49, loaded [template = constants.%.10] // CHECK:STDOUT: %import_ref.14 = import_ref Main//action, inst+42, unloaded // CHECK:STDOUT: %import_ref.15 = import_ref Main//action, inst+13, unloaded // CHECK:STDOUT: %import_ref.16 = import_ref Main//action, inst+13, unloaded @@ -317,12 +317,12 @@ fn MakeC(a: A) -> C { // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.1: type = interface_type @Action, @Action(%T) [symbolic = %.1 (constants.%.4)] -// CHECK:STDOUT: %Self: %.4 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] +// CHECK:STDOUT: %Action.type: type = interface_type @Action, @Action(%T) [symbolic = %Action.type (constants.%Action.type.2)] +// CHECK:STDOUT: %Self: %Action.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] // CHECK:STDOUT: %Op.type: type = fn_type @Op.1, @Action(%T) [symbolic = %Op.type (constants.%Op.type.1)] // CHECK:STDOUT: %Op: @Action.%Op.type (%Op.type.1) = struct_value () [symbolic = %Op (constants.%Op.1)] -// CHECK:STDOUT: %.2: type = assoc_entity_type @Action.%.1 (%.4), @Action.%Op.type (%Op.type.1) [symbolic = %.2 (constants.%.6)] -// CHECK:STDOUT: %.3: @Action.%.2 (%.6) = assoc_entity element0, imports.%import_ref.15 [symbolic = %.3 (constants.%.7)] +// CHECK:STDOUT: %.1: type = assoc_entity_type @Action.%Action.type (%Action.type.2), @Action.%Op.type (%Op.type.1) [symbolic = %.1 (constants.%.4)] +// CHECK:STDOUT: %.2: @Action.%.1 (%.4) = assoc_entity element0, imports.%import_ref.15 [symbolic = %.2 (constants.%.5)] // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: !members: @@ -348,7 +348,7 @@ fn MakeC(a: A) -> C { // CHECK:STDOUT: .Self = imports.%import_ref.10 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @Op.1(constants.%T: type, constants.%Self.1: @Action.%.1 (%.4)) { +// CHECK:STDOUT: generic fn @Op.1(constants.%T: type, constants.%Self.1: @Action.%Action.type (%Action.type.2)) { // CHECK:STDOUT: // CHECK:STDOUT: fn(); // CHECK:STDOUT: } @@ -356,12 +356,12 @@ fn MakeC(a: A) -> C { // CHECK:STDOUT: fn @G(%a: %A) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: %A = name_ref a, %a -// CHECK:STDOUT: %Action.ref: %Action.type = name_ref Action, imports.%import_ref.1 [template = constants.%Action] +// CHECK:STDOUT: %Action.ref: %Action.type.1 = name_ref Action, imports.%import_ref.1 [template = constants.%Action] // CHECK:STDOUT: %B.ref: type = name_ref B, imports.%import_ref.3 [template = constants.%B] -// CHECK:STDOUT: %.loc4_23: type = interface_type @Action, @Action(constants.%B) [template = constants.%.5] -// CHECK:STDOUT: %.loc4_26: %.8 = specific_constant imports.%import_ref.8, @Action(constants.%B) [template = constants.%.9] -// CHECK:STDOUT: %Op.ref: %.8 = name_ref Op, %.loc4_26 [template = constants.%.9] -// CHECK:STDOUT: %.loc4_15: %Op.type.2 = interface_witness_access constants.%.12, element0 [template = constants.%Op.3] +// CHECK:STDOUT: %Action.type: type = interface_type @Action, @Action(constants.%B) [template = constants.%Action.type.3] +// CHECK:STDOUT: %.loc4_26: %.6 = specific_constant imports.%import_ref.8, @Action(constants.%B) [template = constants.%.7] +// CHECK:STDOUT: %Op.ref: %.6 = name_ref Op, %.loc4_26 [template = constants.%.7] +// CHECK:STDOUT: %.loc4_15: %Op.type.2 = interface_witness_access constants.%.10, element0 [template = constants.%Op.3] // CHECK:STDOUT: %Op.call: init %.3 = call %.loc4_15() // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -376,12 +376,12 @@ fn MakeC(a: A) -> C { // CHECK:STDOUT: %T => constants.%B // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.1 => constants.%.5 +// CHECK:STDOUT: %Action.type => constants.%Action.type.3 // CHECK:STDOUT: %Self => constants.%Self.2 // CHECK:STDOUT: %Op.type => constants.%Op.type.2 // CHECK:STDOUT: %Op => constants.%Op.2 -// CHECK:STDOUT: %.2 => constants.%.8 -// CHECK:STDOUT: %.3 => constants.%.9 +// CHECK:STDOUT: %.1 => constants.%.6 +// CHECK:STDOUT: %.2 => constants.%.7 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Action(@Action.%T) { @@ -396,48 +396,48 @@ fn MakeC(a: A) -> C { // CHECK:STDOUT: %B: type = class_type @B [template] // CHECK:STDOUT: %.1: type = struct_type {} [template] // CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] -// CHECK:STDOUT: %Action.type: type = generic_interface_type @Action [template] +// CHECK:STDOUT: %Action.type.1: type = generic_interface_type @Action [template] // CHECK:STDOUT: %.3: type = tuple_type () [template] -// CHECK:STDOUT: %Action: %Action.type = struct_value () [template] +// CHECK:STDOUT: %Action: %Action.type.1 = struct_value () [template] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] -// CHECK:STDOUT: %.4: type = interface_type @Action, @Action(%T) [symbolic] -// CHECK:STDOUT: %Self.1: @Action.%.1 (%.4) = bind_symbolic_name Self, 1 [symbolic] -// CHECK:STDOUT: %.5: type = interface_type @Action, @Action(%B) [template] +// CHECK:STDOUT: %Action.type.2: type = interface_type @Action, @Action(%T) [symbolic] +// CHECK:STDOUT: %Self.1: @Action.%Action.type (%Action.type.2) = bind_symbolic_name Self, 1 [symbolic] +// CHECK:STDOUT: %Action.type.3: type = interface_type @Action, @Action(%B) [template] // CHECK:STDOUT: %A: type = class_type @A [template] -// CHECK:STDOUT: %Self.2: %.4 = bind_symbolic_name Self, 1 [symbolic] +// CHECK:STDOUT: %Self.2: %Action.type.2 = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: %Op.type.1: type = fn_type @Op, @Action(%T) [symbolic] // CHECK:STDOUT: %Op.1: %Op.type.1 = struct_value () [symbolic] -// CHECK:STDOUT: %.6: type = assoc_entity_type %.4, %Op.type.1 [symbolic] -// CHECK:STDOUT: %.7: %.6 = assoc_entity element0, imports.%import_ref.15 [symbolic] +// CHECK:STDOUT: %.4: type = assoc_entity_type %Action.type.2, %Op.type.1 [symbolic] +// CHECK:STDOUT: %.5: %.4 = assoc_entity element0, imports.%import_ref.15 [symbolic] // CHECK:STDOUT: %Op.type.2: type = fn_type @Op, @Action(%B) [template] // CHECK:STDOUT: %Op.2: %Op.type.2 = struct_value () [template] -// CHECK:STDOUT: %.8: type = assoc_entity_type %.5, %Op.type.2 [template] -// CHECK:STDOUT: %.9: %.8 = assoc_entity element0, imports.%import_ref.16 [template] +// CHECK:STDOUT: %.6: type = assoc_entity_type %Action.type.3, %Op.type.2 [template] +// CHECK:STDOUT: %.7: %.6 = assoc_entity element0, imports.%import_ref.16 [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %G: %G.type = struct_value () [template] -// CHECK:STDOUT: %.10: type = ptr_type %.1 [template] +// CHECK:STDOUT: %.8: type = ptr_type %.1 [template] // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.11: type = interface_type @Action, @Action(%C) [template] +// CHECK:STDOUT: %Action.type.4: type = interface_type @Action, @Action(%C) [template] // CHECK:STDOUT: %Op.type.3: type = fn_type @Op, @Action(%C) [template] // CHECK:STDOUT: %Op.3: %Op.type.3 = struct_value () [template] -// CHECK:STDOUT: %.12: type = assoc_entity_type %.11, %Op.type.3 [template] -// CHECK:STDOUT: %.13: %.12 = assoc_entity element0, imports.%import_ref.15 [template] -// CHECK:STDOUT: %.14: %.6 = assoc_entity element0, imports.%import_ref.18 [symbolic] +// CHECK:STDOUT: %.9: type = assoc_entity_type %Action.type.4, %Op.type.3 [template] +// CHECK:STDOUT: %.10: %.9 = assoc_entity element0, imports.%import_ref.15 [template] +// CHECK:STDOUT: %.11: %.4 = assoc_entity element0, imports.%import_ref.18 [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { -// CHECK:STDOUT: %import_ref.1: %Action.type = import_ref Main//action, inst+5, loaded [template = constants.%Action] +// CHECK:STDOUT: %import_ref.1: %Action.type.1 = import_ref Main//action, inst+5, loaded [template = constants.%Action] // CHECK:STDOUT: %import_ref.2: type = import_ref Main//action, inst+25, loaded [template = constants.%A] // CHECK:STDOUT: %import_ref.3 = import_ref Main//action, inst+30, unloaded // CHECK:STDOUT: %import_ref.4: type = import_ref Main//action, inst+33, loaded [template = constants.%C] // CHECK:STDOUT: %import_ref.5 = import_ref Main//action, inst+56, unloaded // CHECK:STDOUT: %import_ref.6 = import_ref Main//action, inst+31, unloaded // CHECK:STDOUT: %import_ref.7 = import_ref Main//action, inst+11, unloaded -// CHECK:STDOUT: %import_ref.8: @Action.%.2 (%.6) = import_ref Main//action, inst+17, loaded [symbolic = @Action.%.3 (constants.%.14)] +// CHECK:STDOUT: %import_ref.8: @Action.%.1 (%.4) = import_ref Main//action, inst+17, loaded [symbolic = @Action.%.2 (constants.%.11)] // CHECK:STDOUT: %import_ref.9 = import_ref Main//action, inst+13, unloaded // CHECK:STDOUT: %import_ref.10 = import_ref Main//action, inst+26, unloaded // CHECK:STDOUT: %import_ref.11: type = import_ref Main//action, inst+36, loaded [template = constants.%A] -// CHECK:STDOUT: %import_ref.12: type = import_ref Main//action, inst+39, loaded [template = constants.%.5] +// CHECK:STDOUT: %import_ref.12: type = import_ref Main//action, inst+39, loaded [template = constants.%Action.type.3] // CHECK:STDOUT: %import_ref.13 = import_ref Main//action, inst+49, unloaded // CHECK:STDOUT: %import_ref.14 = import_ref Main//action, inst+42, unloaded // CHECK:STDOUT: %import_ref.15 = import_ref Main//action, inst+13, unloaded @@ -470,12 +470,12 @@ fn MakeC(a: A) -> C { // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.1: type = interface_type @Action, @Action(%T) [symbolic = %.1 (constants.%.4)] -// CHECK:STDOUT: %Self: %.4 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] +// CHECK:STDOUT: %Action.type: type = interface_type @Action, @Action(%T) [symbolic = %Action.type (constants.%Action.type.2)] +// CHECK:STDOUT: %Self: %Action.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] // CHECK:STDOUT: %Op.type: type = fn_type @Op, @Action(%T) [symbolic = %Op.type (constants.%Op.type.1)] // CHECK:STDOUT: %Op: @Action.%Op.type (%Op.type.1) = struct_value () [symbolic = %Op (constants.%Op.1)] -// CHECK:STDOUT: %.2: type = assoc_entity_type @Action.%.1 (%.4), @Action.%Op.type (%Op.type.1) [symbolic = %.2 (constants.%.6)] -// CHECK:STDOUT: %.3: @Action.%.2 (%.6) = assoc_entity element0, imports.%import_ref.15 [symbolic = %.3 (constants.%.7)] +// CHECK:STDOUT: %.1: type = assoc_entity_type @Action.%Action.type (%Action.type.2), @Action.%Op.type (%Op.type.1) [symbolic = %.1 (constants.%.4)] +// CHECK:STDOUT: %.2: @Action.%.1 (%.4) = assoc_entity element0, imports.%import_ref.15 [symbolic = %.2 (constants.%.5)] // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: !members: @@ -506,7 +506,7 @@ fn MakeC(a: A) -> C { // CHECK:STDOUT: .Self = imports.%import_ref.17 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @Op(constants.%T: type, constants.%Self.1: @Action.%.1 (%.4)) { +// CHECK:STDOUT: generic fn @Op(constants.%T: type, constants.%Self.1: @Action.%Action.type (%Action.type.2)) { // CHECK:STDOUT: // CHECK:STDOUT: fn(); // CHECK:STDOUT: } @@ -514,11 +514,11 @@ fn MakeC(a: A) -> C { // CHECK:STDOUT: fn @G(%a: %A) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: %A = name_ref a, %a -// CHECK:STDOUT: %Action.ref: %Action.type = name_ref Action, imports.%import_ref.1 [template = constants.%Action] +// CHECK:STDOUT: %Action.ref: %Action.type.1 = name_ref Action, imports.%import_ref.1 [template = constants.%Action] // CHECK:STDOUT: %C.ref: type = name_ref C, imports.%import_ref.4 [template = constants.%C] -// CHECK:STDOUT: %.loc8_23: type = interface_type @Action, @Action(constants.%C) [template = constants.%.11] -// CHECK:STDOUT: %.loc8_26: %.12 = specific_constant imports.%import_ref.8, @Action(constants.%C) [template = constants.%.13] -// CHECK:STDOUT: %Op.ref: %.12 = name_ref Op, %.loc8_26 [template = constants.%.13] +// CHECK:STDOUT: %Action.type: type = interface_type @Action, @Action(constants.%C) [template = constants.%Action.type.4] +// CHECK:STDOUT: %.loc8: %.9 = specific_constant imports.%import_ref.8, @Action(constants.%C) [template = constants.%.10] +// CHECK:STDOUT: %Op.ref: %.9 = name_ref Op, %.loc8 [template = constants.%.10] // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -530,12 +530,12 @@ fn MakeC(a: A) -> C { // CHECK:STDOUT: %T => constants.%B // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.1 => constants.%.5 +// CHECK:STDOUT: %Action.type => constants.%Action.type.3 // CHECK:STDOUT: %Self => constants.%Self.2 // CHECK:STDOUT: %Op.type => constants.%Op.type.2 // CHECK:STDOUT: %Op => constants.%Op.2 -// CHECK:STDOUT: %.2 => constants.%.8 -// CHECK:STDOUT: %.3 => constants.%.9 +// CHECK:STDOUT: %.1 => constants.%.6 +// CHECK:STDOUT: %.2 => constants.%.7 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Action(@Action.%T) { @@ -548,39 +548,39 @@ fn MakeC(a: A) -> C { // CHECK:STDOUT: %T => constants.%C // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.1 => constants.%.11 +// CHECK:STDOUT: %Action.type => constants.%Action.type.4 // CHECK:STDOUT: %Self => constants.%Self.2 // CHECK:STDOUT: %Op.type => constants.%Op.type.3 // CHECK:STDOUT: %Op => constants.%Op.3 -// CHECK:STDOUT: %.2 => constants.%.12 -// CHECK:STDOUT: %.3 => constants.%.13 +// CHECK:STDOUT: %.1 => constants.%.9 +// CHECK:STDOUT: %.2 => constants.%.10 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- factory.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] -// CHECK:STDOUT: %Factory.type: type = generic_interface_type @Factory [template] +// CHECK:STDOUT: %Factory.type.1: type = generic_interface_type @Factory [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Factory: %Factory.type = struct_value () [template] -// CHECK:STDOUT: %.2: type = interface_type @Factory, @Factory(%T) [symbolic] -// CHECK:STDOUT: %Self: %.2 = bind_symbolic_name Self, 1 [symbolic] +// CHECK:STDOUT: %Factory: %Factory.type.1 = struct_value () [template] +// CHECK:STDOUT: %Factory.type.2: type = interface_type @Factory, @Factory(%T) [symbolic] +// CHECK:STDOUT: %Self: %Factory.type.2 = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: %Make.type.1: type = fn_type @Make.1, @Factory(%T) [symbolic] // CHECK:STDOUT: %Make.1: %Make.type.1 = struct_value () [symbolic] -// CHECK:STDOUT: %.3: type = assoc_entity_type %.2, %Make.type.1 [symbolic] -// CHECK:STDOUT: %.4: %.3 = assoc_entity element0, @Factory.%Make.decl [symbolic] +// CHECK:STDOUT: %.2: type = assoc_entity_type %Factory.type.2, %Make.type.1 [symbolic] +// CHECK:STDOUT: %.3: %.2 = assoc_entity element0, @Factory.%Make.decl [symbolic] // CHECK:STDOUT: %A: type = class_type @A [template] -// CHECK:STDOUT: %.5: type = struct_type {} [template] -// CHECK:STDOUT: %.6: = complete_type_witness %.5 [template] +// CHECK:STDOUT: %.4: type = struct_type {} [template] +// CHECK:STDOUT: %.5: = complete_type_witness %.4 [template] // CHECK:STDOUT: %B: type = class_type @B [template] -// CHECK:STDOUT: %.7: type = interface_type @Factory, @Factory(%B) [template] +// CHECK:STDOUT: %Factory.type.3: type = interface_type @Factory, @Factory(%B) [template] // CHECK:STDOUT: %Make.type.2: type = fn_type @Make.2 [template] // CHECK:STDOUT: %Make.2: %Make.type.2 = struct_value () [template] // CHECK:STDOUT: %Make.type.3: type = fn_type @Make.1, @Factory(%B) [template] // CHECK:STDOUT: %Make.3: %Make.type.3 = struct_value () [template] -// CHECK:STDOUT: %.8: type = assoc_entity_type %.7, %Make.type.3 [template] -// CHECK:STDOUT: %.9: %.8 = assoc_entity element0, @Factory.%Make.decl [template] -// CHECK:STDOUT: %.10: = interface_witness (%Make.2) [template] +// CHECK:STDOUT: %.6: type = assoc_entity_type %Factory.type.3, %Make.type.3 [template] +// CHECK:STDOUT: %.7: %.6 = assoc_entity element0, @Factory.%Make.decl [template] +// CHECK:STDOUT: %.8: = interface_witness (%Make.2) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -589,7 +589,7 @@ fn MakeC(a: A) -> C { // CHECK:STDOUT: .A = %A.decl // CHECK:STDOUT: .B = %B.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %Factory.decl: %Factory.type = interface_decl @Factory [template = constants.%Factory] { +// CHECK:STDOUT: %Factory.decl: %Factory.type.1 = interface_decl @Factory [template = constants.%Factory] { // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 // CHECK:STDOUT: } { // CHECK:STDOUT: %T.param: type = param T, runtime_param @@ -599,9 +599,9 @@ fn MakeC(a: A) -> C { // CHECK:STDOUT: %B.decl: type = class_decl @B [template = constants.%B] {} {} // CHECK:STDOUT: impl_decl @impl [template] {} { // CHECK:STDOUT: %A.ref: type = name_ref A, file.%A.decl [template = constants.%A] -// CHECK:STDOUT: %Factory.ref: %Factory.type = name_ref Factory, file.%Factory.decl [template = constants.%Factory] +// CHECK:STDOUT: %Factory.ref: %Factory.type.1 = name_ref Factory, file.%Factory.decl [template = constants.%Factory] // CHECK:STDOUT: %B.ref: type = name_ref B, file.%B.decl [template = constants.%B] -// CHECK:STDOUT: %.loc11_18: type = interface_type @Factory, @Factory(constants.%B) [template = constants.%.7] +// CHECK:STDOUT: %Factory.type: type = interface_type @Factory, @Factory(constants.%B) [template = constants.%Factory.type.3] // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -609,20 +609,20 @@ fn MakeC(a: A) -> C { // CHECK:STDOUT: %T.1: type = bind_symbolic_name T, 0 [symbolic = %T.1 (constants.%T)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.1: type = interface_type @Factory, @Factory(%T.1) [symbolic = %.1 (constants.%.2)] -// CHECK:STDOUT: %Self.2: %.2 = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self)] +// CHECK:STDOUT: %Factory.type: type = interface_type @Factory, @Factory(%T.1) [symbolic = %Factory.type (constants.%Factory.type.2)] +// CHECK:STDOUT: %Self.2: %Factory.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self)] // CHECK:STDOUT: %Make.type: type = fn_type @Make.1, @Factory(%T.1) [symbolic = %Make.type (constants.%Make.type.1)] // CHECK:STDOUT: %Make: @Factory.%Make.type (%Make.type.1) = struct_value () [symbolic = %Make (constants.%Make.1)] -// CHECK:STDOUT: %.2: type = assoc_entity_type @Factory.%.1 (%.2), @Factory.%Make.type (%Make.type.1) [symbolic = %.2 (constants.%.3)] -// CHECK:STDOUT: %.3: @Factory.%.2 (%.3) = assoc_entity element0, %Make.decl [symbolic = %.3 (constants.%.4)] +// CHECK:STDOUT: %.1: type = assoc_entity_type @Factory.%Factory.type (%Factory.type.2), @Factory.%Make.type (%Make.type.1) [symbolic = %.1 (constants.%.2)] +// CHECK:STDOUT: %.2: @Factory.%.1 (%.2) = assoc_entity element0, %Make.decl [symbolic = %.2 (constants.%.3)] // CHECK:STDOUT: // CHECK:STDOUT: interface { -// CHECK:STDOUT: %Self.1: @Factory.%.1 (%.2) = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self)] +// CHECK:STDOUT: %Self.1: @Factory.%Factory.type (%Factory.type.2) = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self)] // CHECK:STDOUT: %Make.decl: @Factory.%Make.type (%Make.type.1) = fn_decl @Make.1 [symbolic = @Factory.%Make (constants.%Make.1)] {} { // CHECK:STDOUT: %T.ref: type = name_ref T, @Factory.%T.loc4 [symbolic = %T (constants.%T)] // CHECK:STDOUT: %return: ref @Make.1.%T (%T) = var // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc5: @Factory.%.2 (%.3) = assoc_entity element0, %Make.decl [symbolic = %.3 (constants.%.4)] +// CHECK:STDOUT: %.loc5: @Factory.%.1 (%.2) = assoc_entity element0, %Make.decl [symbolic = %.2 (constants.%.3)] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self.1 @@ -631,33 +631,33 @@ fn MakeC(a: A) -> C { // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: impl @impl: %A.ref as %.loc11_18 { +// CHECK:STDOUT: impl @impl: %A.ref as %Factory.type { // CHECK:STDOUT: %Make.decl: %Make.type.2 = fn_decl @Make.2 [template = constants.%Make.2] {} { // CHECK:STDOUT: %B.ref: type = name_ref B, file.%B.decl [template = constants.%B] // CHECK:STDOUT: %return: ref %B = var // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc11_22: = interface_witness (%Make.decl) [template = constants.%.10] +// CHECK:STDOUT: %.loc11: = interface_witness (%Make.decl) [template = constants.%.8] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Make = %Make.decl -// CHECK:STDOUT: witness = %.loc11_22 +// CHECK:STDOUT: witness = %.loc11 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @A { -// CHECK:STDOUT: %.loc8: = complete_type_witness %.5 [template = constants.%.6] +// CHECK:STDOUT: %.loc8: = complete_type_witness %.4 [template = constants.%.5] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%A // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @B { -// CHECK:STDOUT: %.loc9: = complete_type_witness %.5 [template = constants.%.6] +// CHECK:STDOUT: %.loc9: = complete_type_witness %.4 [template = constants.%.5] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%B // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @Make.1(@Factory.%T.loc4: type, @Factory.%Self.1: @Factory.%.1 (%.2)) { +// CHECK:STDOUT: generic fn @Make.1(@Factory.%T.loc4: type, @Factory.%Self.1: @Factory.%Factory.type (%Factory.type.2)) { // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T)] // CHECK:STDOUT: // CHECK:STDOUT: fn() -> @Make.1.%T (%T); @@ -681,12 +681,12 @@ fn MakeC(a: A) -> C { // CHECK:STDOUT: %T.1 => constants.%B // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.1 => constants.%.7 +// CHECK:STDOUT: %Factory.type => constants.%Factory.type.3 // CHECK:STDOUT: %Self.2 => constants.%Self // CHECK:STDOUT: %Make.type => constants.%Make.type.3 // CHECK:STDOUT: %Make => constants.%Make.3 -// CHECK:STDOUT: %.2 => constants.%.8 -// CHECK:STDOUT: %.3 => constants.%.9 +// CHECK:STDOUT: %.1 => constants.%.6 +// CHECK:STDOUT: %.2 => constants.%.7 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Make.1(constants.%B, constants.%A) { @@ -699,44 +699,44 @@ fn MakeC(a: A) -> C { // CHECK:STDOUT: %B: type = class_type @B [template] // CHECK:STDOUT: %.1: type = struct_type {} [template] // CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] -// CHECK:STDOUT: %Factory.type: type = generic_interface_type @Factory [template] +// CHECK:STDOUT: %Factory.type.1: type = generic_interface_type @Factory [template] // CHECK:STDOUT: %.3: type = tuple_type () [template] -// CHECK:STDOUT: %Factory: %Factory.type = struct_value () [template] +// CHECK:STDOUT: %Factory: %Factory.type.1 = struct_value () [template] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] -// CHECK:STDOUT: %.4: type = interface_type @Factory, @Factory(%T) [symbolic] -// CHECK:STDOUT: %Self.1: @Factory.%.1 (%.4) = bind_symbolic_name Self, 1 [symbolic] -// CHECK:STDOUT: %.5: type = interface_type @Factory, @Factory(%B) [template] +// CHECK:STDOUT: %Factory.type.2: type = interface_type @Factory, @Factory(%T) [symbolic] +// CHECK:STDOUT: %Self.1: @Factory.%Factory.type (%Factory.type.2) = bind_symbolic_name Self, 1 [symbolic] +// CHECK:STDOUT: %Factory.type.3: type = interface_type @Factory, @Factory(%B) [template] // CHECK:STDOUT: %A: type = class_type @A [template] -// CHECK:STDOUT: %Self.2: %.4 = bind_symbolic_name Self, 1 [symbolic] +// CHECK:STDOUT: %Self.2: %Factory.type.2 = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: %Make.type.1: type = fn_type @Make.1, @Factory(%T) [symbolic] // CHECK:STDOUT: %Make.1: %Make.type.1 = struct_value () [symbolic] -// CHECK:STDOUT: %.6: type = assoc_entity_type %.4, %Make.type.1 [symbolic] -// CHECK:STDOUT: %.7: %.6 = assoc_entity element0, imports.%import_ref.13 [symbolic] +// CHECK:STDOUT: %.4: type = assoc_entity_type %Factory.type.2, %Make.type.1 [symbolic] +// CHECK:STDOUT: %.5: %.4 = assoc_entity element0, imports.%import_ref.13 [symbolic] // CHECK:STDOUT: %Make.type.2: type = fn_type @Make.1, @Factory(%B) [template] // CHECK:STDOUT: %Make.2: %Make.type.2 = struct_value () [template] -// CHECK:STDOUT: %.8: type = assoc_entity_type %.5, %Make.type.2 [template] -// CHECK:STDOUT: %.9: %.8 = assoc_entity element0, imports.%import_ref.14 [template] +// CHECK:STDOUT: %.6: type = assoc_entity_type %Factory.type.3, %Make.type.2 [template] +// CHECK:STDOUT: %.7: %.6 = assoc_entity element0, imports.%import_ref.14 [template] // CHECK:STDOUT: %MakeB.type: type = fn_type @MakeB [template] // CHECK:STDOUT: %MakeB: %MakeB.type = struct_value () [template] -// CHECK:STDOUT: %.10: type = ptr_type %.1 [template] -// CHECK:STDOUT: %.11: %.6 = assoc_entity element0, imports.%import_ref.15 [symbolic] +// CHECK:STDOUT: %.8: type = ptr_type %.1 [template] +// CHECK:STDOUT: %.9: %.4 = assoc_entity element0, imports.%import_ref.15 [symbolic] // CHECK:STDOUT: %Make.type.3: type = fn_type @Make.2 [template] // CHECK:STDOUT: %Make.3: %Make.type.3 = struct_value () [template] -// CHECK:STDOUT: %.12: = interface_witness (%Make.3) [template] +// CHECK:STDOUT: %.10: = interface_witness (%Make.3) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { -// CHECK:STDOUT: %import_ref.1: %Factory.type = import_ref Main//factory, inst+5, loaded [template = constants.%Factory] +// CHECK:STDOUT: %import_ref.1: %Factory.type.1 = import_ref Main//factory, inst+5, loaded [template = constants.%Factory] // CHECK:STDOUT: %import_ref.2: type = import_ref Main//factory, inst+28, loaded [template = constants.%A] // CHECK:STDOUT: %import_ref.3: type = import_ref Main//factory, inst+33, loaded [template = constants.%B] // CHECK:STDOUT: %import_ref.4 = import_ref Main//factory, inst+34, unloaded // CHECK:STDOUT: %import_ref.5 = import_ref Main//factory, inst+11, unloaded -// CHECK:STDOUT: %import_ref.6: @Factory.%.2 (%.6) = import_ref Main//factory, inst+20, loaded [symbolic = @Factory.%.3 (constants.%.11)] +// CHECK:STDOUT: %import_ref.6: @Factory.%.1 (%.4) = import_ref Main//factory, inst+20, loaded [symbolic = @Factory.%.2 (constants.%.9)] // CHECK:STDOUT: %import_ref.7 = import_ref Main//factory, inst+15, unloaded // CHECK:STDOUT: %import_ref.8 = import_ref Main//factory, inst+29, unloaded // CHECK:STDOUT: %import_ref.9: type = import_ref Main//factory, inst+36, loaded [template = constants.%A] -// CHECK:STDOUT: %import_ref.10: type = import_ref Main//factory, inst+39, loaded [template = constants.%.5] -// CHECK:STDOUT: %import_ref.11: = import_ref Main//factory, inst+51, loaded [template = constants.%.12] +// CHECK:STDOUT: %import_ref.10: type = import_ref Main//factory, inst+39, loaded [template = constants.%Factory.type.3] +// CHECK:STDOUT: %import_ref.11: = import_ref Main//factory, inst+51, loaded [template = constants.%.10] // CHECK:STDOUT: %import_ref.12 = import_ref Main//factory, inst+44, unloaded // CHECK:STDOUT: %import_ref.13 = import_ref Main//factory, inst+15, unloaded // CHECK:STDOUT: %import_ref.14 = import_ref Main//factory, inst+15, unloaded @@ -767,12 +767,12 @@ fn MakeC(a: A) -> C { // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.1: type = interface_type @Factory, @Factory(%T) [symbolic = %.1 (constants.%.4)] -// CHECK:STDOUT: %Self: %.4 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] +// CHECK:STDOUT: %Factory.type: type = interface_type @Factory, @Factory(%T) [symbolic = %Factory.type (constants.%Factory.type.2)] +// CHECK:STDOUT: %Self: %Factory.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] // CHECK:STDOUT: %Make.type: type = fn_type @Make.1, @Factory(%T) [symbolic = %Make.type (constants.%Make.type.1)] // CHECK:STDOUT: %Make: @Factory.%Make.type (%Make.type.1) = struct_value () [symbolic = %Make (constants.%Make.1)] -// CHECK:STDOUT: %.2: type = assoc_entity_type @Factory.%.1 (%.4), @Factory.%Make.type (%Make.type.1) [symbolic = %.2 (constants.%.6)] -// CHECK:STDOUT: %.3: @Factory.%.2 (%.6) = assoc_entity element0, imports.%import_ref.13 [symbolic = %.3 (constants.%.7)] +// CHECK:STDOUT: %.1: type = assoc_entity_type @Factory.%Factory.type (%Factory.type.2), @Factory.%Make.type (%Make.type.1) [symbolic = %.1 (constants.%.4)] +// CHECK:STDOUT: %.2: @Factory.%.1 (%.4) = assoc_entity element0, imports.%import_ref.13 [symbolic = %.2 (constants.%.5)] // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: !members: @@ -798,7 +798,7 @@ fn MakeC(a: A) -> C { // CHECK:STDOUT: .Self = imports.%import_ref.8 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @Make.1(constants.%T: type, constants.%Self.1: @Factory.%.1 (%.4)) { +// CHECK:STDOUT: generic fn @Make.1(constants.%T: type, constants.%Self.1: @Factory.%Factory.type (%Factory.type.2)) { // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T)] // CHECK:STDOUT: // CHECK:STDOUT: fn() -> @Make.1.%T (%T); @@ -807,12 +807,12 @@ fn MakeC(a: A) -> C { // CHECK:STDOUT: fn @MakeB(%a: %A) -> %return: %B { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: %A = name_ref a, %a -// CHECK:STDOUT: %Factory.ref: %Factory.type = name_ref Factory, imports.%import_ref.1 [template = constants.%Factory] +// CHECK:STDOUT: %Factory.ref: %Factory.type.1 = name_ref Factory, imports.%import_ref.1 [template = constants.%Factory] // CHECK:STDOUT: %B.ref.loc5: type = name_ref B, imports.%import_ref.3 [template = constants.%B] -// CHECK:STDOUT: %.loc5_20: type = interface_type @Factory, @Factory(constants.%B) [template = constants.%.5] -// CHECK:STDOUT: %.loc5_23: %.8 = specific_constant imports.%import_ref.6, @Factory(constants.%B) [template = constants.%.9] -// CHECK:STDOUT: %Make.ref: %.8 = name_ref Make, %.loc5_23 [template = constants.%.9] -// CHECK:STDOUT: %.loc5_11: %Make.type.2 = interface_witness_access constants.%.12, element0 [template = constants.%Make.3] +// CHECK:STDOUT: %Factory.type: type = interface_type @Factory, @Factory(constants.%B) [template = constants.%Factory.type.3] +// CHECK:STDOUT: %.loc5_23: %.6 = specific_constant imports.%import_ref.6, @Factory(constants.%B) [template = constants.%.7] +// CHECK:STDOUT: %Make.ref: %.6 = name_ref Make, %.loc5_23 [template = constants.%.7] +// CHECK:STDOUT: %.loc5_11: %Make.type.2 = interface_witness_access constants.%.10, element0 [template = constants.%Make.3] // CHECK:STDOUT: %.loc4: ref %B = splice_block %return {} // CHECK:STDOUT: %Make.call: init %B = call %.loc5_11() to %.loc4 // CHECK:STDOUT: return %Make.call to %return @@ -828,12 +828,12 @@ fn MakeC(a: A) -> C { // CHECK:STDOUT: %T => constants.%B // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.1 => constants.%.5 +// CHECK:STDOUT: %Factory.type => constants.%Factory.type.3 // CHECK:STDOUT: %Self => constants.%Self.2 // CHECK:STDOUT: %Make.type => constants.%Make.type.2 // CHECK:STDOUT: %Make => constants.%Make.2 -// CHECK:STDOUT: %.2 => constants.%.8 -// CHECK:STDOUT: %.3 => constants.%.9 +// CHECK:STDOUT: %.1 => constants.%.6 +// CHECK:STDOUT: %.2 => constants.%.7 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Factory(@Factory.%T) { @@ -850,46 +850,46 @@ fn MakeC(a: A) -> C { // CHECK:STDOUT: %B: type = class_type @B [template] // CHECK:STDOUT: %.1: type = struct_type {} [template] // CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] -// CHECK:STDOUT: %Factory.type: type = generic_interface_type @Factory [template] +// CHECK:STDOUT: %Factory.type.1: type = generic_interface_type @Factory [template] // CHECK:STDOUT: %.3: type = tuple_type () [template] -// CHECK:STDOUT: %Factory: %Factory.type = struct_value () [template] +// CHECK:STDOUT: %Factory: %Factory.type.1 = struct_value () [template] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] -// CHECK:STDOUT: %.4: type = interface_type @Factory, @Factory(%T) [symbolic] -// CHECK:STDOUT: %Self.1: @Factory.%.1 (%.4) = bind_symbolic_name Self, 1 [symbolic] -// CHECK:STDOUT: %.5: type = interface_type @Factory, @Factory(%B) [template] +// CHECK:STDOUT: %Factory.type.2: type = interface_type @Factory, @Factory(%T) [symbolic] +// CHECK:STDOUT: %Self.1: @Factory.%Factory.type (%Factory.type.2) = bind_symbolic_name Self, 1 [symbolic] +// CHECK:STDOUT: %Factory.type.3: type = interface_type @Factory, @Factory(%B) [template] // CHECK:STDOUT: %A: type = class_type @A [template] -// CHECK:STDOUT: %Self.2: %.4 = bind_symbolic_name Self, 1 [symbolic] +// CHECK:STDOUT: %Self.2: %Factory.type.2 = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: %Make.type.1: type = fn_type @Make, @Factory(%T) [symbolic] // CHECK:STDOUT: %Make.1: %Make.type.1 = struct_value () [symbolic] -// CHECK:STDOUT: %.6: type = assoc_entity_type %.4, %Make.type.1 [symbolic] -// CHECK:STDOUT: %.7: %.6 = assoc_entity element0, imports.%import_ref.13 [symbolic] +// CHECK:STDOUT: %.4: type = assoc_entity_type %Factory.type.2, %Make.type.1 [symbolic] +// CHECK:STDOUT: %.5: %.4 = assoc_entity element0, imports.%import_ref.13 [symbolic] // CHECK:STDOUT: %Make.type.2: type = fn_type @Make, @Factory(%B) [template] // CHECK:STDOUT: %Make.2: %Make.type.2 = struct_value () [template] -// CHECK:STDOUT: %.8: type = assoc_entity_type %.5, %Make.type.2 [template] -// CHECK:STDOUT: %.9: %.8 = assoc_entity element0, imports.%import_ref.14 [template] +// CHECK:STDOUT: %.6: type = assoc_entity_type %Factory.type.3, %Make.type.2 [template] +// CHECK:STDOUT: %.7: %.6 = assoc_entity element0, imports.%import_ref.14 [template] // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %MakeC.type: type = fn_type @MakeC [template] // CHECK:STDOUT: %MakeC: %MakeC.type = struct_value () [template] -// CHECK:STDOUT: %.10: type = ptr_type %.1 [template] -// CHECK:STDOUT: %.11: type = interface_type @Factory, @Factory(%C) [template] +// CHECK:STDOUT: %.8: type = ptr_type %.1 [template] +// CHECK:STDOUT: %Factory.type.4: type = interface_type @Factory, @Factory(%C) [template] // CHECK:STDOUT: %Make.type.3: type = fn_type @Make, @Factory(%C) [template] // CHECK:STDOUT: %Make.3: %Make.type.3 = struct_value () [template] -// CHECK:STDOUT: %.12: type = assoc_entity_type %.11, %Make.type.3 [template] -// CHECK:STDOUT: %.13: %.12 = assoc_entity element0, imports.%import_ref.13 [template] -// CHECK:STDOUT: %.14: %.6 = assoc_entity element0, imports.%import_ref.15 [symbolic] +// CHECK:STDOUT: %.9: type = assoc_entity_type %Factory.type.4, %Make.type.3 [template] +// CHECK:STDOUT: %.10: %.9 = assoc_entity element0, imports.%import_ref.13 [template] +// CHECK:STDOUT: %.11: %.4 = assoc_entity element0, imports.%import_ref.15 [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { -// CHECK:STDOUT: %import_ref.1: %Factory.type = import_ref Main//factory, inst+5, loaded [template = constants.%Factory] +// CHECK:STDOUT: %import_ref.1: %Factory.type.1 = import_ref Main//factory, inst+5, loaded [template = constants.%Factory] // CHECK:STDOUT: %import_ref.2: type = import_ref Main//factory, inst+28, loaded [template = constants.%A] // CHECK:STDOUT: %import_ref.3 = import_ref Main//factory, inst+33, unloaded // CHECK:STDOUT: %import_ref.4 = import_ref Main//factory, inst+34, unloaded // CHECK:STDOUT: %import_ref.5 = import_ref Main//factory, inst+11, unloaded -// CHECK:STDOUT: %import_ref.6: @Factory.%.2 (%.6) = import_ref Main//factory, inst+20, loaded [symbolic = @Factory.%.3 (constants.%.14)] +// CHECK:STDOUT: %import_ref.6: @Factory.%.1 (%.4) = import_ref Main//factory, inst+20, loaded [symbolic = @Factory.%.2 (constants.%.11)] // CHECK:STDOUT: %import_ref.7 = import_ref Main//factory, inst+15, unloaded // CHECK:STDOUT: %import_ref.8 = import_ref Main//factory, inst+29, unloaded // CHECK:STDOUT: %import_ref.9: type = import_ref Main//factory, inst+36, loaded [template = constants.%A] -// CHECK:STDOUT: %import_ref.10: type = import_ref Main//factory, inst+39, loaded [template = constants.%.5] +// CHECK:STDOUT: %import_ref.10: type = import_ref Main//factory, inst+39, loaded [template = constants.%Factory.type.3] // CHECK:STDOUT: %import_ref.11 = import_ref Main//factory, inst+51, unloaded // CHECK:STDOUT: %import_ref.12 = import_ref Main//factory, inst+44, unloaded // CHECK:STDOUT: %import_ref.13 = import_ref Main//factory, inst+15, unloaded @@ -923,12 +923,12 @@ fn MakeC(a: A) -> C { // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.1: type = interface_type @Factory, @Factory(%T) [symbolic = %.1 (constants.%.4)] -// CHECK:STDOUT: %Self: %.4 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] +// CHECK:STDOUT: %Factory.type: type = interface_type @Factory, @Factory(%T) [symbolic = %Factory.type (constants.%Factory.type.2)] +// CHECK:STDOUT: %Self: %Factory.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] // CHECK:STDOUT: %Make.type: type = fn_type @Make, @Factory(%T) [symbolic = %Make.type (constants.%Make.type.1)] // CHECK:STDOUT: %Make: @Factory.%Make.type (%Make.type.1) = struct_value () [symbolic = %Make (constants.%Make.1)] -// CHECK:STDOUT: %.2: type = assoc_entity_type @Factory.%.1 (%.4), @Factory.%Make.type (%Make.type.1) [symbolic = %.2 (constants.%.6)] -// CHECK:STDOUT: %.3: @Factory.%.2 (%.6) = assoc_entity element0, imports.%import_ref.13 [symbolic = %.3 (constants.%.7)] +// CHECK:STDOUT: %.1: type = assoc_entity_type @Factory.%Factory.type (%Factory.type.2), @Factory.%Make.type (%Make.type.1) [symbolic = %.1 (constants.%.4)] +// CHECK:STDOUT: %.2: @Factory.%.1 (%.4) = assoc_entity element0, imports.%import_ref.13 [symbolic = %.2 (constants.%.5)] // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: !members: @@ -961,7 +961,7 @@ fn MakeC(a: A) -> C { // CHECK:STDOUT: .Self = constants.%C // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @Make(constants.%T: type, constants.%Self.1: @Factory.%.1 (%.4)) { +// CHECK:STDOUT: generic fn @Make(constants.%T: type, constants.%Self.1: @Factory.%Factory.type (%Factory.type.2)) { // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T)] // CHECK:STDOUT: // CHECK:STDOUT: fn() -> @Make.%T (%T); @@ -970,11 +970,11 @@ fn MakeC(a: A) -> C { // CHECK:STDOUT: fn @MakeC(%a: %A) -> %return: %C { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: %A = name_ref a, %a -// CHECK:STDOUT: %Factory.ref: %Factory.type = name_ref Factory, imports.%import_ref.1 [template = constants.%Factory] +// CHECK:STDOUT: %Factory.ref: %Factory.type.1 = name_ref Factory, imports.%import_ref.1 [template = constants.%Factory] // CHECK:STDOUT: %C.ref.loc10: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %.loc10_20: type = interface_type @Factory, @Factory(constants.%C) [template = constants.%.11] -// CHECK:STDOUT: %.loc10_23: %.12 = specific_constant imports.%import_ref.6, @Factory(constants.%C) [template = constants.%.13] -// CHECK:STDOUT: %Make.ref: %.12 = name_ref Make, %.loc10_23 [template = constants.%.13] +// CHECK:STDOUT: %Factory.type: type = interface_type @Factory, @Factory(constants.%C) [template = constants.%Factory.type.4] +// CHECK:STDOUT: %.loc10: %.9 = specific_constant imports.%import_ref.6, @Factory(constants.%C) [template = constants.%.10] +// CHECK:STDOUT: %Make.ref: %.9 = name_ref Make, %.loc10 [template = constants.%.10] // CHECK:STDOUT: return to %return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -986,12 +986,12 @@ fn MakeC(a: A) -> C { // CHECK:STDOUT: %T => constants.%B // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.1 => constants.%.5 +// CHECK:STDOUT: %Factory.type => constants.%Factory.type.3 // CHECK:STDOUT: %Self => constants.%Self.2 // CHECK:STDOUT: %Make.type => constants.%Make.type.2 // CHECK:STDOUT: %Make => constants.%Make.2 -// CHECK:STDOUT: %.2 => constants.%.8 -// CHECK:STDOUT: %.3 => constants.%.9 +// CHECK:STDOUT: %.1 => constants.%.6 +// CHECK:STDOUT: %.2 => constants.%.7 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Factory(@Factory.%T) { @@ -1006,11 +1006,11 @@ fn MakeC(a: A) -> C { // CHECK:STDOUT: %T => constants.%C // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.1 => constants.%.11 +// CHECK:STDOUT: %Factory.type => constants.%Factory.type.4 // CHECK:STDOUT: %Self => constants.%Self.2 // CHECK:STDOUT: %Make.type => constants.%Make.type.3 // CHECK:STDOUT: %Make => constants.%Make.3 -// CHECK:STDOUT: %.2 => constants.%.12 -// CHECK:STDOUT: %.3 => constants.%.13 +// CHECK:STDOUT: %.1 => constants.%.9 +// CHECK:STDOUT: %.2 => constants.%.10 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/impl/no_prelude/no_definition_in_impl_file.carbon b/toolchain/check/testdata/impl/no_prelude/no_definition_in_impl_file.carbon index 6a1b7dff631ee..dcc3968400eba 100644 --- a/toolchain/check/testdata/impl/no_prelude/no_definition_in_impl_file.carbon +++ b/toolchain/check/testdata/impl/no_prelude/no_definition_in_impl_file.carbon @@ -82,25 +82,25 @@ impl () as D; // CHECK:STDOUT: --- decl_in_api_definition_in_impl.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: type = interface_type @A [template] -// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self, 0 [symbolic] -// CHECK:STDOUT: %.2: type = tuple_type () [template] +// CHECK:STDOUT: %A.type: type = interface_type @A [template] +// CHECK:STDOUT: %Self: %A.type = bind_symbolic_name Self, 0 [symbolic] +// CHECK:STDOUT: %.1: type = tuple_type () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: package: = namespace [template] { // CHECK:STDOUT: .A = %A.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %A.decl: type = interface_decl @A [template = constants.%.1] {} {} +// CHECK:STDOUT: %A.decl: type = interface_decl @A [template = constants.%A.type] {} {} // CHECK:STDOUT: impl_decl @impl [template] {} { -// CHECK:STDOUT: %.loc6_7.1: %.2 = tuple_literal () -// CHECK:STDOUT: %.loc6_7.2: type = converted %.loc6_7.1, constants.%.2 [template = constants.%.2] -// CHECK:STDOUT: %A.ref: type = name_ref A, file.%A.decl [template = constants.%.1] +// CHECK:STDOUT: %.loc6_7.1: %.1 = tuple_literal () +// CHECK:STDOUT: %.loc6_7.2: type = converted %.loc6_7.1, constants.%.1 [template = constants.%.1] +// CHECK:STDOUT: %A.ref: type = name_ref A, file.%A.decl [template = constants.%A.type] // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @A { -// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self, 0 [symbolic = constants.%Self] +// CHECK:STDOUT: %Self: %A.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -112,17 +112,17 @@ impl () as D; // CHECK:STDOUT: --- decl_in_api_definition_in_impl.impl.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: type = interface_type @A [template] -// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self, 0 [symbolic] -// CHECK:STDOUT: %.2: type = tuple_type () [template] -// CHECK:STDOUT: %.3: = interface_witness () [template] +// CHECK:STDOUT: %A.type: type = interface_type @A [template] +// CHECK:STDOUT: %Self: %A.type = bind_symbolic_name Self, 0 [symbolic] +// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %.2: = interface_witness () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { -// CHECK:STDOUT: %import_ref.1: type = import_ref Main//decl_in_api_definition_in_impl, inst+1, loaded [template = constants.%.1] +// CHECK:STDOUT: %import_ref.1: type = import_ref Main//decl_in_api_definition_in_impl, inst+1, loaded [template = constants.%A.type] // CHECK:STDOUT: %import_ref.2 = import_ref Main//decl_in_api_definition_in_impl, inst+3, unloaded -// CHECK:STDOUT: %import_ref.3: type = import_ref Main//decl_in_api_definition_in_impl, inst+7, loaded [template = constants.%.2] -// CHECK:STDOUT: %import_ref.4: type = import_ref Main//decl_in_api_definition_in_impl, inst+8, loaded [template = constants.%.1] +// CHECK:STDOUT: %import_ref.3: type = import_ref Main//decl_in_api_definition_in_impl, inst+7, loaded [template = constants.%.1] +// CHECK:STDOUT: %import_ref.4: type = import_ref Main//decl_in_api_definition_in_impl, inst+8, loaded [template = constants.%A.type] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -132,14 +132,14 @@ impl () as D; // CHECK:STDOUT: %default.import.loc2_6.1 = import // CHECK:STDOUT: %default.import.loc2_6.2 = import // CHECK:STDOUT: impl_decl @impl [template] {} { -// CHECK:STDOUT: %.loc4_7.1: %.2 = tuple_literal () -// CHECK:STDOUT: %.loc4_7.2: type = converted %.loc4_7.1, constants.%.2 [template = constants.%.2] -// CHECK:STDOUT: %A.ref.loc4: type = name_ref A, imports.%import_ref.1 [template = constants.%.1] +// CHECK:STDOUT: %.loc4_7.1: %.1 = tuple_literal () +// CHECK:STDOUT: %.loc4_7.2: type = converted %.loc4_7.1, constants.%.1 [template = constants.%.1] +// CHECK:STDOUT: %A.ref.loc4: type = name_ref A, imports.%import_ref.1 [template = constants.%A.type] // CHECK:STDOUT: } // CHECK:STDOUT: impl_decl @impl [template] {} { -// CHECK:STDOUT: %.loc6_7.1: %.2 = tuple_literal () -// CHECK:STDOUT: %.loc6_7.2: type = converted %.loc6_7.1, constants.%.2 [template = constants.%.2] -// CHECK:STDOUT: %A.ref.loc6: type = name_ref A, imports.%import_ref.1 [template = constants.%.1] +// CHECK:STDOUT: %.loc6_7.1: %.1 = tuple_literal () +// CHECK:STDOUT: %.loc6_7.2: type = converted %.loc6_7.1, constants.%.1 [template = constants.%.1] +// CHECK:STDOUT: %A.ref.loc6: type = name_ref A, imports.%import_ref.1 [template = constants.%A.type] // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -150,7 +150,7 @@ impl () as D; // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl: imports.%import_ref.3 as imports.%import_ref.4 { -// CHECK:STDOUT: %.loc6_14: = interface_witness () [template = constants.%.3] +// CHECK:STDOUT: %.loc6_14: = interface_witness () [template = constants.%.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: witness = %.loc6_14 @@ -165,16 +165,16 @@ impl () as D; // CHECK:STDOUT: --- use_decl_in_api.impl.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: type = interface_type @A [template] -// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self, 0 [symbolic] -// CHECK:STDOUT: %.2: type = tuple_type () [template] +// CHECK:STDOUT: %A.type: type = interface_type @A [template] +// CHECK:STDOUT: %Self: %A.type = bind_symbolic_name Self, 0 [symbolic] +// CHECK:STDOUT: %.1: type = tuple_type () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %import_ref.1 = import_ref Main//decl_in_api_definition_in_impl, inst+1, unloaded // CHECK:STDOUT: %import_ref.2 = import_ref Main//decl_in_api_definition_in_impl, inst+3, unloaded -// CHECK:STDOUT: %import_ref.3: type = import_ref Main//decl_in_api_definition_in_impl, inst+7, loaded [template = constants.%.2] -// CHECK:STDOUT: %import_ref.4: type = import_ref Main//decl_in_api_definition_in_impl, inst+8, loaded [template = constants.%.1] +// CHECK:STDOUT: %import_ref.3: type = import_ref Main//decl_in_api_definition_in_impl, inst+7, loaded [template = constants.%.1] +// CHECK:STDOUT: %import_ref.4: type = import_ref Main//decl_in_api_definition_in_impl, inst+8, loaded [template = constants.%A.type] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -196,25 +196,25 @@ impl () as D; // CHECK:STDOUT: --- decl_only_in_api.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: type = interface_type @B [template] -// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self, 0 [symbolic] -// CHECK:STDOUT: %.2: type = tuple_type () [template] +// CHECK:STDOUT: %B.type: type = interface_type @B [template] +// CHECK:STDOUT: %Self: %B.type = bind_symbolic_name Self, 0 [symbolic] +// CHECK:STDOUT: %.1: type = tuple_type () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: package: = namespace [template] { // CHECK:STDOUT: .B = %B.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %B.decl: type = interface_decl @B [template = constants.%.1] {} {} +// CHECK:STDOUT: %B.decl: type = interface_decl @B [template = constants.%B.type] {} {} // CHECK:STDOUT: impl_decl @impl [template] {} { -// CHECK:STDOUT: %.loc6_7.1: %.2 = tuple_literal () -// CHECK:STDOUT: %.loc6_7.2: type = converted %.loc6_7.1, constants.%.2 [template = constants.%.2] -// CHECK:STDOUT: %B.ref: type = name_ref B, file.%B.decl [template = constants.%.1] +// CHECK:STDOUT: %.loc6_7.1: %.1 = tuple_literal () +// CHECK:STDOUT: %.loc6_7.2: type = converted %.loc6_7.1, constants.%.1 [template = constants.%.1] +// CHECK:STDOUT: %B.ref: type = name_ref B, file.%B.decl [template = constants.%B.type] // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @B { -// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self, 0 [symbolic = constants.%Self] +// CHECK:STDOUT: %Self: %B.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -226,16 +226,16 @@ impl () as D; // CHECK:STDOUT: --- decl_only_in_api.impl.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: type = interface_type @B [template] -// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self, 0 [symbolic] -// CHECK:STDOUT: %.2: type = tuple_type () [template] +// CHECK:STDOUT: %B.type: type = interface_type @B [template] +// CHECK:STDOUT: %Self: %B.type = bind_symbolic_name Self, 0 [symbolic] +// CHECK:STDOUT: %.1: type = tuple_type () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %import_ref.1 = import_ref Main//decl_only_in_api, inst+1, unloaded // CHECK:STDOUT: %import_ref.2 = import_ref Main//decl_only_in_api, inst+3, unloaded -// CHECK:STDOUT: %import_ref.3: type = import_ref Main//decl_only_in_api, inst+7, loaded [template = constants.%.2] -// CHECK:STDOUT: %import_ref.4: type = import_ref Main//decl_only_in_api, inst+8, loaded [template = constants.%.1] +// CHECK:STDOUT: %import_ref.3: type = import_ref Main//decl_only_in_api, inst+7, loaded [template = constants.%.1] +// CHECK:STDOUT: %import_ref.4: type = import_ref Main//decl_only_in_api, inst+8, loaded [template = constants.%B.type] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -257,25 +257,25 @@ impl () as D; // CHECK:STDOUT: --- decl_in_api_decl_in_impl.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: type = interface_type @C [template] -// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self, 0 [symbolic] -// CHECK:STDOUT: %.2: type = tuple_type () [template] +// CHECK:STDOUT: %C.type: type = interface_type @C [template] +// CHECK:STDOUT: %Self: %C.type = bind_symbolic_name Self, 0 [symbolic] +// CHECK:STDOUT: %.1: type = tuple_type () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: package: = namespace [template] { // CHECK:STDOUT: .C = %C.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %C.decl: type = interface_decl @C [template = constants.%.1] {} {} +// CHECK:STDOUT: %C.decl: type = interface_decl @C [template = constants.%C.type] {} {} // CHECK:STDOUT: impl_decl @impl [template] {} { -// CHECK:STDOUT: %.loc6_7.1: %.2 = tuple_literal () -// CHECK:STDOUT: %.loc6_7.2: type = converted %.loc6_7.1, constants.%.2 [template = constants.%.2] -// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%.1] +// CHECK:STDOUT: %.loc6_7.1: %.1 = tuple_literal () +// CHECK:STDOUT: %.loc6_7.2: type = converted %.loc6_7.1, constants.%.1 [template = constants.%.1] +// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C.type] // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @C { -// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self, 0 [symbolic = constants.%Self] +// CHECK:STDOUT: %Self: %C.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -287,16 +287,16 @@ impl () as D; // CHECK:STDOUT: --- fail_decl_in_api_decl_in_impl.impl.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: type = interface_type @C [template] -// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self, 0 [symbolic] -// CHECK:STDOUT: %.2: type = tuple_type () [template] +// CHECK:STDOUT: %C.type: type = interface_type @C [template] +// CHECK:STDOUT: %Self: %C.type = bind_symbolic_name Self, 0 [symbolic] +// CHECK:STDOUT: %.1: type = tuple_type () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { -// CHECK:STDOUT: %import_ref.1: type = import_ref Main//decl_in_api_decl_in_impl, inst+1, loaded [template = constants.%.1] +// CHECK:STDOUT: %import_ref.1: type = import_ref Main//decl_in_api_decl_in_impl, inst+1, loaded [template = constants.%C.type] // CHECK:STDOUT: %import_ref.2 = import_ref Main//decl_in_api_decl_in_impl, inst+3, unloaded -// CHECK:STDOUT: %import_ref.3: type = import_ref Main//decl_in_api_decl_in_impl, inst+7, loaded [template = constants.%.2] -// CHECK:STDOUT: %import_ref.4: type = import_ref Main//decl_in_api_decl_in_impl, inst+8, loaded [template = constants.%.1] +// CHECK:STDOUT: %import_ref.3: type = import_ref Main//decl_in_api_decl_in_impl, inst+7, loaded [template = constants.%.1] +// CHECK:STDOUT: %import_ref.4: type = import_ref Main//decl_in_api_decl_in_impl, inst+8, loaded [template = constants.%C.type] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -306,9 +306,9 @@ impl () as D; // CHECK:STDOUT: %default.import.loc2_6.1 = import // CHECK:STDOUT: %default.import.loc2_6.2 = import // CHECK:STDOUT: impl_decl @impl [template] {} { -// CHECK:STDOUT: %.loc8_7.1: %.2 = tuple_literal () -// CHECK:STDOUT: %.loc8_7.2: type = converted %.loc8_7.1, constants.%.2 [template = constants.%.2] -// CHECK:STDOUT: %C.ref: type = name_ref C, imports.%import_ref.1 [template = constants.%.1] +// CHECK:STDOUT: %.loc8_7.1: %.1 = tuple_literal () +// CHECK:STDOUT: %.loc8_7.2: type = converted %.loc8_7.1, constants.%.1 [template = constants.%.1] +// CHECK:STDOUT: %C.ref: type = name_ref C, imports.%import_ref.1 [template = constants.%C.type] // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -329,9 +329,9 @@ impl () as D; // CHECK:STDOUT: --- fail_decl_only_in_impl.impl.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: type = interface_type @D [template] -// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self, 0 [symbolic] -// CHECK:STDOUT: %.2: type = tuple_type () [template] +// CHECK:STDOUT: %D.type: type = interface_type @D [template] +// CHECK:STDOUT: %Self: %D.type = bind_symbolic_name Self, 0 [symbolic] +// CHECK:STDOUT: %.1: type = tuple_type () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -340,16 +340,16 @@ impl () as D; // CHECK:STDOUT: } // CHECK:STDOUT: %default.import.loc2_6.1 = import // CHECK:STDOUT: %default.import.loc2_6.2 = import -// CHECK:STDOUT: %D.decl: type = interface_decl @D [template = constants.%.1] {} {} +// CHECK:STDOUT: %D.decl: type = interface_decl @D [template = constants.%D.type] {} {} // CHECK:STDOUT: impl_decl @impl [template] {} { -// CHECK:STDOUT: %.loc9_7.1: %.2 = tuple_literal () -// CHECK:STDOUT: %.loc9_7.2: type = converted %.loc9_7.1, constants.%.2 [template = constants.%.2] -// CHECK:STDOUT: %D.ref: type = name_ref D, file.%D.decl [template = constants.%.1] +// CHECK:STDOUT: %.loc9_7.1: %.1 = tuple_literal () +// CHECK:STDOUT: %.loc9_7.2: type = converted %.loc9_7.1, constants.%.1 [template = constants.%.1] +// CHECK:STDOUT: %D.ref: type = name_ref D, file.%D.decl [template = constants.%D.type] // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @D { -// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self, 0 [symbolic = constants.%Self] +// CHECK:STDOUT: %Self: %D.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self diff --git a/toolchain/check/testdata/impl/no_prelude/self_in_class.carbon b/toolchain/check/testdata/impl/no_prelude/self_in_class.carbon index bda2f2af86cc2..be96eb28f10bc 100644 --- a/toolchain/check/testdata/impl/no_prelude/self_in_class.carbon +++ b/toolchain/check/testdata/impl/no_prelude/self_in_class.carbon @@ -25,21 +25,21 @@ class A { // CHECK:STDOUT: --- self_in_class.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: type = interface_type @DefaultConstructible [template] -// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self, 0 [symbolic] +// CHECK:STDOUT: %DefaultConstructible.type: type = interface_type @DefaultConstructible [template] +// CHECK:STDOUT: %Self: %DefaultConstructible.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %Make.type.1: type = fn_type @Make.1 [template] -// CHECK:STDOUT: %.2: type = tuple_type () [template] +// CHECK:STDOUT: %.1: type = tuple_type () [template] // CHECK:STDOUT: %Make.1: %Make.type.1 = struct_value () [template] -// CHECK:STDOUT: %.3: type = assoc_entity_type %.1, %Make.type.1 [template] -// CHECK:STDOUT: %.4: %.3 = assoc_entity element0, @DefaultConstructible.%Make.decl [template] +// CHECK:STDOUT: %.2: type = assoc_entity_type %DefaultConstructible.type, %Make.type.1 [template] +// CHECK:STDOUT: %.3: %.2 = assoc_entity element0, @DefaultConstructible.%Make.decl [template] // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.5: type = struct_type {} [template] -// CHECK:STDOUT: %.6: = complete_type_witness %.5 [template] +// CHECK:STDOUT: %.4: type = struct_type {} [template] +// CHECK:STDOUT: %.5: = complete_type_witness %.4 [template] // CHECK:STDOUT: %A: type = class_type @A [template] // CHECK:STDOUT: %Make.type.2: type = fn_type @Make.2 [template] // CHECK:STDOUT: %Make.2: %Make.type.2 = struct_value () [template] -// CHECK:STDOUT: %.7: = interface_witness (%Make.2) [template] -// CHECK:STDOUT: %.8: type = ptr_type %.5 [template] +// CHECK:STDOUT: %.6: = interface_witness (%Make.2) [template] +// CHECK:STDOUT: %.7: type = ptr_type %.4 [template] // CHECK:STDOUT: %struct: %C = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -49,20 +49,20 @@ class A { // CHECK:STDOUT: .C = %C.decl // CHECK:STDOUT: .A = %A.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %DefaultConstructible.decl: type = interface_decl @DefaultConstructible [template = constants.%.1] {} {} +// CHECK:STDOUT: %DefaultConstructible.decl: type = interface_decl @DefaultConstructible [template = constants.%DefaultConstructible.type] {} {} // CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {} {} // CHECK:STDOUT: %A.decl: type = class_decl @A [template = constants.%A] {} {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @DefaultConstructible { -// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self, 0 [symbolic = constants.%Self] +// CHECK:STDOUT: %Self: %DefaultConstructible.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self] // CHECK:STDOUT: %Make.decl: %Make.type.1 = fn_decl @Make.1 [template = constants.%Make.1] {} { -// CHECK:STDOUT: %Self.ref: %.1 = name_ref Self, @DefaultConstructible.%Self [symbolic = %Self (constants.%Self)] +// CHECK:STDOUT: %Self.ref: %DefaultConstructible.type = name_ref Self, @DefaultConstructible.%Self [symbolic = %Self (constants.%Self)] // CHECK:STDOUT: %.loc12_16.1: type = facet_type_access %Self.ref [symbolic = %Self (constants.%Self)] // CHECK:STDOUT: %.loc12_16.2: type = converted %Self.ref, %.loc12_16.1 [symbolic = %Self (constants.%Self)] // CHECK:STDOUT: %return: ref @Make.1.%Self (%Self) = var // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc12: %.3 = assoc_entity element0, %Make.decl [template = constants.%.4] +// CHECK:STDOUT: %.loc12: %.2 = assoc_entity element0, %Make.decl [template = constants.%.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -75,7 +75,7 @@ class A { // CHECK:STDOUT: %Self.ref: type = name_ref Self, @impl.%C.ref [template = constants.%C] // CHECK:STDOUT: %return: ref %C = var // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc18: = interface_witness (%Make.decl) [template = constants.%.7] +// CHECK:STDOUT: %.loc18: = interface_witness (%Make.decl) [template = constants.%.6] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Make = %Make.decl @@ -83,7 +83,7 @@ class A { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { -// CHECK:STDOUT: %.loc15: = complete_type_witness %.5 [template = constants.%.6] +// CHECK:STDOUT: %.loc15: = complete_type_witness %.4 [template = constants.%.5] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C @@ -92,23 +92,23 @@ class A { // CHECK:STDOUT: class @A { // CHECK:STDOUT: impl_decl @impl [template] {} { // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %DefaultConstructible.ref: type = name_ref DefaultConstructible, file.%DefaultConstructible.decl [template = constants.%.1] +// CHECK:STDOUT: %DefaultConstructible.ref: type = name_ref DefaultConstructible, file.%DefaultConstructible.decl [template = constants.%DefaultConstructible.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc23: = complete_type_witness %.5 [template = constants.%.6] +// CHECK:STDOUT: %.loc23: = complete_type_witness %.4 [template = constants.%.5] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%A // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @Make.1(@DefaultConstructible.%Self: %.1) { -// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self)] +// CHECK:STDOUT: generic fn @Make.1(@DefaultConstructible.%Self: %DefaultConstructible.type) { +// CHECK:STDOUT: %Self: %DefaultConstructible.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self)] // CHECK:STDOUT: // CHECK:STDOUT: fn() -> @Make.1.%Self (%Self); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Make.2() -> %return: %C { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc21_33.1: %.5 = struct_literal () +// CHECK:STDOUT: %.loc21_33.1: %.4 = struct_literal () // CHECK:STDOUT: %.loc21_33.2: init %C = class_init (), %return [template = constants.%struct] // CHECK:STDOUT: %.loc21_34: init %C = converted %.loc21_33.1, %.loc21_33.2 [template = constants.%struct] // CHECK:STDOUT: return %.loc21_34 to %return diff --git a/toolchain/check/testdata/impl/no_prelude/self_in_signature.carbon b/toolchain/check/testdata/impl/no_prelude/self_in_signature.carbon index 03ad89bc8a9ac..0b821e931ad42 100644 --- a/toolchain/check/testdata/impl/no_prelude/self_in_signature.carbon +++ b/toolchain/check/testdata/impl/no_prelude/self_in_signature.carbon @@ -39,48 +39,48 @@ impl D as SelfNested { // CHECK:STDOUT: --- self_in_signature.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: type = interface_type @UseSelf [template] -// CHECK:STDOUT: %Self.1: %.1 = bind_symbolic_name Self, 0 [symbolic] +// CHECK:STDOUT: %UseSelf.type: type = interface_type @UseSelf [template] +// CHECK:STDOUT: %Self.1: %UseSelf.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %F.type.1: type = fn_type @F.1 [template] -// CHECK:STDOUT: %.2: type = tuple_type () [template] +// CHECK:STDOUT: %.1: type = tuple_type () [template] // CHECK:STDOUT: %F.1: %F.type.1 = struct_value () [template] -// CHECK:STDOUT: %.3: type = assoc_entity_type %.1, %F.type.1 [template] -// CHECK:STDOUT: %.4: %.3 = assoc_entity element0, @UseSelf.%F.decl [template] +// CHECK:STDOUT: %.2: type = assoc_entity_type %UseSelf.type, %F.type.1 [template] +// CHECK:STDOUT: %.3: %.2 = assoc_entity element0, @UseSelf.%F.decl [template] // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.5: type = struct_type {} [template] -// CHECK:STDOUT: %.6: = complete_type_witness %.5 [template] +// CHECK:STDOUT: %.4: type = struct_type {} [template] +// CHECK:STDOUT: %.5: = complete_type_witness %.4 [template] // CHECK:STDOUT: %D: type = class_type @D [template] // CHECK:STDOUT: %F.type.2: type = fn_type @F.2 [template] // CHECK:STDOUT: %F.2: %F.type.2 = struct_value () [template] -// CHECK:STDOUT: %.7: = interface_witness (%F.2) [template] -// CHECK:STDOUT: %.8: type = ptr_type %.5 [template] +// CHECK:STDOUT: %.6: = interface_witness (%F.2) [template] +// CHECK:STDOUT: %.7: type = ptr_type %.4 [template] // CHECK:STDOUT: %struct.1: %C = struct_value () [template] // CHECK:STDOUT: %F.type.3: type = fn_type @F.3 [template] // CHECK:STDOUT: %F.3: %F.type.3 = struct_value () [template] -// CHECK:STDOUT: %.9: = interface_witness (%F.3) [template] +// CHECK:STDOUT: %.8: = interface_witness (%F.3) [template] // CHECK:STDOUT: %struct.2: %D = struct_value () [template] -// CHECK:STDOUT: %.10: type = interface_type @SelfNested [template] -// CHECK:STDOUT: %Self.2: %.10 = bind_symbolic_name Self, 0 [symbolic] -// CHECK:STDOUT: %.11: type = ptr_type %Self.2 [symbolic] -// CHECK:STDOUT: %.12: type = struct_type {.x: %Self.2, .y: %.2} [symbolic] -// CHECK:STDOUT: %.13: type = tuple_type (type, type) [template] -// CHECK:STDOUT: %.14: type = tuple_type (%.11, %.12) [symbolic] +// CHECK:STDOUT: %SelfNested.type: type = interface_type @SelfNested [template] +// CHECK:STDOUT: %Self.2: %SelfNested.type = bind_symbolic_name Self, 0 [symbolic] +// CHECK:STDOUT: %.9: type = ptr_type %Self.2 [symbolic] +// CHECK:STDOUT: %.10: type = struct_type {.x: %Self.2, .y: %.1} [symbolic] +// CHECK:STDOUT: %.11: type = tuple_type (type, type) [template] +// CHECK:STDOUT: %.12: type = tuple_type (%.9, %.10) [symbolic] // CHECK:STDOUT: %F.type.4: type = fn_type @F.4 [template] // CHECK:STDOUT: %F.4: %F.type.4 = struct_value () [template] -// CHECK:STDOUT: %.15: type = assoc_entity_type %.10, %F.type.4 [template] -// CHECK:STDOUT: %.16: %.15 = assoc_entity element0, @SelfNested.%F.decl [template] -// CHECK:STDOUT: %.17: type = ptr_type %C [template] -// CHECK:STDOUT: %.18: type = struct_type {.x: %C, .y: %.2} [template] -// CHECK:STDOUT: %.19: type = tuple_type (%.17, %.18) [template] +// CHECK:STDOUT: %.13: type = assoc_entity_type %SelfNested.type, %F.type.4 [template] +// CHECK:STDOUT: %.14: %.13 = assoc_entity element0, @SelfNested.%F.decl [template] +// CHECK:STDOUT: %.15: type = ptr_type %C [template] +// CHECK:STDOUT: %.16: type = struct_type {.x: %C, .y: %.1} [template] +// CHECK:STDOUT: %.17: type = tuple_type (%.15, %.16) [template] // CHECK:STDOUT: %F.type.5: type = fn_type @F.5 [template] // CHECK:STDOUT: %F.5: %F.type.5 = struct_value () [template] -// CHECK:STDOUT: %.20: = interface_witness (%F.5) [template] -// CHECK:STDOUT: %.21: type = ptr_type %D [template] -// CHECK:STDOUT: %.22: type = struct_type {.x: %D, .y: %.2} [template] -// CHECK:STDOUT: %.23: type = tuple_type (%.21, %.22) [template] +// CHECK:STDOUT: %.18: = interface_witness (%F.5) [template] +// CHECK:STDOUT: %.19: type = ptr_type %D [template] +// CHECK:STDOUT: %.20: type = struct_type {.x: %D, .y: %.1} [template] +// CHECK:STDOUT: %.21: type = tuple_type (%.19, %.20) [template] // CHECK:STDOUT: %F.type.6: type = fn_type @F.6 [template] // CHECK:STDOUT: %F.6: %F.type.6 = struct_value () [template] -// CHECK:STDOUT: %.24: = interface_witness (%F.6) [template] +// CHECK:STDOUT: %.22: = interface_witness (%F.6) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -90,50 +90,50 @@ impl D as SelfNested { // CHECK:STDOUT: .D = %D.decl // CHECK:STDOUT: .SelfNested = %SelfNested.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %UseSelf.decl: type = interface_decl @UseSelf [template = constants.%.1] {} {} +// CHECK:STDOUT: %UseSelf.decl: type = interface_decl @UseSelf [template = constants.%UseSelf.type] {} {} // CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {} {} // CHECK:STDOUT: %D.decl: type = class_decl @D [template = constants.%D] {} {} // CHECK:STDOUT: impl_decl @impl.1 [template] {} { // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %UseSelf.ref: type = name_ref UseSelf, file.%UseSelf.decl [template = constants.%.1] +// CHECK:STDOUT: %UseSelf.ref: type = name_ref UseSelf, file.%UseSelf.decl [template = constants.%UseSelf.type] // CHECK:STDOUT: } // CHECK:STDOUT: impl_decl @impl.2 [template] {} { // CHECK:STDOUT: %D.ref: type = name_ref D, file.%D.decl [template = constants.%D] -// CHECK:STDOUT: %UseSelf.ref: type = name_ref UseSelf, file.%UseSelf.decl [template = constants.%.1] +// CHECK:STDOUT: %UseSelf.ref: type = name_ref UseSelf, file.%UseSelf.decl [template = constants.%UseSelf.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %SelfNested.decl: type = interface_decl @SelfNested [template = constants.%.10] {} {} +// CHECK:STDOUT: %SelfNested.decl: type = interface_decl @SelfNested [template = constants.%SelfNested.type] {} {} // CHECK:STDOUT: impl_decl @impl.3 [template] {} { // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %SelfNested.ref: type = name_ref SelfNested, file.%SelfNested.decl [template = constants.%.10] +// CHECK:STDOUT: %SelfNested.ref: type = name_ref SelfNested, file.%SelfNested.decl [template = constants.%SelfNested.type] // CHECK:STDOUT: } // CHECK:STDOUT: impl_decl @impl.4 [template] {} { // CHECK:STDOUT: %D.ref: type = name_ref D, file.%D.decl [template = constants.%D] -// CHECK:STDOUT: %SelfNested.ref: type = name_ref SelfNested, file.%SelfNested.decl [template = constants.%.10] +// CHECK:STDOUT: %SelfNested.ref: type = name_ref SelfNested, file.%SelfNested.decl [template = constants.%SelfNested.type] // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @UseSelf { -// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self, 0 [symbolic = constants.%Self.1] +// CHECK:STDOUT: %Self: %UseSelf.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self.1] // CHECK:STDOUT: %F.decl: %F.type.1 = fn_decl @F.1 [template = constants.%F.1] { // CHECK:STDOUT: %self.patt: @F.1.%Self (%Self.1) = binding_pattern self // CHECK:STDOUT: %x.patt: @F.1.%Self (%Self.1) = binding_pattern x // CHECK:STDOUT: } { -// CHECK:STDOUT: %Self.ref.loc12_14: %.1 = name_ref Self, @UseSelf.%Self [symbolic = %Self (constants.%Self.1)] +// CHECK:STDOUT: %Self.ref.loc12_14: %UseSelf.type = name_ref Self, @UseSelf.%Self [symbolic = %Self (constants.%Self.1)] // CHECK:STDOUT: %.loc12_14.1: type = facet_type_access %Self.ref.loc12_14 [symbolic = %Self (constants.%Self.1)] // CHECK:STDOUT: %.loc12_14.2: type = converted %Self.ref.loc12_14, %.loc12_14.1 [symbolic = %Self (constants.%Self.1)] // CHECK:STDOUT: %self.param: @F.1.%Self (%Self.1) = param self, runtime_param0 // CHECK:STDOUT: %self: @F.1.%Self (%Self.1) = bind_name self, %self.param -// CHECK:STDOUT: %Self.ref.loc12_23: %.1 = name_ref Self, @UseSelf.%Self [symbolic = %Self (constants.%Self.1)] +// CHECK:STDOUT: %Self.ref.loc12_23: %UseSelf.type = name_ref Self, @UseSelf.%Self [symbolic = %Self (constants.%Self.1)] // CHECK:STDOUT: %.loc12_23.1: type = facet_type_access %Self.ref.loc12_23 [symbolic = %Self (constants.%Self.1)] // CHECK:STDOUT: %.loc12_23.2: type = converted %Self.ref.loc12_23, %.loc12_23.1 [symbolic = %Self (constants.%Self.1)] // CHECK:STDOUT: %x.param: @F.1.%Self (%Self.1) = param x, runtime_param1 // CHECK:STDOUT: %x: @F.1.%Self (%Self.1) = bind_name x, %x.param -// CHECK:STDOUT: %Self.ref.loc12_32: %.1 = name_ref Self, @UseSelf.%Self [symbolic = %Self (constants.%Self.1)] +// CHECK:STDOUT: %Self.ref.loc12_32: %UseSelf.type = name_ref Self, @UseSelf.%Self [symbolic = %Self (constants.%Self.1)] // CHECK:STDOUT: %.loc12_32.1: type = facet_type_access %Self.ref.loc12_32 [symbolic = %Self (constants.%Self.1)] // CHECK:STDOUT: %.loc12_32.2: type = converted %Self.ref.loc12_32, %.loc12_32.1 [symbolic = %Self (constants.%Self.1)] // CHECK:STDOUT: %return: ref @F.1.%Self (%Self.1) = var // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc12: %.3 = assoc_entity element0, %F.decl [template = constants.%.4] +// CHECK:STDOUT: %.loc12: %.2 = assoc_entity element0, %F.decl [template = constants.%.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -142,26 +142,26 @@ impl D as SelfNested { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @SelfNested { -// CHECK:STDOUT: %Self: %.10 = bind_symbolic_name Self, 0 [symbolic = constants.%Self.2] +// CHECK:STDOUT: %Self: %SelfNested.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self.2] // CHECK:STDOUT: %F.decl: %F.type.4 = fn_decl @F.4 [template = constants.%F.4] { -// CHECK:STDOUT: %x.patt: @F.4.%.3 (%.14) = binding_pattern x +// CHECK:STDOUT: %x.patt: @F.4.%.3 (%.12) = binding_pattern x // CHECK:STDOUT: } { -// CHECK:STDOUT: %Self.ref.loc28_12: %.10 = name_ref Self, @SelfNested.%Self [symbolic = %Self (constants.%Self.2)] +// CHECK:STDOUT: %Self.ref.loc28_12: %SelfNested.type = name_ref Self, @SelfNested.%Self [symbolic = %Self (constants.%Self.2)] // CHECK:STDOUT: %.loc28_16.1: type = facet_type_access %Self.ref.loc28_12 [symbolic = %Self (constants.%Self.2)] // CHECK:STDOUT: %.loc28_16.2: type = converted %Self.ref.loc28_12, %.loc28_16.1 [symbolic = %Self (constants.%Self.2)] -// CHECK:STDOUT: %.loc28_16.3: type = ptr_type %Self.2 [symbolic = %.1 (constants.%.11)] -// CHECK:STDOUT: %Self.ref.loc28_24: %.10 = name_ref Self, @SelfNested.%Self [symbolic = %Self (constants.%Self.2)] +// CHECK:STDOUT: %.loc28_16.3: type = ptr_type %Self.2 [symbolic = %.1 (constants.%.9)] +// CHECK:STDOUT: %Self.ref.loc28_24: %SelfNested.type = name_ref Self, @SelfNested.%Self [symbolic = %Self (constants.%Self.2)] // CHECK:STDOUT: %.loc28_24.1: type = facet_type_access %Self.ref.loc28_24 [symbolic = %Self (constants.%Self.2)] // CHECK:STDOUT: %.loc28_24.2: type = converted %Self.ref.loc28_24, %.loc28_24.1 [symbolic = %Self (constants.%Self.2)] -// CHECK:STDOUT: %.loc28_35.1: %.2 = tuple_literal () -// CHECK:STDOUT: %.loc28_35.2: type = converted %.loc28_35.1, constants.%.2 [template = constants.%.2] -// CHECK:STDOUT: %.loc28_36: type = struct_type {.x: %Self.2, .y: %.2} [symbolic = %.2 (constants.%.12)] -// CHECK:STDOUT: %.loc28_37.1: %.13 = tuple_literal (%.loc28_16.3, %.loc28_36) -// CHECK:STDOUT: %.loc28_37.2: type = converted %.loc28_37.1, constants.%.14 [symbolic = %.3 (constants.%.14)] -// CHECK:STDOUT: %x.param: @F.4.%.3 (%.14) = param x, runtime_param0 -// CHECK:STDOUT: %x: @F.4.%.3 (%.14) = bind_name x, %x.param +// CHECK:STDOUT: %.loc28_35.1: %.1 = tuple_literal () +// CHECK:STDOUT: %.loc28_35.2: type = converted %.loc28_35.1, constants.%.1 [template = constants.%.1] +// CHECK:STDOUT: %.loc28_36: type = struct_type {.x: %Self.2, .y: %.1} [symbolic = %.2 (constants.%.10)] +// CHECK:STDOUT: %.loc28_37.1: %.11 = tuple_literal (%.loc28_16.3, %.loc28_36) +// CHECK:STDOUT: %.loc28_37.2: type = converted %.loc28_37.1, constants.%.12 [symbolic = %.3 (constants.%.12)] +// CHECK:STDOUT: %x.param: @F.4.%.3 (%.12) = param x, runtime_param0 +// CHECK:STDOUT: %x: @F.4.%.3 (%.12) = bind_name x, %x.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc28: %.15 = assoc_entity element0, %F.decl [template = constants.%.16] +// CHECK:STDOUT: %.loc28: %.13 = assoc_entity element0, %F.decl [template = constants.%.14] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -183,7 +183,7 @@ impl D as SelfNested { // CHECK:STDOUT: %C.ref.loc20_26: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %return: ref %C = var // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc19: = interface_witness (%F.decl) [template = constants.%.7] +// CHECK:STDOUT: %.loc19: = interface_witness (%F.decl) [template = constants.%.6] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %F.decl @@ -204,7 +204,7 @@ impl D as SelfNested { // CHECK:STDOUT: %Self.ref.loc24_32: type = name_ref Self, @impl.2.%D.ref [template = constants.%D] // CHECK:STDOUT: %return: ref %D = var // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc23: = interface_witness (%F.decl) [template = constants.%.9] +// CHECK:STDOUT: %.loc23: = interface_witness (%F.decl) [template = constants.%.8] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %F.decl @@ -213,20 +213,20 @@ impl D as SelfNested { // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.3: %C.ref as %SelfNested.ref { // CHECK:STDOUT: %F.decl: %F.type.5 = fn_decl @F.5 [template = constants.%F.5] { -// CHECK:STDOUT: %x.patt: %.19 = binding_pattern x +// CHECK:STDOUT: %x.patt: %.17 = binding_pattern x // CHECK:STDOUT: } { // CHECK:STDOUT: %C.ref.loc32_12: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %.loc32_13: type = ptr_type %C [template = constants.%.17] +// CHECK:STDOUT: %.loc32_13: type = ptr_type %C [template = constants.%.15] // CHECK:STDOUT: %C.ref.loc32_21: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %.loc32_29.1: %.2 = tuple_literal () -// CHECK:STDOUT: %.loc32_29.2: type = converted %.loc32_29.1, constants.%.2 [template = constants.%.2] -// CHECK:STDOUT: %.loc32_30: type = struct_type {.x: %C, .y: %.2} [template = constants.%.18] -// CHECK:STDOUT: %.loc32_31.1: %.13 = tuple_literal (%.loc32_13, %.loc32_30) -// CHECK:STDOUT: %.loc32_31.2: type = converted %.loc32_31.1, constants.%.19 [template = constants.%.19] -// CHECK:STDOUT: %x.param: %.19 = param x, runtime_param0 -// CHECK:STDOUT: %x: %.19 = bind_name x, %x.param +// CHECK:STDOUT: %.loc32_29.1: %.1 = tuple_literal () +// CHECK:STDOUT: %.loc32_29.2: type = converted %.loc32_29.1, constants.%.1 [template = constants.%.1] +// CHECK:STDOUT: %.loc32_30: type = struct_type {.x: %C, .y: %.1} [template = constants.%.16] +// CHECK:STDOUT: %.loc32_31.1: %.11 = tuple_literal (%.loc32_13, %.loc32_30) +// CHECK:STDOUT: %.loc32_31.2: type = converted %.loc32_31.1, constants.%.17 [template = constants.%.17] +// CHECK:STDOUT: %x.param: %.17 = param x, runtime_param0 +// CHECK:STDOUT: %x: %.17 = bind_name x, %x.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc31: = interface_witness (%F.decl) [template = constants.%.20] +// CHECK:STDOUT: %.loc31: = interface_witness (%F.decl) [template = constants.%.18] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %F.decl @@ -235,20 +235,20 @@ impl D as SelfNested { // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.4: %D.ref as %SelfNested.ref { // CHECK:STDOUT: %F.decl: %F.type.6 = fn_decl @F.6 [template = constants.%F.6] { -// CHECK:STDOUT: %x.patt: %.23 = binding_pattern x +// CHECK:STDOUT: %x.patt: %.21 = binding_pattern x // CHECK:STDOUT: } { // CHECK:STDOUT: %Self.ref.loc36_12: type = name_ref Self, @impl.4.%D.ref [template = constants.%D] -// CHECK:STDOUT: %.loc36_16: type = ptr_type %D [template = constants.%.21] +// CHECK:STDOUT: %.loc36_16: type = ptr_type %D [template = constants.%.19] // CHECK:STDOUT: %Self.ref.loc36_24: type = name_ref Self, @impl.4.%D.ref [template = constants.%D] -// CHECK:STDOUT: %.loc36_35.1: %.2 = tuple_literal () -// CHECK:STDOUT: %.loc36_35.2: type = converted %.loc36_35.1, constants.%.2 [template = constants.%.2] -// CHECK:STDOUT: %.loc36_36: type = struct_type {.x: %D, .y: %.2} [template = constants.%.22] -// CHECK:STDOUT: %.loc36_37.1: %.13 = tuple_literal (%.loc36_16, %.loc36_36) -// CHECK:STDOUT: %.loc36_37.2: type = converted %.loc36_37.1, constants.%.23 [template = constants.%.23] -// CHECK:STDOUT: %x.param: %.23 = param x, runtime_param0 -// CHECK:STDOUT: %x: %.23 = bind_name x, %x.param +// CHECK:STDOUT: %.loc36_35.1: %.1 = tuple_literal () +// CHECK:STDOUT: %.loc36_35.2: type = converted %.loc36_35.1, constants.%.1 [template = constants.%.1] +// CHECK:STDOUT: %.loc36_36: type = struct_type {.x: %D, .y: %.1} [template = constants.%.20] +// CHECK:STDOUT: %.loc36_37.1: %.11 = tuple_literal (%.loc36_16, %.loc36_36) +// CHECK:STDOUT: %.loc36_37.2: type = converted %.loc36_37.1, constants.%.21 [template = constants.%.21] +// CHECK:STDOUT: %x.param: %.21 = param x, runtime_param0 +// CHECK:STDOUT: %x: %.21 = bind_name x, %x.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc35: = interface_witness (%F.decl) [template = constants.%.24] +// CHECK:STDOUT: %.loc35: = interface_witness (%F.decl) [template = constants.%.22] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %F.decl @@ -256,28 +256,28 @@ impl D as SelfNested { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { -// CHECK:STDOUT: %.loc15: = complete_type_witness %.5 [template = constants.%.6] +// CHECK:STDOUT: %.loc15: = complete_type_witness %.4 [template = constants.%.5] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @D { -// CHECK:STDOUT: %.loc17: = complete_type_witness %.5 [template = constants.%.6] +// CHECK:STDOUT: %.loc17: = complete_type_witness %.4 [template = constants.%.5] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%D // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @F.1(@UseSelf.%Self: %.1) { -// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self.1)] +// CHECK:STDOUT: generic fn @F.1(@UseSelf.%Self: %UseSelf.type) { +// CHECK:STDOUT: %Self: %UseSelf.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self.1)] // CHECK:STDOUT: // CHECK:STDOUT: fn[%self: @F.1.%Self (%Self.1)](%x: @F.1.%Self (%Self.1)) -> @F.1.%Self (%Self.1); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F.2[%self: %C](%x: %C) -> %return: %C { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc20_38.1: %.5 = struct_literal () +// CHECK:STDOUT: %.loc20_38.1: %.4 = struct_literal () // CHECK:STDOUT: %.loc20_38.2: init %C = class_init (), %return [template = constants.%struct.1] // CHECK:STDOUT: %.loc20_39: init %C = converted %.loc20_38.1, %.loc20_38.2 [template = constants.%struct.1] // CHECK:STDOUT: return %.loc20_39 to %return @@ -285,24 +285,24 @@ impl D as SelfNested { // CHECK:STDOUT: // CHECK:STDOUT: fn @F.3[%self: %D](%x: %D) -> %return: %D { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc24_47.1: %.5 = struct_literal () +// CHECK:STDOUT: %.loc24_47.1: %.4 = struct_literal () // CHECK:STDOUT: %.loc24_47.2: init %D = class_init (), %return [template = constants.%struct.2] // CHECK:STDOUT: %.loc24_48: init %D = converted %.loc24_47.1, %.loc24_47.2 [template = constants.%struct.2] // CHECK:STDOUT: return %.loc24_48 to %return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @F.4(@SelfNested.%Self: %.10) { -// CHECK:STDOUT: %Self: %.10 = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self.2)] -// CHECK:STDOUT: %.1: type = ptr_type @F.4.%Self (%Self.2) [symbolic = %.1 (constants.%.11)] -// CHECK:STDOUT: %.2: type = struct_type {.x: @F.4.%Self (%Self.2), .y: %.2} [symbolic = %.2 (constants.%.12)] -// CHECK:STDOUT: %.3: type = tuple_type (@F.4.%.1 (%.11), @F.4.%.2 (%.12)) [symbolic = %.3 (constants.%.14)] +// CHECK:STDOUT: generic fn @F.4(@SelfNested.%Self: %SelfNested.type) { +// CHECK:STDOUT: %Self: %SelfNested.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self.2)] +// CHECK:STDOUT: %.1: type = ptr_type @F.4.%Self (%Self.2) [symbolic = %.1 (constants.%.9)] +// CHECK:STDOUT: %.2: type = struct_type {.x: @F.4.%Self (%Self.2), .y: %.1} [symbolic = %.2 (constants.%.10)] +// CHECK:STDOUT: %.3: type = tuple_type (@F.4.%.1 (%.9), @F.4.%.2 (%.10)) [symbolic = %.3 (constants.%.12)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%x: @F.4.%.3 (%.14)); +// CHECK:STDOUT: fn(%x: @F.4.%.3 (%.12)); // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @F.5(%x: %.19); +// CHECK:STDOUT: fn @F.5(%x: %.17); // CHECK:STDOUT: -// CHECK:STDOUT: fn @F.6(%x: %.23); +// CHECK:STDOUT: fn @F.6(%x: %.21); // CHECK:STDOUT: // CHECK:STDOUT: specific @F.1(constants.%Self.1) { // CHECK:STDOUT: %Self => constants.%Self.1 @@ -318,22 +318,22 @@ impl D as SelfNested { // CHECK:STDOUT: // CHECK:STDOUT: specific @F.4(constants.%Self.2) { // CHECK:STDOUT: %Self => constants.%Self.2 -// CHECK:STDOUT: %.1 => constants.%.11 -// CHECK:STDOUT: %.2 => constants.%.12 -// CHECK:STDOUT: %.3 => constants.%.14 +// CHECK:STDOUT: %.1 => constants.%.9 +// CHECK:STDOUT: %.2 => constants.%.10 +// CHECK:STDOUT: %.3 => constants.%.12 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F.4(constants.%C) { // CHECK:STDOUT: %Self => constants.%C -// CHECK:STDOUT: %.1 => constants.%.17 -// CHECK:STDOUT: %.2 => constants.%.18 -// CHECK:STDOUT: %.3 => constants.%.19 +// CHECK:STDOUT: %.1 => constants.%.15 +// CHECK:STDOUT: %.2 => constants.%.16 +// CHECK:STDOUT: %.3 => constants.%.17 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F.4(constants.%D) { // CHECK:STDOUT: %Self => constants.%D -// CHECK:STDOUT: %.1 => constants.%.21 -// CHECK:STDOUT: %.2 => constants.%.22 -// CHECK:STDOUT: %.3 => constants.%.23 +// CHECK:STDOUT: %.1 => constants.%.19 +// CHECK:STDOUT: %.2 => constants.%.20 +// CHECK:STDOUT: %.3 => constants.%.21 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/impl/redeclaration.carbon b/toolchain/check/testdata/impl/redeclaration.carbon index 06014c4402d9f..97c8cf271bf5f 100644 --- a/toolchain/check/testdata/impl/redeclaration.carbon +++ b/toolchain/check/testdata/impl/redeclaration.carbon @@ -21,15 +21,15 @@ impl i32 as I {} // CHECK:STDOUT: --- redeclaration.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: type = interface_type @I [template] -// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self, 0 [symbolic] +// CHECK:STDOUT: %I.type: type = interface_type @I [template] +// CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] -// CHECK:STDOUT: %.2: type = tuple_type () [template] +// CHECK:STDOUT: %.1: type = tuple_type () [template] // CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %X: type = class_type @X [template] -// CHECK:STDOUT: %.3: type = struct_type {} [template] -// CHECK:STDOUT: %.4: = complete_type_witness %.3 [template] -// CHECK:STDOUT: %.5: = interface_witness () [template] +// CHECK:STDOUT: %.2: type = struct_type {} [template] +// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] +// CHECK:STDOUT: %.4: = interface_witness () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -54,24 +54,24 @@ impl i32 as I {} // CHECK:STDOUT: .X = %X.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %I.decl: type = interface_decl @I [template = constants.%.1] {} {} +// CHECK:STDOUT: %I.decl: type = interface_decl @I [template = constants.%I.type] {} {} // CHECK:STDOUT: impl_decl @impl.1 [template] {} { // CHECK:STDOUT: %int.make_type_32.loc13: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc13_6.1: type = value_of_initializer %int.make_type_32.loc13 [template = i32] // CHECK:STDOUT: %.loc13_6.2: type = converted %int.make_type_32.loc13, %.loc13_6.1 [template = i32] -// CHECK:STDOUT: %I.ref.loc13: type = name_ref I, file.%I.decl [template = constants.%.1] +// CHECK:STDOUT: %I.ref.loc13: type = name_ref I, file.%I.decl [template = constants.%I.type] // CHECK:STDOUT: } // CHECK:STDOUT: %X.decl: type = class_decl @X [template = constants.%X] {} {} // CHECK:STDOUT: impl_decl @impl.2 [template] {} { // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc19_6.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc19_6.2: type = converted %int.make_type_32, %.loc19_6.1 [template = i32] -// CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [template = constants.%.1] +// CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [template = constants.%I.type] // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @I { -// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self, 0 [symbolic = constants.%Self] +// CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -81,7 +81,7 @@ impl i32 as I {} // CHECK:STDOUT: impl @impl.1: %.loc13_6.2 as %I.ref.loc13; // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.2: %.loc19_6.2 as %I.ref { -// CHECK:STDOUT: %.loc19_15: = interface_witness () [template = constants.%.5] +// CHECK:STDOUT: %.loc19_15: = interface_witness () [template = constants.%.4] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: witness = %.loc19_15 @@ -92,9 +92,9 @@ impl i32 as I {} // CHECK:STDOUT: %int.make_type_32.loc16: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc16_8.1: type = value_of_initializer %int.make_type_32.loc16 [template = i32] // CHECK:STDOUT: %.loc16_8.2: type = converted %int.make_type_32.loc16, %.loc16_8.1 [template = i32] -// CHECK:STDOUT: %I.ref.loc16: type = name_ref I, file.%I.decl [template = constants.%.1] +// CHECK:STDOUT: %I.ref.loc16: type = name_ref I, file.%I.decl [template = constants.%I.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc17: = complete_type_witness %.3 [template = constants.%.4] +// CHECK:STDOUT: %.loc17: = complete_type_witness %.2 [template = constants.%.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%X diff --git a/toolchain/check/testdata/index/fail_array_non_int_indexing.carbon b/toolchain/check/testdata/index/fail_array_non_int_indexing.carbon index 5738a63bd405f..9f1d3c34f24da 100644 --- a/toolchain/check/testdata/index/fail_array_non_int_indexing.carbon +++ b/toolchain/check/testdata/index/fail_array_non_int_indexing.carbon @@ -31,22 +31,22 @@ var b: i32 = a[2.6]; // CHECK:STDOUT: %.7: i32 = int_literal 0 [template] // CHECK:STDOUT: %array: %.3 = tuple_value (%.5) [template] // CHECK:STDOUT: %.8: f64 = float_literal 2.6000000000000001 [template] -// CHECK:STDOUT: %ImplicitAs.type: type = generic_interface_type @ImplicitAs [template] -// CHECK:STDOUT: %ImplicitAs: %ImplicitAs.type = struct_value () [template] +// CHECK:STDOUT: %ImplicitAs.type.1: type = generic_interface_type @ImplicitAs [template] +// CHECK:STDOUT: %ImplicitAs: %ImplicitAs.type.1 = struct_value () [template] // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic] -// CHECK:STDOUT: %.9: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic] -// CHECK:STDOUT: %Self.1: @ImplicitAs.%.1 (%.9) = bind_symbolic_name Self, 1 [symbolic] -// CHECK:STDOUT: %Self.2: %.9 = bind_symbolic_name Self, 1 [symbolic] +// CHECK:STDOUT: %ImplicitAs.type.2: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic] +// CHECK:STDOUT: %Self.1: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2) = bind_symbolic_name Self, 1 [symbolic] +// CHECK:STDOUT: %Self.2: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: %Convert.type.1: type = fn_type @Convert, @ImplicitAs(%Dest) [symbolic] // CHECK:STDOUT: %Convert.1: %Convert.type.1 = struct_value () [symbolic] -// CHECK:STDOUT: %.10: type = assoc_entity_type %.9, %Convert.type.1 [symbolic] -// CHECK:STDOUT: %.11: %.10 = assoc_entity element0, imports.%import_ref.6 [symbolic] -// CHECK:STDOUT: %.12: type = interface_type @ImplicitAs, @ImplicitAs(i32) [template] +// CHECK:STDOUT: %.9: type = assoc_entity_type %ImplicitAs.type.2, %Convert.type.1 [symbolic] +// CHECK:STDOUT: %.10: %.9 = assoc_entity element0, imports.%import_ref.6 [symbolic] +// CHECK:STDOUT: %ImplicitAs.type.3: type = interface_type @ImplicitAs, @ImplicitAs(i32) [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert, @ImplicitAs(i32) [template] // CHECK:STDOUT: %Convert.2: %Convert.type.2 = struct_value () [template] -// CHECK:STDOUT: %.13: type = assoc_entity_type %.12, %Convert.type.2 [template] -// CHECK:STDOUT: %.14: %.13 = assoc_entity element0, imports.%import_ref.6 [template] -// CHECK:STDOUT: %.15: %.10 = assoc_entity element0, imports.%import_ref.7 [symbolic] +// CHECK:STDOUT: %.11: type = assoc_entity_type %ImplicitAs.type.3, %Convert.type.2 [template] +// CHECK:STDOUT: %.12: %.11 = assoc_entity element0, imports.%import_ref.6 [template] +// CHECK:STDOUT: %.13: %.9 = assoc_entity element0, imports.%import_ref.7 [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -63,9 +63,9 @@ var b: i32 = a[2.6]; // CHECK:STDOUT: import Core//prelude/types/bool // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref Core//prelude/types, inst+4, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.2: %ImplicitAs.type = import_ref Core//prelude/operators/as, inst+40, loaded [template = constants.%ImplicitAs] +// CHECK:STDOUT: %import_ref.2: %ImplicitAs.type.1 = import_ref Core//prelude/operators/as, inst+40, loaded [template = constants.%ImplicitAs] // CHECK:STDOUT: %import_ref.3 = import_ref Core//prelude/operators/as, inst+45, unloaded -// CHECK:STDOUT: %import_ref.4: @ImplicitAs.%.2 (%.10) = import_ref Core//prelude/operators/as, inst+63, loaded [symbolic = @ImplicitAs.%.3 (constants.%.15)] +// CHECK:STDOUT: %import_ref.4: @ImplicitAs.%.1 (%.9) = import_ref Core//prelude/operators/as, inst+63, loaded [symbolic = @ImplicitAs.%.2 (constants.%.13)] // CHECK:STDOUT: %import_ref.5 = import_ref Core//prelude/operators/as, inst+56, unloaded // CHECK:STDOUT: %import_ref.6 = import_ref Core//prelude/operators/as, inst+56, unloaded // CHECK:STDOUT: %import_ref.7 = import_ref Core//prelude/operators/as, inst+56, unloaded @@ -96,12 +96,12 @@ var b: i32 = a[2.6]; // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic = %Dest (constants.%Dest)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.1: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic = %.1 (constants.%.9)] -// CHECK:STDOUT: %Self: %.9 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] +// CHECK:STDOUT: %ImplicitAs.type: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.2)] +// CHECK:STDOUT: %Self: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] // CHECK:STDOUT: %Convert.type: type = fn_type @Convert, @ImplicitAs(%Dest) [symbolic = %Convert.type (constants.%Convert.type.1)] // CHECK:STDOUT: %Convert: @ImplicitAs.%Convert.type (%Convert.type.1) = struct_value () [symbolic = %Convert (constants.%Convert.1)] -// CHECK:STDOUT: %.2: type = assoc_entity_type @ImplicitAs.%.1 (%.9), @ImplicitAs.%Convert.type (%Convert.type.1) [symbolic = %.2 (constants.%.10)] -// CHECK:STDOUT: %.3: @ImplicitAs.%.2 (%.10) = assoc_entity element0, imports.%import_ref.6 [symbolic = %.3 (constants.%.11)] +// CHECK:STDOUT: %.1: type = assoc_entity_type @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2), @ImplicitAs.%Convert.type (%Convert.type.1) [symbolic = %.1 (constants.%.9)] +// CHECK:STDOUT: %.2: @ImplicitAs.%.1 (%.9) = assoc_entity element0, imports.%import_ref.6 [symbolic = %.2 (constants.%.10)] // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: !members: @@ -113,10 +113,10 @@ var b: i32 = a[2.6]; // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32"; // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @Convert(constants.%Dest: type, constants.%Self.1: @ImplicitAs.%.1 (%.9)) { +// CHECK:STDOUT: generic fn @Convert(constants.%Dest: type, constants.%Self.1: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2)) { // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic = %Dest (constants.%Dest)] -// CHECK:STDOUT: %.1: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic = %.1 (constants.%.9)] -// CHECK:STDOUT: %Self: %.9 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] +// CHECK:STDOUT: %ImplicitAs.type: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.2)] +// CHECK:STDOUT: %Self: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] // CHECK:STDOUT: // CHECK:STDOUT: fn[%self: @Convert.%Self (%Self.2)]() -> @Convert.%Dest (%Dest); // CHECK:STDOUT: } @@ -133,10 +133,10 @@ var b: i32 = a[2.6]; // CHECK:STDOUT: assign file.%a.var, %.loc11_24 // CHECK:STDOUT: %a.ref: ref %.3 = name_ref a, file.%a // CHECK:STDOUT: %.loc18_16.1: f64 = float_literal 2.6000000000000001 [template = constants.%.8] -// CHECK:STDOUT: %.loc18_16.2: type = interface_type @ImplicitAs, @ImplicitAs(i32) [template = constants.%.12] -// CHECK:STDOUT: %.loc18_16.3: %.13 = specific_constant imports.%import_ref.4, @ImplicitAs(i32) [template = constants.%.14] -// CHECK:STDOUT: %Convert.ref: %.13 = name_ref Convert, %.loc18_16.3 [template = constants.%.14] -// CHECK:STDOUT: %.loc18_16.4: i32 = converted %.loc18_16.1, [template = ] +// CHECK:STDOUT: %ImplicitAs.type: type = interface_type @ImplicitAs, @ImplicitAs(i32) [template = constants.%ImplicitAs.type.3] +// CHECK:STDOUT: %.loc18_16.2: %.11 = specific_constant imports.%import_ref.4, @ImplicitAs(i32) [template = constants.%.12] +// CHECK:STDOUT: %Convert.ref: %.11 = name_ref Convert, %.loc18_16.2 [template = constants.%.12] +// CHECK:STDOUT: %.loc18_16.3: i32 = converted %.loc18_16.1, [template = ] // CHECK:STDOUT: %.loc18_19.1: ref i32 = array_index %a.ref, [template = ] // CHECK:STDOUT: %.loc18_19.2: i32 = bind_value %.loc18_19.1 // CHECK:STDOUT: assign file.%b.var, %.loc18_19.2 @@ -157,7 +157,7 @@ var b: i32 = a[2.6]; // CHECK:STDOUT: // CHECK:STDOUT: specific @Convert(constants.%Dest, constants.%Self.1) { // CHECK:STDOUT: %Dest => constants.%Dest -// CHECK:STDOUT: %.1 => constants.%.9 +// CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.2 // CHECK:STDOUT: %Self => constants.%Self.1 // CHECK:STDOUT: } // CHECK:STDOUT: @@ -165,11 +165,11 @@ var b: i32 = a[2.6]; // CHECK:STDOUT: %Dest => i32 // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.1 => constants.%.12 +// CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.3 // CHECK:STDOUT: %Self => constants.%Self.2 // CHECK:STDOUT: %Convert.type => constants.%Convert.type.2 // CHECK:STDOUT: %Convert => constants.%Convert.2 -// CHECK:STDOUT: %.2 => constants.%.13 -// CHECK:STDOUT: %.3 => constants.%.14 +// CHECK:STDOUT: %.1 => constants.%.11 +// CHECK:STDOUT: %.2 => constants.%.12 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/index/fail_negative_indexing.carbon b/toolchain/check/testdata/index/fail_negative_indexing.carbon index 4a1e9610ff147..425641bc70195 100644 --- a/toolchain/check/testdata/index/fail_negative_indexing.carbon +++ b/toolchain/check/testdata/index/fail_negative_indexing.carbon @@ -30,12 +30,12 @@ var d: i32 = c[-10]; // CHECK:STDOUT: %.8: i32 = int_literal 1 [template] // CHECK:STDOUT: %array: %.3 = tuple_value (%.5, %.5) [template] // CHECK:STDOUT: %.9: i32 = int_literal 10 [template] -// CHECK:STDOUT: %.10: type = interface_type @Negate [template] -// CHECK:STDOUT: %Self: %.10 = bind_symbolic_name Self, 0 [symbolic] +// CHECK:STDOUT: %Negate.type: type = interface_type @Negate [template] +// CHECK:STDOUT: %Self: %Negate.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %Op.type: type = fn_type @Op [template] // CHECK:STDOUT: %Op: %Op.type = struct_value () [template] -// CHECK:STDOUT: %.11: type = assoc_entity_type %.10, %Op.type [template] -// CHECK:STDOUT: %.12: %.11 = assoc_entity element0, imports.%import_ref.6 [template] +// CHECK:STDOUT: %.10: type = assoc_entity_type %Negate.type, %Op.type [template] +// CHECK:STDOUT: %.11: %.10 = assoc_entity element0, imports.%import_ref.6 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -52,9 +52,9 @@ var d: i32 = c[-10]; // CHECK:STDOUT: import Core//prelude/types/bool // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref Core//prelude/types, inst+4, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.2: type = import_ref Core//prelude/operators/arithmetic, inst+77, loaded [template = constants.%.10] +// CHECK:STDOUT: %import_ref.2: type = import_ref Core//prelude/operators/arithmetic, inst+77, loaded [template = constants.%Negate.type] // CHECK:STDOUT: %import_ref.3 = import_ref Core//prelude/operators/arithmetic, inst+79, unloaded -// CHECK:STDOUT: %import_ref.4: %.11 = import_ref Core//prelude/operators/arithmetic, inst+96, loaded [template = constants.%.12] +// CHECK:STDOUT: %import_ref.4: %.10 = import_ref Core//prelude/operators/arithmetic, inst+96, loaded [template = constants.%.11] // CHECK:STDOUT: %import_ref.5 = import_ref Core//prelude/operators/arithmetic, inst+91, unloaded // CHECK:STDOUT: %import_ref.6 = import_ref Core//prelude/operators/arithmetic, inst+91, unloaded // CHECK:STDOUT: } @@ -89,8 +89,8 @@ var d: i32 = c[-10]; // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32"; // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @Op(constants.%Self: %.10) { -// CHECK:STDOUT: %Self: %.10 = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self)] +// CHECK:STDOUT: generic fn @Op(constants.%Self: %Negate.type) { +// CHECK:STDOUT: %Self: %Negate.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self)] // CHECK:STDOUT: // CHECK:STDOUT: fn[%self: @Op.%Self (%Self)]() -> @Op.%Self (%Self); // CHECK:STDOUT: } @@ -111,7 +111,7 @@ var d: i32 = c[-10]; // CHECK:STDOUT: assign file.%c.var, %.loc11_27 // CHECK:STDOUT: %c.ref: ref %.3 = name_ref c, file.%c // CHECK:STDOUT: %.loc15_17: i32 = int_literal 10 [template = constants.%.9] -// CHECK:STDOUT: %Op.ref: %.11 = name_ref Op, imports.%import_ref.4 [template = constants.%.12] +// CHECK:STDOUT: %Op.ref: %.10 = name_ref Op, imports.%import_ref.4 [template = constants.%.11] // CHECK:STDOUT: %.loc15_19.1: ref i32 = array_index %c.ref, [template = ] // CHECK:STDOUT: %.loc15_19.2: i32 = bind_value %.loc15_19.1 // CHECK:STDOUT: assign file.%d.var, %.loc15_19.2 diff --git a/toolchain/check/testdata/interface/assoc_const.carbon b/toolchain/check/testdata/interface/assoc_const.carbon index f9a31df27ffd3..3ab76d2fa1799 100644 --- a/toolchain/check/testdata/interface/assoc_const.carbon +++ b/toolchain/check/testdata/interface/assoc_const.carbon @@ -16,15 +16,15 @@ interface I { // CHECK:STDOUT: --- assoc_const.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: type = interface_type @I [template] -// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self, 0 [symbolic] -// CHECK:STDOUT: %.2: type = assoc_entity_type %.1, type [template] -// CHECK:STDOUT: %.3: %.2 = assoc_entity element0, @I.%T [template] +// CHECK:STDOUT: %I.type: type = interface_type @I [template] +// CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic] +// CHECK:STDOUT: %.1: type = assoc_entity_type %I.type, type [template] +// CHECK:STDOUT: %.2: %.1 = assoc_entity element0, @I.%T [template] // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] -// CHECK:STDOUT: %.4: type = tuple_type () [template] +// CHECK:STDOUT: %.3: type = tuple_type () [template] // CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] -// CHECK:STDOUT: %.5: type = assoc_entity_type %.1, i32 [template] -// CHECK:STDOUT: %.6: %.5 = assoc_entity element1, @I.%N [template] +// CHECK:STDOUT: %.4: type = assoc_entity_type %I.type, i32 [template] +// CHECK:STDOUT: %.5: %.4 = assoc_entity element1, @I.%N [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -48,18 +48,18 @@ interface I { // CHECK:STDOUT: .I = %I.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %I.decl: type = interface_decl @I [template = constants.%.1] {} {} +// CHECK:STDOUT: %I.decl: type = interface_decl @I [template = constants.%I.type] {} {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @I { -// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self, 0 [symbolic = constants.%Self] +// CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self] // CHECK:STDOUT: %T: type = assoc_const_decl T [template] -// CHECK:STDOUT: %.loc12: %.2 = assoc_entity element0, %T [template = constants.%.3] +// CHECK:STDOUT: %.loc12: %.1 = assoc_entity element0, %T [template = constants.%.2] // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc13_11.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc13_11.2: type = converted %int.make_type_32, %.loc13_11.1 [template = i32] // CHECK:STDOUT: %N: i32 = assoc_const_decl N [template] -// CHECK:STDOUT: %.loc13_14: %.5 = assoc_entity element1, %N [template = constants.%.6] +// CHECK:STDOUT: %.loc13_14: %.4 = assoc_entity element1, %N [template = constants.%.5] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self diff --git a/toolchain/check/testdata/interface/fail_assoc_const_bad_default.carbon b/toolchain/check/testdata/interface/fail_assoc_const_bad_default.carbon index c153ed4748437..584f1b362cce7 100644 --- a/toolchain/check/testdata/interface/fail_assoc_const_bad_default.carbon +++ b/toolchain/check/testdata/interface/fail_assoc_const_bad_default.carbon @@ -21,28 +21,28 @@ interface I { // CHECK:STDOUT: --- fail_assoc_const_bad_default.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: type = interface_type @I [template] -// CHECK:STDOUT: %Self.1: %.1 = bind_symbolic_name Self, 0 [symbolic] -// CHECK:STDOUT: %.2: i32 = int_literal 42 [template] -// CHECK:STDOUT: %ImplicitAs.type: type = generic_interface_type @ImplicitAs [template] -// CHECK:STDOUT: %.3: type = tuple_type () [template] -// CHECK:STDOUT: %ImplicitAs: %ImplicitAs.type = struct_value () [template] +// CHECK:STDOUT: %I.type: type = interface_type @I [template] +// CHECK:STDOUT: %Self.1: %I.type = bind_symbolic_name Self, 0 [symbolic] +// CHECK:STDOUT: %.1: i32 = int_literal 42 [template] +// CHECK:STDOUT: %ImplicitAs.type.1: type = generic_interface_type @ImplicitAs [template] +// CHECK:STDOUT: %.2: type = tuple_type () [template] +// CHECK:STDOUT: %ImplicitAs: %ImplicitAs.type.1 = struct_value () [template] // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic] -// CHECK:STDOUT: %.4: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic] -// CHECK:STDOUT: %Self.2: @ImplicitAs.%.1 (%.4) = bind_symbolic_name Self, 1 [symbolic] -// CHECK:STDOUT: %Self.3: %.4 = bind_symbolic_name Self, 1 [symbolic] +// CHECK:STDOUT: %ImplicitAs.type.2: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic] +// CHECK:STDOUT: %Self.2: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2) = bind_symbolic_name Self, 1 [symbolic] +// CHECK:STDOUT: %Self.3: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: %Convert.type.1: type = fn_type @Convert, @ImplicitAs(%Dest) [symbolic] // CHECK:STDOUT: %Convert.1: %Convert.type.1 = struct_value () [symbolic] -// CHECK:STDOUT: %.5: type = assoc_entity_type %.4, %Convert.type.1 [symbolic] -// CHECK:STDOUT: %.6: %.5 = assoc_entity element0, imports.%import_ref.5 [symbolic] -// CHECK:STDOUT: %.7: type = interface_type @ImplicitAs, @ImplicitAs(type) [template] +// CHECK:STDOUT: %.3: type = assoc_entity_type %ImplicitAs.type.2, %Convert.type.1 [symbolic] +// CHECK:STDOUT: %.4: %.3 = assoc_entity element0, imports.%import_ref.5 [symbolic] +// CHECK:STDOUT: %ImplicitAs.type.3: type = interface_type @ImplicitAs, @ImplicitAs(type) [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert, @ImplicitAs(type) [template] // CHECK:STDOUT: %Convert.2: %Convert.type.2 = struct_value () [template] -// CHECK:STDOUT: %.8: type = assoc_entity_type %.7, %Convert.type.2 [template] -// CHECK:STDOUT: %.9: %.8 = assoc_entity element0, imports.%import_ref.5 [template] -// CHECK:STDOUT: %.10: %.5 = assoc_entity element0, imports.%import_ref.6 [symbolic] -// CHECK:STDOUT: %.11: type = assoc_entity_type %.1, type [template] -// CHECK:STDOUT: %.12: %.11 = assoc_entity element0, @I.%T [template] +// CHECK:STDOUT: %.5: type = assoc_entity_type %ImplicitAs.type.3, %Convert.type.2 [template] +// CHECK:STDOUT: %.6: %.5 = assoc_entity element0, imports.%import_ref.5 [template] +// CHECK:STDOUT: %.7: %.3 = assoc_entity element0, imports.%import_ref.6 [symbolic] +// CHECK:STDOUT: %.8: type = assoc_entity_type %I.type, type [template] +// CHECK:STDOUT: %.9: %.8 = assoc_entity element0, @I.%T [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -57,9 +57,9 @@ interface I { // CHECK:STDOUT: import Core//prelude/operators/comparison // CHECK:STDOUT: import Core//prelude/types/bool // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.1: %ImplicitAs.type = import_ref Core//prelude/operators/as, inst+40, loaded [template = constants.%ImplicitAs] +// CHECK:STDOUT: %import_ref.1: %ImplicitAs.type.1 = import_ref Core//prelude/operators/as, inst+40, loaded [template = constants.%ImplicitAs] // CHECK:STDOUT: %import_ref.2 = import_ref Core//prelude/operators/as, inst+45, unloaded -// CHECK:STDOUT: %import_ref.3: @ImplicitAs.%.2 (%.5) = import_ref Core//prelude/operators/as, inst+63, loaded [symbolic = @ImplicitAs.%.3 (constants.%.10)] +// CHECK:STDOUT: %import_ref.3: @ImplicitAs.%.1 (%.3) = import_ref Core//prelude/operators/as, inst+63, loaded [symbolic = @ImplicitAs.%.2 (constants.%.7)] // CHECK:STDOUT: %import_ref.4 = import_ref Core//prelude/operators/as, inst+56, unloaded // CHECK:STDOUT: %import_ref.5 = import_ref Core//prelude/operators/as, inst+56, unloaded // CHECK:STDOUT: %import_ref.6 = import_ref Core//prelude/operators/as, inst+56, unloaded @@ -71,22 +71,22 @@ interface I { // CHECK:STDOUT: .I = %I.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %I.decl: type = interface_decl @I [template = constants.%.1] {} {} +// CHECK:STDOUT: %I.decl: type = interface_decl @I [template = constants.%I.type] {} {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @I { -// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self, 0 [symbolic = constants.%Self.1] -// CHECK:STDOUT: %.loc18_18: i32 = int_literal 42 [template = constants.%.2] -// CHECK:STDOUT: %.loc18_20.1: type = interface_type @ImplicitAs, @ImplicitAs(type) [template = constants.%.7] -// CHECK:STDOUT: %.loc18_20.2: %.8 = specific_constant imports.%import_ref.3, @ImplicitAs(type) [template = constants.%.9] -// CHECK:STDOUT: %Convert.ref: %.8 = name_ref Convert, %.loc18_20.2 [template = constants.%.9] -// CHECK:STDOUT: %.loc18_20.3: type = converted %.loc18_18, [template = ] +// CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self.1] +// CHECK:STDOUT: %.loc18_18: i32 = int_literal 42 [template = constants.%.1] +// CHECK:STDOUT: %ImplicitAs.type: type = interface_type @ImplicitAs, @ImplicitAs(type) [template = constants.%ImplicitAs.type.3] +// CHECK:STDOUT: %.loc18_20.1: %.5 = specific_constant imports.%import_ref.3, @ImplicitAs(type) [template = constants.%.6] +// CHECK:STDOUT: %Convert.ref: %.5 = name_ref Convert, %.loc18_20.1 [template = constants.%.6] +// CHECK:STDOUT: %.loc18_20.2: type = converted %.loc18_18, [template = ] // CHECK:STDOUT: %T: type = assoc_const_decl T [template] -// CHECK:STDOUT: %.loc18_20.4: %.11 = assoc_entity element0, %T [template = constants.%.12] +// CHECK:STDOUT: %.loc18_20.3: %.8 = assoc_entity element0, %T [template = constants.%.9] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self -// CHECK:STDOUT: .T = %.loc18_20.4 +// CHECK:STDOUT: .T = %.loc18_20.3 // CHECK:STDOUT: witness = (%T) // CHECK:STDOUT: } // CHECK:STDOUT: @@ -94,12 +94,12 @@ interface I { // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic = %Dest (constants.%Dest)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.1: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic = %.1 (constants.%.4)] -// CHECK:STDOUT: %Self: %.4 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.3)] +// CHECK:STDOUT: %ImplicitAs.type: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.2)] +// CHECK:STDOUT: %Self: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.3)] // CHECK:STDOUT: %Convert.type: type = fn_type @Convert, @ImplicitAs(%Dest) [symbolic = %Convert.type (constants.%Convert.type.1)] // CHECK:STDOUT: %Convert: @ImplicitAs.%Convert.type (%Convert.type.1) = struct_value () [symbolic = %Convert (constants.%Convert.1)] -// CHECK:STDOUT: %.2: type = assoc_entity_type @ImplicitAs.%.1 (%.4), @ImplicitAs.%Convert.type (%Convert.type.1) [symbolic = %.2 (constants.%.5)] -// CHECK:STDOUT: %.3: @ImplicitAs.%.2 (%.5) = assoc_entity element0, imports.%import_ref.5 [symbolic = %.3 (constants.%.6)] +// CHECK:STDOUT: %.1: type = assoc_entity_type @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2), @ImplicitAs.%Convert.type (%Convert.type.1) [symbolic = %.1 (constants.%.3)] +// CHECK:STDOUT: %.2: @ImplicitAs.%.1 (%.3) = assoc_entity element0, imports.%import_ref.5 [symbolic = %.2 (constants.%.4)] // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: !members: @@ -109,10 +109,10 @@ interface I { // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @Convert(constants.%Dest: type, constants.%Self.2: @ImplicitAs.%.1 (%.4)) { +// CHECK:STDOUT: generic fn @Convert(constants.%Dest: type, constants.%Self.2: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2)) { // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic = %Dest (constants.%Dest)] -// CHECK:STDOUT: %.1: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic = %.1 (constants.%.4)] -// CHECK:STDOUT: %Self: %.4 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.3)] +// CHECK:STDOUT: %ImplicitAs.type: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.2)] +// CHECK:STDOUT: %Self: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.3)] // CHECK:STDOUT: // CHECK:STDOUT: fn[%self: @Convert.%Self (%Self.3)]() -> @Convert.%Dest (%Dest); // CHECK:STDOUT: } @@ -131,7 +131,7 @@ interface I { // CHECK:STDOUT: // CHECK:STDOUT: specific @Convert(constants.%Dest, constants.%Self.2) { // CHECK:STDOUT: %Dest => constants.%Dest -// CHECK:STDOUT: %.1 => constants.%.4 +// CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.2 // CHECK:STDOUT: %Self => constants.%Self.2 // CHECK:STDOUT: } // CHECK:STDOUT: @@ -139,11 +139,11 @@ interface I { // CHECK:STDOUT: %Dest => type // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.1 => constants.%.7 +// CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.3 // CHECK:STDOUT: %Self => constants.%Self.3 // CHECK:STDOUT: %Convert.type => constants.%Convert.type.2 // CHECK:STDOUT: %Convert => constants.%Convert.2 -// CHECK:STDOUT: %.2 => constants.%.8 -// CHECK:STDOUT: %.3 => constants.%.9 +// CHECK:STDOUT: %.1 => constants.%.5 +// CHECK:STDOUT: %.2 => constants.%.6 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/interface/fail_todo_assoc_const_default.carbon b/toolchain/check/testdata/interface/fail_todo_assoc_const_default.carbon index b23de0b865c25..3fb8e721592fc 100644 --- a/toolchain/check/testdata/interface/fail_todo_assoc_const_default.carbon +++ b/toolchain/check/testdata/interface/fail_todo_assoc_const_default.carbon @@ -23,18 +23,18 @@ interface I { // CHECK:STDOUT: --- fail_todo_assoc_const_default.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: type = interface_type @I [template] -// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self, 0 [symbolic] +// CHECK:STDOUT: %I.type: type = interface_type @I [template] +// CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] -// CHECK:STDOUT: %.2: type = tuple_type () [template] +// CHECK:STDOUT: %.1: type = tuple_type () [template] // CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] -// CHECK:STDOUT: %.3: type = tuple_type (type, type) [template] -// CHECK:STDOUT: %.4: type = tuple_type (i32, i32) [template] -// CHECK:STDOUT: %.5: type = assoc_entity_type %.1, type [template] -// CHECK:STDOUT: %.6: %.5 = assoc_entity element0, @I.%T [template] -// CHECK:STDOUT: %.7: i32 = int_literal 42 [template] -// CHECK:STDOUT: %.8: type = assoc_entity_type %.1, i32 [template] -// CHECK:STDOUT: %.9: %.8 = assoc_entity element1, @I.%N [template] +// CHECK:STDOUT: %.2: type = tuple_type (type, type) [template] +// CHECK:STDOUT: %.3: type = tuple_type (i32, i32) [template] +// CHECK:STDOUT: %.4: type = assoc_entity_type %I.type, type [template] +// CHECK:STDOUT: %.5: %.4 = assoc_entity element0, @I.%T [template] +// CHECK:STDOUT: %.6: i32 = int_literal 42 [template] +// CHECK:STDOUT: %.7: type = assoc_entity_type %I.type, i32 [template] +// CHECK:STDOUT: %.8: %.7 = assoc_entity element1, @I.%N [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -58,27 +58,27 @@ interface I { // CHECK:STDOUT: .I = %I.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %I.decl: type = interface_decl @I [template = constants.%.1] {} {} +// CHECK:STDOUT: %I.decl: type = interface_decl @I [template = constants.%I.type] {} {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @I { -// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self, 0 [symbolic = constants.%Self] +// CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self] // CHECK:STDOUT: %int.make_type_32.loc16_27: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %int.make_type_32.loc16_32: init type = call constants.%Int32() [template = i32] -// CHECK:STDOUT: %.loc16_35: %.3 = tuple_literal (%int.make_type_32.loc16_27, %int.make_type_32.loc16_32) +// CHECK:STDOUT: %.loc16_35: %.2 = tuple_literal (%int.make_type_32.loc16_27, %int.make_type_32.loc16_32) // CHECK:STDOUT: %.loc16_36.1: type = value_of_initializer %int.make_type_32.loc16_27 [template = i32] // CHECK:STDOUT: %.loc16_36.2: type = converted %int.make_type_32.loc16_27, %.loc16_36.1 [template = i32] // CHECK:STDOUT: %.loc16_36.3: type = value_of_initializer %int.make_type_32.loc16_32 [template = i32] // CHECK:STDOUT: %.loc16_36.4: type = converted %int.make_type_32.loc16_32, %.loc16_36.3 [template = i32] -// CHECK:STDOUT: %.loc16_36.5: type = converted %.loc16_35, constants.%.4 [template = constants.%.4] +// CHECK:STDOUT: %.loc16_36.5: type = converted %.loc16_35, constants.%.3 [template = constants.%.3] // CHECK:STDOUT: %T: type = assoc_const_decl T [template] -// CHECK:STDOUT: %.loc16_36.6: %.5 = assoc_entity element0, %T [template = constants.%.6] +// CHECK:STDOUT: %.loc16_36.6: %.4 = assoc_entity element0, %T [template = constants.%.5] // CHECK:STDOUT: %int.make_type_32.loc20: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc20_19.1: type = value_of_initializer %int.make_type_32.loc20 [template = i32] // CHECK:STDOUT: %.loc20_19.2: type = converted %int.make_type_32.loc20, %.loc20_19.1 [template = i32] -// CHECK:STDOUT: %.loc20_25: i32 = int_literal 42 [template = constants.%.7] +// CHECK:STDOUT: %.loc20_25: i32 = int_literal 42 [template = constants.%.6] // CHECK:STDOUT: %N: i32 = assoc_const_decl N [template] -// CHECK:STDOUT: %.loc20_27: %.8 = assoc_entity element1, %N [template = constants.%.9] +// CHECK:STDOUT: %.loc20_27: %.7 = assoc_entity element1, %N [template = constants.%.8] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self diff --git a/toolchain/check/testdata/interface/fail_todo_define_default_fn_inline.carbon b/toolchain/check/testdata/interface/fail_todo_define_default_fn_inline.carbon index eb68a84548e88..1d7fb9c535b0c 100644 --- a/toolchain/check/testdata/interface/fail_todo_define_default_fn_inline.carbon +++ b/toolchain/check/testdata/interface/fail_todo_define_default_fn_inline.carbon @@ -24,19 +24,19 @@ interface Interface { // CHECK:STDOUT: --- fail_todo_define_default_fn_inline.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: type = interface_type @Interface [template] -// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self, 0 [symbolic] +// CHECK:STDOUT: %Interface.type: type = interface_type @Interface [template] +// CHECK:STDOUT: %Self: %Interface.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %.2: type = tuple_type () [template] +// CHECK:STDOUT: %.1: type = tuple_type () [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.3: type = assoc_entity_type %.1, %F.type [template] -// CHECK:STDOUT: %.4: %.3 = assoc_entity element0, @Interface.%F.decl [template] +// CHECK:STDOUT: %.2: type = assoc_entity_type %Interface.type, %F.type [template] +// CHECK:STDOUT: %.3: %.2 = assoc_entity element0, @Interface.%F.decl [template] // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %G: %G.type = struct_value () [template] -// CHECK:STDOUT: %.5: type = assoc_entity_type %.1, %G.type [template] -// CHECK:STDOUT: %.6: %.5 = assoc_entity element1, @Interface.%G.decl [template] +// CHECK:STDOUT: %.4: type = assoc_entity_type %Interface.type, %G.type [template] +// CHECK:STDOUT: %.5: %.4 = assoc_entity element1, @Interface.%G.decl [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -60,13 +60,13 @@ interface Interface { // CHECK:STDOUT: .Interface = %Interface.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %Interface.decl: type = interface_decl @Interface [template = constants.%.1] {} {} +// CHECK:STDOUT: %Interface.decl: type = interface_decl @Interface [template = constants.%Interface.type] {} {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @Interface { -// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self, 0 [symbolic = constants.%Self] +// CHECK:STDOUT: %Self: %Interface.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self] // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] {} {} -// CHECK:STDOUT: %.loc16: %.3 = assoc_entity element0, %F.decl [template = constants.%.4] +// CHECK:STDOUT: %.loc16: %.2 = assoc_entity element0, %F.decl [template = constants.%.3] // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] { // CHECK:STDOUT: %a.patt: i32 = binding_pattern a // CHECK:STDOUT: %b.patt: i32 = binding_pattern b @@ -86,7 +86,7 @@ interface Interface { // CHECK:STDOUT: %.loc21_35.2: type = converted %int.make_type_32.loc21_35, %.loc21_35.1 [template = i32] // CHECK:STDOUT: %return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc21: %.5 = assoc_entity element1, %G.decl [template = constants.%.6] +// CHECK:STDOUT: %.loc21: %.4 = assoc_entity element1, %G.decl [template = constants.%.5] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -95,7 +95,7 @@ interface Interface { // CHECK:STDOUT: witness = (%F.decl, %G.decl) // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @F(@Interface.%Self: %.1) { +// CHECK:STDOUT: generic fn @F(@Interface.%Self: %Interface.type) { // CHECK:STDOUT: !definition: // CHECK:STDOUT: // CHECK:STDOUT: fn() { @@ -106,7 +106,7 @@ interface Interface { // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32"; // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @G(@Interface.%Self: %.1) { +// CHECK:STDOUT: generic fn @G(@Interface.%Self: %Interface.type) { // CHECK:STDOUT: // CHECK:STDOUT: fn(%a: i32, %b: i32) -> i32 = "int.sadd"; // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/interface/fail_todo_define_default_fn_out_of_line.carbon b/toolchain/check/testdata/interface/fail_todo_define_default_fn_out_of_line.carbon index e0d3fb3aaa3e3..6b4e66fd0d099 100644 --- a/toolchain/check/testdata/interface/fail_todo_define_default_fn_out_of_line.carbon +++ b/toolchain/check/testdata/interface/fail_todo_define_default_fn_out_of_line.carbon @@ -66,23 +66,23 @@ fn Interface.C.F[self: Self](U:! type, u: U) -> U { return u; } // CHECK:STDOUT: --- fail_todo_define_default_fn_out_of_line.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: type = interface_type @Interface [template] -// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self, 0 [symbolic] +// CHECK:STDOUT: %Interface.type: type = interface_type @Interface [template] +// CHECK:STDOUT: %Self: %Interface.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %.2: type = tuple_type () [template] +// CHECK:STDOUT: %.1: type = tuple_type () [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.3: type = assoc_entity_type %.1, %F.type [template] -// CHECK:STDOUT: %.4: %.3 = assoc_entity element0, @Interface.%F.decl [template] +// CHECK:STDOUT: %.2: type = assoc_entity_type %Interface.type, %F.type [template] +// CHECK:STDOUT: %.3: %.2 = assoc_entity element0, @Interface.%F.decl [template] // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %G: %G.type = struct_value () [template] -// CHECK:STDOUT: %.5: type = assoc_entity_type %.1, %G.type [template] -// CHECK:STDOUT: %.6: %.5 = assoc_entity element1, @Interface.%G.decl [template] +// CHECK:STDOUT: %.4: type = assoc_entity_type %Interface.type, %G.type [template] +// CHECK:STDOUT: %.5: %.4 = assoc_entity element1, @Interface.%G.decl [template] // CHECK:STDOUT: %.type.1: type = fn_type @.1 [template] -// CHECK:STDOUT: %.7: %.type.1 = struct_value () [template] +// CHECK:STDOUT: %.6: %.type.1 = struct_value () [template] // CHECK:STDOUT: %.type.2: type = fn_type @.2 [template] -// CHECK:STDOUT: %.8: %.type.2 = struct_value () [template] +// CHECK:STDOUT: %.7: %.type.2 = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -106,9 +106,9 @@ fn Interface.C.F[self: Self](U:! type, u: U) -> U { return u; } // CHECK:STDOUT: .Interface = %Interface.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %Interface.decl: type = interface_decl @Interface [template = constants.%.1] {} {} -// CHECK:STDOUT: %.decl.loc23: %.type.1 = fn_decl @.1 [template = constants.%.7] {} {} -// CHECK:STDOUT: %.decl.loc31: %.type.2 = fn_decl @.2 [template = constants.%.8] { +// CHECK:STDOUT: %Interface.decl: type = interface_decl @Interface [template = constants.%Interface.type] {} {} +// CHECK:STDOUT: %.decl.loc23: %.type.1 = fn_decl @.1 [template = constants.%.6] {} {} +// CHECK:STDOUT: %.decl.loc31: %.type.2 = fn_decl @.2 [template = constants.%.7] { // CHECK:STDOUT: %a.patt: i32 = binding_pattern a // CHECK:STDOUT: %b.patt: i32 = binding_pattern b // CHECK:STDOUT: } { @@ -130,9 +130,9 @@ fn Interface.C.F[self: Self](U:! type, u: U) -> U { return u; } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @Interface { -// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self, 0 [symbolic = constants.%Self] +// CHECK:STDOUT: %Self: %Interface.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self] // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] {} {} -// CHECK:STDOUT: %.loc7: %.3 = assoc_entity element0, %F.decl [template = constants.%.4] +// CHECK:STDOUT: %.loc7: %.2 = assoc_entity element0, %F.decl [template = constants.%.3] // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] { // CHECK:STDOUT: %a.patt: i32 = binding_pattern a // CHECK:STDOUT: %b.patt: i32 = binding_pattern b @@ -152,7 +152,7 @@ fn Interface.C.F[self: Self](U:! type, u: U) -> U { return u; } // CHECK:STDOUT: %.loc13_35.2: type = converted %int.make_type_32.loc13_35, %.loc13_35.1 [template = i32] // CHECK:STDOUT: %return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc13: %.5 = assoc_entity element1, %G.decl [template = constants.%.6] +// CHECK:STDOUT: %.loc13: %.4 = assoc_entity element1, %G.decl [template = constants.%.5] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -161,19 +161,19 @@ fn Interface.C.F[self: Self](U:! type, u: U) -> U { return u; } // CHECK:STDOUT: witness = (%F.decl, %G.decl) // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @F(@Interface.%Self: %.1) { +// CHECK:STDOUT: generic fn @F(@Interface.%Self: %Interface.type) { // CHECK:STDOUT: // CHECK:STDOUT: fn(); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32"; // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @G(@Interface.%Self: %.1) { +// CHECK:STDOUT: generic fn @G(@Interface.%Self: %Interface.type) { // CHECK:STDOUT: // CHECK:STDOUT: fn(%a: i32, %b: i32) -> i32; // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @.1(@Interface.%Self: %.1) { +// CHECK:STDOUT: generic fn @.1(@Interface.%Self: %Interface.type) { // CHECK:STDOUT: !definition: // CHECK:STDOUT: // CHECK:STDOUT: fn() { @@ -182,7 +182,7 @@ fn Interface.C.F[self: Self](U:! type, u: U) -> U { return u; } // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @.2(@Interface.%Self: %.1) { +// CHECK:STDOUT: generic fn @.2(@Interface.%Self: %Interface.type) { // CHECK:STDOUT: // CHECK:STDOUT: fn(%a: i32, %b: i32) -> i32 = "int.sadd"; // CHECK:STDOUT: } @@ -198,17 +198,17 @@ fn Interface.C.F[self: Self](U:! type, u: U) -> U { return u; } // CHECK:STDOUT: --- dependent_return_type.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: type = interface_type @Interface [template] -// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self, 0 [symbolic] +// CHECK:STDOUT: %Interface.type: type = interface_type @Interface [template] +// CHECK:STDOUT: %Self: %Interface.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %C.1: type = class_type @C [template] // CHECK:STDOUT: %C.2: type = class_type @C, @C(%Self) [symbolic] // CHECK:STDOUT: %U: type = bind_symbolic_name U, 1 [symbolic] // CHECK:STDOUT: %F.type: type = fn_type @F, @C(%Self) [symbolic] -// CHECK:STDOUT: %.2: type = tuple_type () [template] +// CHECK:STDOUT: %.1: type = tuple_type () [template] // CHECK:STDOUT: %F: %F.type = struct_value () [symbolic] -// CHECK:STDOUT: %.3: type = struct_type {} [template] -// CHECK:STDOUT: %.4: = complete_type_witness %.3 [template] -// CHECK:STDOUT: %.5: type = ptr_type %.3 [template] +// CHECK:STDOUT: %.2: type = struct_type {} [template] +// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] +// CHECK:STDOUT: %.4: type = ptr_type %.2 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -230,7 +230,7 @@ fn Interface.C.F[self: Self](U:! type, u: U) -> U { return u; } // CHECK:STDOUT: .Interface = %Interface.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %Interface.decl: type = interface_decl @Interface [template = constants.%.1] {} {} +// CHECK:STDOUT: %Interface.decl: type = interface_decl @Interface [template = constants.%Interface.type] {} {} // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [symbolic = constants.%F] { // CHECK:STDOUT: %self.patt: %C.2 = binding_pattern self // CHECK:STDOUT: %U.patt: type = symbolic_binding_pattern U, 1 @@ -251,7 +251,7 @@ fn Interface.C.F[self: Self](U:! type, u: U) -> U { return u; } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @Interface { -// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self, 0 [symbolic = constants.%Self] +// CHECK:STDOUT: %Self: %Interface.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self] // CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C.1] {} {} // CHECK:STDOUT: // CHECK:STDOUT: !members: @@ -260,9 +260,9 @@ fn Interface.C.F[self: Self](U:! type, u: U) -> U { return u; } // CHECK:STDOUT: witness = () // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic class @C(@Interface.%Self: %.1) { +// CHECK:STDOUT: generic class @C(@Interface.%Self: %Interface.type) { // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self)] +// CHECK:STDOUT: %Self: %Interface.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self)] // CHECK:STDOUT: %F.type: type = fn_type @F, @C(%Self) [symbolic = %F.type (constants.%F.type)] // CHECK:STDOUT: %F: @C.%F.type (%F.type) = struct_value () [symbolic = %F (constants.%F)] // CHECK:STDOUT: @@ -284,7 +284,7 @@ fn Interface.C.F[self: Self](U:! type, u: U) -> U { return u; } // CHECK:STDOUT: %U.ref.loc14_41: type = name_ref U, %U.loc14 [symbolic = %U.1 (constants.%U)] // CHECK:STDOUT: %return.var.loc14: ref @F.%U.1 (%U) = var // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc15: = complete_type_witness %.3 [template = constants.%.4] +// CHECK:STDOUT: %.loc15: = complete_type_witness %.2 [template = constants.%.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C.2 @@ -292,8 +292,8 @@ fn Interface.C.F[self: Self](U:! type, u: U) -> U { return u; } // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @F(@Interface.%Self: %.1, %U.loc14: type) { -// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self)] +// CHECK:STDOUT: generic fn @F(@Interface.%Self: %Interface.type, %U.loc14: type) { +// CHECK:STDOUT: %Self: %Interface.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self)] // CHECK:STDOUT: %C: type = class_type @C, @C(%Self) [symbolic = %C (constants.%C.2)] // CHECK:STDOUT: %U.1: type = bind_symbolic_name U, 1 [symbolic = %U.1 (constants.%U)] // CHECK:STDOUT: diff --git a/toolchain/check/testdata/interface/no_prelude/as_type.carbon b/toolchain/check/testdata/interface/no_prelude/as_type.carbon index cf5b7c06e16e0..d8fb98b849bd6 100644 --- a/toolchain/check/testdata/interface/no_prelude/as_type.carbon +++ b/toolchain/check/testdata/interface/no_prelude/as_type.carbon @@ -15,10 +15,10 @@ fn F(e: Empty) {} // CHECK:STDOUT: --- as_type.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: type = interface_type @Empty [template] -// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self, 0 [symbolic] +// CHECK:STDOUT: %Empty.type: type = interface_type @Empty [template] +// CHECK:STDOUT: %Self: %Empty.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %.2: type = tuple_type () [template] +// CHECK:STDOUT: %.1: type = tuple_type () [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -27,25 +27,25 @@ fn F(e: Empty) {} // CHECK:STDOUT: .Empty = %Empty.decl // CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %Empty.decl: type = interface_decl @Empty [template = constants.%.1] {} {} +// CHECK:STDOUT: %Empty.decl: type = interface_decl @Empty [template = constants.%Empty.type] {} {} // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { -// CHECK:STDOUT: %e.patt: %.1 = binding_pattern e +// CHECK:STDOUT: %e.patt: %Empty.type = binding_pattern e // CHECK:STDOUT: } { -// CHECK:STDOUT: %Empty.ref: type = name_ref Empty, file.%Empty.decl [template = constants.%.1] -// CHECK:STDOUT: %e.param: %.1 = param e, runtime_param0 -// CHECK:STDOUT: %e: %.1 = bind_name e, %e.param +// CHECK:STDOUT: %Empty.ref: type = name_ref Empty, file.%Empty.decl [template = constants.%Empty.type] +// CHECK:STDOUT: %e.param: %Empty.type = param e, runtime_param0 +// CHECK:STDOUT: %e: %Empty.type = bind_name e, %e.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @Empty { -// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self, 0 [symbolic = constants.%Self] +// CHECK:STDOUT: %Self: %Empty.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self // CHECK:STDOUT: witness = () // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @F(%e: %.1) { +// CHECK:STDOUT: fn @F(%e: %Empty.type) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/interface/no_prelude/as_type_of_type.carbon b/toolchain/check/testdata/interface/no_prelude/as_type_of_type.carbon index 3ef19806fd60a..a07f56a28b32a 100644 --- a/toolchain/check/testdata/interface/no_prelude/as_type_of_type.carbon +++ b/toolchain/check/testdata/interface/no_prelude/as_type_of_type.carbon @@ -17,11 +17,11 @@ fn F(T:! Empty) { // CHECK:STDOUT: --- as_type_of_type.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: type = interface_type @Empty [template] -// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self, 0 [symbolic] -// CHECK:STDOUT: %T: %.1 = bind_symbolic_name T, 0 [symbolic] +// CHECK:STDOUT: %Empty.type: type = interface_type @Empty [template] +// CHECK:STDOUT: %Self: %Empty.type = bind_symbolic_name Self, 0 [symbolic] +// CHECK:STDOUT: %T: %Empty.type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %.2: type = tuple_type () [template] +// CHECK:STDOUT: %.1: type = tuple_type () [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -30,32 +30,32 @@ fn F(T:! Empty) { // CHECK:STDOUT: .Empty = %Empty.decl // CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %Empty.decl: type = interface_decl @Empty [template = constants.%.1] {} {} +// CHECK:STDOUT: %Empty.decl: type = interface_decl @Empty [template = constants.%Empty.type] {} {} // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { -// CHECK:STDOUT: %T.patt: %.1 = symbolic_binding_pattern T, 0 +// CHECK:STDOUT: %T.patt: %Empty.type = symbolic_binding_pattern T, 0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Empty.ref: type = name_ref Empty, file.%Empty.decl [template = constants.%.1] -// CHECK:STDOUT: %T.param: %.1 = param T, runtime_param -// CHECK:STDOUT: %T.loc13: %.1 = bind_symbolic_name T, 0, %T.param [symbolic = %T.1 (constants.%T)] +// CHECK:STDOUT: %Empty.ref: type = name_ref Empty, file.%Empty.decl [template = constants.%Empty.type] +// CHECK:STDOUT: %T.param: %Empty.type = param T, runtime_param +// CHECK:STDOUT: %T.loc13: %Empty.type = bind_symbolic_name T, 0, %T.param [symbolic = %T.1 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @Empty { -// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self, 0 [symbolic = constants.%Self] +// CHECK:STDOUT: %Self: %Empty.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self // CHECK:STDOUT: witness = () // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @F(%T.loc13: %.1) { -// CHECK:STDOUT: %T.1: %.1 = bind_symbolic_name T, 0 [symbolic = %T.1 (constants.%T)] +// CHECK:STDOUT: generic fn @F(%T.loc13: %Empty.type) { +// CHECK:STDOUT: %T.1: %Empty.type = bind_symbolic_name T, 0 [symbolic = %T.1 (constants.%T)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: -// CHECK:STDOUT: fn(%T.loc13: %.1) { +// CHECK:STDOUT: fn(%T.loc13: %Empty.type) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %T.ref: %.1 = name_ref T, %T.loc13 [symbolic = %T.1 (constants.%T)] +// CHECK:STDOUT: %T.ref: %Empty.type = name_ref T, %T.loc13 [symbolic = %T.1 (constants.%T)] // CHECK:STDOUT: %.loc14_10.1: type = facet_type_access %T.ref [symbolic = %T.1 (constants.%T)] // CHECK:STDOUT: %.loc14_10.2: type = converted %T.ref, %.loc14_10.1 [symbolic = %T.1 (constants.%T)] // CHECK:STDOUT: %x.var: ref @F.%T.1 (%T) = var x diff --git a/toolchain/check/testdata/interface/no_prelude/assoc_const_in_generic.carbon b/toolchain/check/testdata/interface/no_prelude/assoc_const_in_generic.carbon index efef1724b453d..e4f1159707b36 100644 --- a/toolchain/check/testdata/interface/no_prelude/assoc_const_in_generic.carbon +++ b/toolchain/check/testdata/interface/no_prelude/assoc_const_in_generic.carbon @@ -27,21 +27,21 @@ fn H() { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] -// CHECK:STDOUT: %I.type: type = generic_interface_type @I [template] +// CHECK:STDOUT: %I.type.1: type = generic_interface_type @I [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %I: %I.type = struct_value () [template] -// CHECK:STDOUT: %.2: type = interface_type @I, @I(%T) [symbolic] -// CHECK:STDOUT: %Self: %.2 = bind_symbolic_name Self, 1 [symbolic] +// CHECK:STDOUT: %I: %I.type.1 = struct_value () [template] +// CHECK:STDOUT: %I.type.2: type = interface_type @I, @I(%T) [symbolic] +// CHECK:STDOUT: %Self: %I.type.2 = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: %U: type = bind_symbolic_name U, 2 [symbolic] // CHECK:STDOUT: %F.type: type = fn_type @F, @I(%T) [symbolic] // CHECK:STDOUT: %F: %F.type = struct_value () [symbolic] -// CHECK:STDOUT: %.3: type = assoc_entity_type %.2, %F.type [symbolic] -// CHECK:STDOUT: %.4: %.3 = assoc_entity element0, @I.%F.decl [symbolic] +// CHECK:STDOUT: %.2: type = assoc_entity_type %I.type.2, %F.type [symbolic] +// CHECK:STDOUT: %.3: %.2 = assoc_entity element0, @I.%F.decl [symbolic] // CHECK:STDOUT: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %G: %G.type = struct_value () [template] // CHECK:STDOUT: %H.type: type = fn_type @H [template] // CHECK:STDOUT: %H: %H.type = struct_value () [template] -// CHECK:STDOUT: %.5: type = struct_type {} [template] +// CHECK:STDOUT: %.4: type = struct_type {} [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -50,7 +50,7 @@ fn H() { // CHECK:STDOUT: .G = %G.decl // CHECK:STDOUT: .H = %H.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %I.decl: %I.type = interface_decl @I [template = constants.%I] { +// CHECK:STDOUT: %I.decl: %I.type.1 = interface_decl @I [template = constants.%I] { // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 // CHECK:STDOUT: } { // CHECK:STDOUT: %T.param: type = param T, runtime_param @@ -69,15 +69,15 @@ fn H() { // CHECK:STDOUT: %T.1: type = bind_symbolic_name T, 0 [symbolic = %T.1 (constants.%T)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.1: type = interface_type @I, @I(%T.1) [symbolic = %.1 (constants.%.2)] -// CHECK:STDOUT: %Self.2: %.2 = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self)] +// CHECK:STDOUT: %I.type: type = interface_type @I, @I(%T.1) [symbolic = %I.type (constants.%I.type.2)] +// CHECK:STDOUT: %Self.2: %I.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self)] // CHECK:STDOUT: %F.type: type = fn_type @F, @I(%T.1) [symbolic = %F.type (constants.%F.type)] // CHECK:STDOUT: %F: @I.%F.type (%F.type) = struct_value () [symbolic = %F (constants.%F)] -// CHECK:STDOUT: %.2: type = assoc_entity_type @I.%.1 (%.2), @I.%F.type (%F.type) [symbolic = %.2 (constants.%.3)] -// CHECK:STDOUT: %.3: @I.%.2 (%.3) = assoc_entity element0, %F.decl [symbolic = %.3 (constants.%.4)] +// CHECK:STDOUT: %.1: type = assoc_entity_type @I.%I.type (%I.type.2), @I.%F.type (%F.type) [symbolic = %.1 (constants.%.2)] +// CHECK:STDOUT: %.2: @I.%.1 (%.2) = assoc_entity element0, %F.decl [symbolic = %.2 (constants.%.3)] // CHECK:STDOUT: // CHECK:STDOUT: interface { -// CHECK:STDOUT: %Self.1: @I.%.1 (%.2) = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self)] +// CHECK:STDOUT: %Self.1: @I.%I.type (%I.type.2) = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self)] // CHECK:STDOUT: %F.decl: @I.%F.type (%F.type) = fn_decl @F [symbolic = @I.%F (constants.%F)] { // CHECK:STDOUT: %U.patt: type = symbolic_binding_pattern U, 2 // CHECK:STDOUT: } { @@ -86,7 +86,7 @@ fn H() { // CHECK:STDOUT: %U.ref: type = name_ref U, %U.loc12 [symbolic = %U.1 (constants.%U)] // CHECK:STDOUT: %return: ref @F.%U.1 (%U) = var // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc12: @I.%.2 (%.3) = assoc_entity element0, %F.decl [symbolic = %.3 (constants.%.4)] +// CHECK:STDOUT: %.loc12: @I.%.1 (%.2) = assoc_entity element0, %F.decl [symbolic = %.2 (constants.%.3)] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self.1 @@ -95,7 +95,7 @@ fn H() { // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @F(@I.%T.loc11: type, @I.%Self.1: @I.%.1 (%.2), %U.loc12: type) { +// CHECK:STDOUT: generic fn @F(@I.%T.loc11: type, @I.%Self.1: @I.%I.type (%I.type.2), %U.loc12: type) { // CHECK:STDOUT: %U.1: type = bind_symbolic_name U, 2 [symbolic = %U.1 (constants.%U)] // CHECK:STDOUT: // CHECK:STDOUT: fn(%U.loc12: type) -> @F.%U.1 (%U); @@ -105,18 +105,18 @@ fn H() { // CHECK:STDOUT: %T.1: type = bind_symbolic_name T, 0 [symbolic = %T.1 (constants.%T)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.1: type = interface_type @I, @I(%T.1) [symbolic = %.1 (constants.%.2)] +// CHECK:STDOUT: %I.type.1: type = interface_type @I, @I(%T.1) [symbolic = %I.type.1 (constants.%I.type.2)] // CHECK:STDOUT: %F.type: type = fn_type @F, @I(%T.1) [symbolic = %F.type (constants.%F.type)] -// CHECK:STDOUT: %.2: type = assoc_entity_type @G.%.1 (%.2), @G.%F.type (%F.type) [symbolic = %.2 (constants.%.3)] -// CHECK:STDOUT: %.3: @G.%.2 (%.3) = assoc_entity element0, @I.%F.decl [symbolic = %.3 (constants.%.4)] +// CHECK:STDOUT: %.1: type = assoc_entity_type @G.%I.type.1 (%I.type.2), @G.%F.type (%F.type) [symbolic = %.1 (constants.%.2)] +// CHECK:STDOUT: %.2: @G.%.1 (%.2) = assoc_entity element0, @I.%F.decl [symbolic = %.2 (constants.%.3)] // CHECK:STDOUT: // CHECK:STDOUT: fn(%T.loc15: type) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %I.ref: %I.type = name_ref I, file.%I.decl [template = constants.%I] +// CHECK:STDOUT: %I.ref: %I.type.1 = name_ref I, file.%I.decl [template = constants.%I] // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc15 [symbolic = %T.1 (constants.%T)] -// CHECK:STDOUT: %.loc19_4: type = interface_type @I, @I(constants.%T) [symbolic = %.1 (constants.%.2)] -// CHECK:STDOUT: %.loc19_7: @G.%.2 (%.3) = specific_constant @I.%.loc12, @I(constants.%T) [symbolic = %.3 (constants.%.4)] -// CHECK:STDOUT: %F.ref: @G.%.2 (%.3) = name_ref F, %.loc19_7 [symbolic = %.3 (constants.%.4)] +// CHECK:STDOUT: %I.type.loc19: type = interface_type @I, @I(constants.%T) [symbolic = %I.type.1 (constants.%I.type.2)] +// CHECK:STDOUT: %.loc19: @G.%.1 (%.2) = specific_constant @I.%.loc12, @I(constants.%T) [symbolic = %.2 (constants.%.3)] +// CHECK:STDOUT: %F.ref: @G.%.1 (%.2) = name_ref F, %.loc19 [symbolic = %.2 (constants.%.3)] // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -124,8 +124,8 @@ fn H() { // CHECK:STDOUT: fn @H() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %G.ref: %G.type = name_ref G, file.%G.decl [template = constants.%G] -// CHECK:STDOUT: %.loc23_6: %.5 = struct_literal () -// CHECK:STDOUT: %.loc23_4: type = converted %.loc23_6, constants.%.5 [template = constants.%.5] +// CHECK:STDOUT: %.loc23_6: %.4 = struct_literal () +// CHECK:STDOUT: %.loc23_4: type = converted %.loc23_6, constants.%.4 [template = constants.%.4] // CHECK:STDOUT: %G.call: init %.1 = call %G.ref() // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -134,12 +134,12 @@ fn H() { // CHECK:STDOUT: %T.1 => constants.%T // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.1 => constants.%.2 +// CHECK:STDOUT: %I.type => constants.%I.type.2 // CHECK:STDOUT: %Self.2 => constants.%Self // CHECK:STDOUT: %F.type => constants.%F.type // CHECK:STDOUT: %F => constants.%F +// CHECK:STDOUT: %.1 => constants.%.2 // CHECK:STDOUT: %.2 => constants.%.3 -// CHECK:STDOUT: %.3 => constants.%.4 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F(constants.%T, constants.%Self, constants.%U) { @@ -158,7 +158,7 @@ fn H() { // CHECK:STDOUT: %T.1 => constants.%T // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @G(constants.%.5) { -// CHECK:STDOUT: %T.1 => constants.%.5 +// CHECK:STDOUT: specific @G(constants.%.4) { +// CHECK:STDOUT: %T.1 => constants.%.4 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/interface/no_prelude/basic.carbon b/toolchain/check/testdata/interface/no_prelude/basic.carbon index 2bea9754f3cb2..03a9fab085331 100644 --- a/toolchain/check/testdata/interface/no_prelude/basic.carbon +++ b/toolchain/check/testdata/interface/no_prelude/basic.carbon @@ -20,15 +20,15 @@ interface ForwardDeclared { // CHECK:STDOUT: --- basic.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: type = interface_type @Empty [template] -// CHECK:STDOUT: %Self.1: %.1 = bind_symbolic_name Self, 0 [symbolic] -// CHECK:STDOUT: %.2: type = interface_type @ForwardDeclared [template] -// CHECK:STDOUT: %Self.2: %.2 = bind_symbolic_name Self, 0 [symbolic] +// CHECK:STDOUT: %Empty.type: type = interface_type @Empty [template] +// CHECK:STDOUT: %Self.1: %Empty.type = bind_symbolic_name Self, 0 [symbolic] +// CHECK:STDOUT: %ForwardDeclared.type: type = interface_type @ForwardDeclared [template] +// CHECK:STDOUT: %Self.2: %ForwardDeclared.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %.3: type = tuple_type () [template] +// CHECK:STDOUT: %.1: type = tuple_type () [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.4: type = assoc_entity_type %.2, %F.type [template] -// CHECK:STDOUT: %.5: %.4 = assoc_entity element0, @ForwardDeclared.%F.decl [template] +// CHECK:STDOUT: %.2: type = assoc_entity_type %ForwardDeclared.type, %F.type [template] +// CHECK:STDOUT: %.3: %.2 = assoc_entity element0, @ForwardDeclared.%F.decl [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -36,13 +36,13 @@ interface ForwardDeclared { // CHECK:STDOUT: .Empty = %Empty.decl // CHECK:STDOUT: .ForwardDeclared = %ForwardDeclared.decl.loc14 // CHECK:STDOUT: } -// CHECK:STDOUT: %Empty.decl: type = interface_decl @Empty [template = constants.%.1] {} {} -// CHECK:STDOUT: %ForwardDeclared.decl.loc14: type = interface_decl @ForwardDeclared [template = constants.%.2] {} {} -// CHECK:STDOUT: %ForwardDeclared.decl.loc16: type = interface_decl @ForwardDeclared [template = constants.%.2] {} {} +// CHECK:STDOUT: %Empty.decl: type = interface_decl @Empty [template = constants.%Empty.type] {} {} +// CHECK:STDOUT: %ForwardDeclared.decl.loc14: type = interface_decl @ForwardDeclared [template = constants.%ForwardDeclared.type] {} {} +// CHECK:STDOUT: %ForwardDeclared.decl.loc16: type = interface_decl @ForwardDeclared [template = constants.%ForwardDeclared.type] {} {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @Empty { -// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self, 0 [symbolic = constants.%Self.1] +// CHECK:STDOUT: %Self: %Empty.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self.1] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -50,9 +50,9 @@ interface ForwardDeclared { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @ForwardDeclared { -// CHECK:STDOUT: %Self: %.2 = bind_symbolic_name Self, 0 [symbolic = constants.%Self.2] +// CHECK:STDOUT: %Self: %ForwardDeclared.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self.2] // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] {} {} -// CHECK:STDOUT: %.loc17: %.4 = assoc_entity element0, %F.decl [template = constants.%.5] +// CHECK:STDOUT: %.loc17: %.2 = assoc_entity element0, %F.decl [template = constants.%.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -60,7 +60,7 @@ interface ForwardDeclared { // CHECK:STDOUT: witness = (%F.decl) // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @F(@ForwardDeclared.%Self: %.2) { +// CHECK:STDOUT: generic fn @F(@ForwardDeclared.%Self: %ForwardDeclared.type) { // CHECK:STDOUT: // CHECK:STDOUT: fn(); // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/interface/no_prelude/default_fn.carbon b/toolchain/check/testdata/interface/no_prelude/default_fn.carbon index 957da670d8d3b..8b95d1b7ea1b7 100644 --- a/toolchain/check/testdata/interface/no_prelude/default_fn.carbon +++ b/toolchain/check/testdata/interface/no_prelude/default_fn.carbon @@ -27,19 +27,19 @@ class C { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.1: type = interface_type @I [template] -// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self, 0 [symbolic] +// CHECK:STDOUT: %I.type: type = interface_type @I [template] +// CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %F.type.1: type = fn_type @F.1 [template] -// CHECK:STDOUT: %.2: type = tuple_type () [template] +// CHECK:STDOUT: %.1: type = tuple_type () [template] // CHECK:STDOUT: %F.1: %F.type.1 = struct_value () [template] -// CHECK:STDOUT: %.3: type = assoc_entity_type %.1, %F.type.1 [template] -// CHECK:STDOUT: %.4: %.3 = assoc_entity element0, @I.%F.decl [template] +// CHECK:STDOUT: %.2: type = assoc_entity_type %I.type, %F.type.1 [template] +// CHECK:STDOUT: %.3: %.2 = assoc_entity element0, @I.%F.decl [template] // CHECK:STDOUT: %F.type.2: type = fn_type @F.2 [template] // CHECK:STDOUT: %F.2: %F.type.2 = struct_value () [template] -// CHECK:STDOUT: %.5: = interface_witness (%F.2) [template] -// CHECK:STDOUT: %.6: type = struct_type {} [template] -// CHECK:STDOUT: %.7: = complete_type_witness %.6 [template] -// CHECK:STDOUT: %.8: type = ptr_type %.6 [template] +// CHECK:STDOUT: %.4: = interface_witness (%F.2) [template] +// CHECK:STDOUT: %.5: type = struct_type {} [template] +// CHECK:STDOUT: %.6: = complete_type_witness %.5 [template] +// CHECK:STDOUT: %.7: type = ptr_type %.5 [template] // CHECK:STDOUT: %struct: %C = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -51,9 +51,9 @@ class C { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @I { -// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self, 0 [symbolic = constants.%Self] +// CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self] // CHECK:STDOUT: %F.decl: %F.type.1 = fn_decl @F.1 [template = constants.%F.1] {} {} -// CHECK:STDOUT: %.loc14: %.3 = assoc_entity element0, %F.decl [template = constants.%.4] +// CHECK:STDOUT: %.loc14: %.2 = assoc_entity element0, %F.decl [template = constants.%.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -63,7 +63,7 @@ class C { // CHECK:STDOUT: // CHECK:STDOUT: impl @impl: %C.ref as %I.ref { // CHECK:STDOUT: %F.decl: %F.type.2 = fn_decl @F.2 [template = constants.%F.2] {} {} -// CHECK:STDOUT: %.loc21: = interface_witness (%F.decl) [template = constants.%.5] +// CHECK:STDOUT: %.loc21: = interface_witness (%F.decl) [template = constants.%.4] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %F.decl @@ -71,19 +71,19 @@ class C { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { -// CHECK:STDOUT: %I.decl: type = interface_decl @I [template = constants.%.1] {} {} +// CHECK:STDOUT: %I.decl: type = interface_decl @I [template = constants.%I.type] {} {} // CHECK:STDOUT: impl_decl @impl [template] {} { // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %I.ref: type = name_ref I, @C.%I.decl [template = constants.%.1] +// CHECK:STDOUT: %I.ref: type = name_ref I, @C.%I.decl [template = constants.%I.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc24: = complete_type_witness %.6 [template = constants.%.7] +// CHECK:STDOUT: %.loc24: = complete_type_witness %.5 [template = constants.%.6] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C // CHECK:STDOUT: .I = %I.decl // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @F.1(@I.%Self: %.1) { +// CHECK:STDOUT: generic fn @F.1(@I.%Self: %I.type) { // CHECK:STDOUT: !definition: // CHECK:STDOUT: // CHECK:STDOUT: fn() { @@ -91,15 +91,15 @@ class C { // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %c.var: ref %C = var c // CHECK:STDOUT: %c: ref %C = bind_name c, %c.var -// CHECK:STDOUT: %.loc16_19.1: %.6 = struct_literal () +// CHECK:STDOUT: %.loc16_19.1: %.5 = struct_literal () // CHECK:STDOUT: %.loc16_19.2: init %C = class_init (), %c.var [template = constants.%struct] // CHECK:STDOUT: %.loc16_20: init %C = converted %.loc16_19.1, %.loc16_19.2 [template = constants.%struct] // CHECK:STDOUT: assign %c.var, %.loc16_20 // CHECK:STDOUT: %c.ref: ref %C = name_ref c, %c -// CHECK:STDOUT: %I.ref: type = name_ref I, @C.%I.decl [template = constants.%.1] -// CHECK:STDOUT: %F.ref: %.3 = name_ref F, @I.%.loc14 [template = constants.%.4] -// CHECK:STDOUT: %.loc17: %F.type.1 = interface_witness_access constants.%.5, element0 [template = constants.%F.2] -// CHECK:STDOUT: %F.call: init %.2 = call %.loc17() +// CHECK:STDOUT: %I.ref: type = name_ref I, @C.%I.decl [template = constants.%I.type] +// CHECK:STDOUT: %F.ref: %.2 = name_ref F, @I.%.loc14 [template = constants.%.3] +// CHECK:STDOUT: %.loc17: %F.type.1 = interface_witness_access constants.%.4, element0 [template = constants.%F.2] +// CHECK:STDOUT: %F.call: init %.1 = call %.loc17() // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/interface/no_prelude/export_name.carbon b/toolchain/check/testdata/interface/no_prelude/export_name.carbon index 74d68b3119f42..f8a652453621d 100644 --- a/toolchain/check/testdata/interface/no_prelude/export_name.carbon +++ b/toolchain/check/testdata/interface/no_prelude/export_name.carbon @@ -41,19 +41,19 @@ fn UseEmpty(i: I) {} // CHECK:STDOUT: --- base.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: type = interface_type @I [template] -// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self, 0 [symbolic] +// CHECK:STDOUT: %I.type: type = interface_type @I [template] +// CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: package: = namespace [template] { // CHECK:STDOUT: .I = %I.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %I.decl: type = interface_decl @I [template = constants.%.1] {} {} +// CHECK:STDOUT: %I.decl: type = interface_decl @I [template = constants.%I.type] {} {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @I { -// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self, 0 [symbolic = constants.%Self] +// CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -63,12 +63,12 @@ fn UseEmpty(i: I) {} // CHECK:STDOUT: --- export.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: type = interface_type @I [template] -// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self, 0 [symbolic] +// CHECK:STDOUT: %I.type: type = interface_type @I [template] +// CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { -// CHECK:STDOUT: %import_ref.1: type = import_ref Main//base, inst+1, loaded [template = constants.%.1] +// CHECK:STDOUT: %import_ref.1: type = import_ref Main//base, inst+1, loaded [template = constants.%I.type] // CHECK:STDOUT: %import_ref.2 = import_ref Main//base, inst+3, unloaded // CHECK:STDOUT: } // CHECK:STDOUT: @@ -77,7 +77,7 @@ fn UseEmpty(i: I) {} // CHECK:STDOUT: .I = %I // CHECK:STDOUT: } // CHECK:STDOUT: %default.import = import -// CHECK:STDOUT: %I: type = export I, imports.%import_ref.1 [template = constants.%.1] +// CHECK:STDOUT: %I: type = export I, imports.%import_ref.1 [template = constants.%I.type] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @I { @@ -89,15 +89,15 @@ fn UseEmpty(i: I) {} // CHECK:STDOUT: --- use_export.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: type = interface_type @I [template] -// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self, 0 [symbolic] +// CHECK:STDOUT: %I.type: type = interface_type @I [template] +// CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %UseEmpty.type: type = fn_type @UseEmpty [template] -// CHECK:STDOUT: %.2: type = tuple_type () [template] +// CHECK:STDOUT: %.1: type = tuple_type () [template] // CHECK:STDOUT: %UseEmpty: %UseEmpty.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { -// CHECK:STDOUT: %import_ref.1: type = import_ref Main//export, inst+7, loaded [template = constants.%.1] +// CHECK:STDOUT: %import_ref.1: type = import_ref Main//export, inst+7, loaded [template = constants.%I.type] // CHECK:STDOUT: %import_ref.2 = import_ref Main//export, inst+6, unloaded // CHECK:STDOUT: } // CHECK:STDOUT: @@ -108,11 +108,11 @@ fn UseEmpty(i: I) {} // CHECK:STDOUT: } // CHECK:STDOUT: %default.import = import // CHECK:STDOUT: %UseEmpty.decl: %UseEmpty.type = fn_decl @UseEmpty [template = constants.%UseEmpty] { -// CHECK:STDOUT: %i.patt: %.1 = binding_pattern i +// CHECK:STDOUT: %i.patt: %I.type = binding_pattern i // CHECK:STDOUT: } { -// CHECK:STDOUT: %I.ref: type = name_ref I, imports.%import_ref.1 [template = constants.%.1] -// CHECK:STDOUT: %i.param: %.1 = param i, runtime_param0 -// CHECK:STDOUT: %i: %.1 = bind_name i, %i.param +// CHECK:STDOUT: %I.ref: type = name_ref I, imports.%import_ref.1 [template = constants.%I.type] +// CHECK:STDOUT: %i.param: %I.type = param i, runtime_param0 +// CHECK:STDOUT: %i: %I.type = bind_name i, %i.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -122,7 +122,7 @@ fn UseEmpty(i: I) {} // CHECK:STDOUT: witness = () // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @UseEmpty(%i: %.1) { +// CHECK:STDOUT: fn @UseEmpty(%i: %I.type) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/interface/no_prelude/fail_add_member_outside_definition.carbon b/toolchain/check/testdata/interface/no_prelude/fail_add_member_outside_definition.carbon index aa5c69422ae4c..86c862b9c935f 100644 --- a/toolchain/check/testdata/interface/no_prelude/fail_add_member_outside_definition.carbon +++ b/toolchain/check/testdata/interface/no_prelude/fail_add_member_outside_definition.carbon @@ -34,18 +34,18 @@ interface Outer { // CHECK:STDOUT: --- fail_add_member_outside_definition.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: type = interface_type @Interface [template] -// CHECK:STDOUT: %Self.1: %.1 = bind_symbolic_name Self, 0 [symbolic] +// CHECK:STDOUT: %Interface.type: type = interface_type @Interface [template] +// CHECK:STDOUT: %Self.1: %Interface.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %F.type.1: type = fn_type @F.1 [template] -// CHECK:STDOUT: %.2: type = tuple_type () [template] +// CHECK:STDOUT: %.1: type = tuple_type () [template] // CHECK:STDOUT: %F.1: %F.type.1 = struct_value () [template] -// CHECK:STDOUT: %.3: type = interface_type @Outer [template] -// CHECK:STDOUT: %Self.2: %.3 = bind_symbolic_name Self, 0 [symbolic] -// CHECK:STDOUT: %.4: type = interface_type @Inner [template] -// CHECK:STDOUT: %.5: type = interface_type @Inner, @Inner(%Self.2) [symbolic] -// CHECK:STDOUT: %Self.3: %.5 = bind_symbolic_name Self, 1 [symbolic] +// CHECK:STDOUT: %Outer.type: type = interface_type @Outer [template] +// CHECK:STDOUT: %Self.2: %Outer.type = bind_symbolic_name Self, 0 [symbolic] +// CHECK:STDOUT: %Inner.type.1: type = interface_type @Inner [template] +// CHECK:STDOUT: %Inner.type.2: type = interface_type @Inner, @Inner(%Self.2) [symbolic] +// CHECK:STDOUT: %Self.3: %Inner.type.2 = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: %.type: type = fn_type @.1, @Inner(%Self.2) [symbolic] -// CHECK:STDOUT: %.6: %.type = struct_value () [symbolic] +// CHECK:STDOUT: %.2: %.type = struct_value () [symbolic] // CHECK:STDOUT: %F.type.2: type = fn_type @F.2, @Inner(%Self.2) [symbolic] // CHECK:STDOUT: %F.2: %F.type.2 = struct_value () [symbolic] // CHECK:STDOUT: } @@ -55,13 +55,13 @@ interface Outer { // CHECK:STDOUT: .Interface = %Interface.decl // CHECK:STDOUT: .Outer = %Outer.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %Interface.decl: type = interface_decl @Interface [template = constants.%.1] {} {} +// CHECK:STDOUT: %Interface.decl: type = interface_decl @Interface [template = constants.%Interface.type] {} {} // CHECK:STDOUT: %F.decl: %F.type.1 = fn_decl @F.1 [template = constants.%F.1] {} {} -// CHECK:STDOUT: %Outer.decl: type = interface_decl @Outer [template = constants.%.3] {} {} +// CHECK:STDOUT: %Outer.decl: type = interface_decl @Outer [template = constants.%Outer.type] {} {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @Interface { -// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self, 0 [symbolic = constants.%Self.1] +// CHECK:STDOUT: %Self: %Interface.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self.1] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -70,8 +70,8 @@ interface Outer { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @Outer { -// CHECK:STDOUT: %Self: %.3 = bind_symbolic_name Self, 0 [symbolic = constants.%Self.2] -// CHECK:STDOUT: %Inner.decl: type = interface_decl @Inner [template = constants.%.4] {} {} +// CHECK:STDOUT: %Self: %Outer.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self.2] +// CHECK:STDOUT: %Inner.decl: type = interface_decl @Inner [template = constants.%Inner.type.1] {} {} // CHECK:STDOUT: %F.decl: %F.type.2 = fn_decl @F.2 [symbolic = constants.%F.2] {} {} // CHECK:STDOUT: // CHECK:STDOUT: !members: @@ -80,17 +80,17 @@ interface Outer { // CHECK:STDOUT: witness = () // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic interface @Inner(@Outer.%Self: %.3) { +// CHECK:STDOUT: generic interface @Inner(@Outer.%Self: %Outer.type) { // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %Self.2: %.3 = bind_symbolic_name Self, 0 [symbolic = %Self.2 (constants.%Self.2)] -// CHECK:STDOUT: %.1: type = interface_type @Inner, @Inner(%Self.2) [symbolic = %.1 (constants.%.5)] -// CHECK:STDOUT: %Self.3: %.5 = bind_symbolic_name Self, 1 [symbolic = %Self.3 (constants.%Self.3)] +// CHECK:STDOUT: %Self.2: %Outer.type = bind_symbolic_name Self, 0 [symbolic = %Self.2 (constants.%Self.2)] +// CHECK:STDOUT: %Inner.type: type = interface_type @Inner, @Inner(%Self.2) [symbolic = %Inner.type (constants.%Inner.type.2)] +// CHECK:STDOUT: %Self.3: %Inner.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self.3 (constants.%Self.3)] // CHECK:STDOUT: %.type: type = fn_type @.1, @Inner(%Self.2) [symbolic = %.type (constants.%.type)] -// CHECK:STDOUT: %.2: @Inner.%.type (%.type) = struct_value () [symbolic = %.2 (constants.%.6)] +// CHECK:STDOUT: %.1: @Inner.%.type (%.type) = struct_value () [symbolic = %.1 (constants.%.2)] // CHECK:STDOUT: // CHECK:STDOUT: interface { -// CHECK:STDOUT: %Self.1: @Inner.%.1 (%.5) = bind_symbolic_name Self, 1 [symbolic = %Self.3 (constants.%Self.3)] -// CHECK:STDOUT: %.decl: @Inner.%.type (%.type) = fn_decl @.1 [symbolic = @Inner.%.2 (constants.%.6)] {} {} +// CHECK:STDOUT: %Self.1: @Inner.%Inner.type (%Inner.type.2) = bind_symbolic_name Self, 1 [symbolic = %Self.3 (constants.%Self.3)] +// CHECK:STDOUT: %.decl: @Inner.%.type (%.type) = fn_decl @.1 [symbolic = @Inner.%.1 (constants.%.2)] {} {} // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self.1 @@ -99,7 +99,7 @@ interface Outer { // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @F.1(@Interface.%Self: %.1) { +// CHECK:STDOUT: generic fn @F.1(@Interface.%Self: %Interface.type) { // CHECK:STDOUT: !definition: // CHECK:STDOUT: // CHECK:STDOUT: fn() { @@ -108,12 +108,12 @@ interface Outer { // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @.1(@Outer.%Self: %.3, @Inner.%Self.1: @Inner.%.1 (%.5)) { +// CHECK:STDOUT: generic fn @.1(@Outer.%Self: %Outer.type, @Inner.%Self.1: @Inner.%Inner.type (%Inner.type.2)) { // CHECK:STDOUT: // CHECK:STDOUT: fn(); // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @F.2(@Outer.%Self: %.3, @Inner.%Self.1: @Inner.%.1 (%.5)) { +// CHECK:STDOUT: generic fn @F.2(@Outer.%Self: %Outer.type, @Inner.%Self.1: @Inner.%Inner.type (%Inner.type.2)) { // CHECK:STDOUT: // CHECK:STDOUT: fn(); // CHECK:STDOUT: } @@ -123,10 +123,10 @@ interface Outer { // CHECK:STDOUT: specific @Inner(constants.%Self.2) { // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Self.2 => constants.%Self.2 -// CHECK:STDOUT: %.1 => constants.%.5 +// CHECK:STDOUT: %Inner.type => constants.%Inner.type.2 // CHECK:STDOUT: %Self.3 => constants.%Self.3 // CHECK:STDOUT: %.type => constants.%.type -// CHECK:STDOUT: %.2 => constants.%.6 +// CHECK:STDOUT: %.1 => constants.%.2 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @.1(constants.%Self.2, constants.%Self.3) {} diff --git a/toolchain/check/testdata/interface/no_prelude/fail_assoc_const_not_binding.carbon b/toolchain/check/testdata/interface/no_prelude/fail_assoc_const_not_binding.carbon index b32d756550ae7..6561fc3dfcc11 100644 --- a/toolchain/check/testdata/interface/no_prelude/fail_assoc_const_not_binding.carbon +++ b/toolchain/check/testdata/interface/no_prelude/fail_assoc_const_not_binding.carbon @@ -18,8 +18,8 @@ interface I { // CHECK:STDOUT: --- fail_assoc_const_not_binding.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: type = interface_type @I [template] -// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self, 0 [symbolic] +// CHECK:STDOUT: %I.type: type = interface_type @I [template] +// CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %T: type = bind_symbolic_name T [symbolic] // CHECK:STDOUT: %U: type = bind_symbolic_name U [symbolic] // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/interface/no_prelude/fail_assoc_const_not_constant.carbon b/toolchain/check/testdata/interface/no_prelude/fail_assoc_const_not_constant.carbon index 5d3aceec59f2f..0cdadbec53009 100644 --- a/toolchain/check/testdata/interface/no_prelude/fail_assoc_const_not_constant.carbon +++ b/toolchain/check/testdata/interface/no_prelude/fail_assoc_const_not_constant.carbon @@ -28,9 +28,9 @@ alias UseOther = I.other; // CHECK:STDOUT: --- fail_assoc_const_not_constant.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: type = interface_type @I [template] -// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self, 0 [symbolic] -// CHECK:STDOUT: %.2: type = tuple_type () [template] +// CHECK:STDOUT: %I.type: type = interface_type @I [template] +// CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic] +// CHECK:STDOUT: %.1: type = tuple_type () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -39,17 +39,17 @@ alias UseOther = I.other; // CHECK:STDOUT: .UseA = %UseA // CHECK:STDOUT: .UseOther = %UseOther // CHECK:STDOUT: } -// CHECK:STDOUT: %I.decl: type = interface_decl @I [template = constants.%.1] {} {} -// CHECK:STDOUT: %I.ref.loc23: type = name_ref I, %I.decl [template = constants.%.1] +// CHECK:STDOUT: %I.decl: type = interface_decl @I [template = constants.%I.type] {} {} +// CHECK:STDOUT: %I.ref.loc23: type = name_ref I, %I.decl [template = constants.%I.type] // CHECK:STDOUT: %a.ref: = name_ref a, [template = ] // CHECK:STDOUT: %UseA: = bind_alias UseA, [template = ] -// CHECK:STDOUT: %I.ref.loc26: type = name_ref I, %I.decl [template = constants.%.1] +// CHECK:STDOUT: %I.ref.loc26: type = name_ref I, %I.decl [template = constants.%I.type] // CHECK:STDOUT: %other.ref: = name_ref other, [template = ] // CHECK:STDOUT: %UseOther: = bind_alias UseOther, [template = ] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @I { -// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self, 0 [symbolic = constants.%Self] +// CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self diff --git a/toolchain/check/testdata/interface/no_prelude/fail_assoc_const_template.carbon b/toolchain/check/testdata/interface/no_prelude/fail_assoc_const_template.carbon index c79f6224e82d4..a5fd68fa1624b 100644 --- a/toolchain/check/testdata/interface/no_prelude/fail_assoc_const_template.carbon +++ b/toolchain/check/testdata/interface/no_prelude/fail_assoc_const_template.carbon @@ -18,8 +18,8 @@ interface I { // CHECK:STDOUT: --- fail_assoc_const_template.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: type = interface_type @I [template] -// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self, 0 [symbolic] +// CHECK:STDOUT: %I.type: type = interface_type @I [template] +// CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file {} diff --git a/toolchain/check/testdata/interface/no_prelude/fail_definition_imported.carbon b/toolchain/check/testdata/interface/no_prelude/fail_definition_imported.carbon index 176b45336b900..f6f6c3043140d 100644 --- a/toolchain/check/testdata/interface/no_prelude/fail_definition_imported.carbon +++ b/toolchain/check/testdata/interface/no_prelude/fail_definition_imported.carbon @@ -31,14 +31,14 @@ interface I {} // CHECK:STDOUT: --- a.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: type = interface_type @I [template] +// CHECK:STDOUT: %I.type: type = interface_type @I [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: package: = namespace [template] { // CHECK:STDOUT: .I = %I.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %I.decl: type = interface_decl @I [template = constants.%.1] {} {} +// CHECK:STDOUT: %I.decl: type = interface_decl @I [template = constants.%I.type] {} {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @I; @@ -46,13 +46,13 @@ interface I {} // CHECK:STDOUT: --- fail_b.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: type = interface_type @I [template] -// CHECK:STDOUT: %.2: type = interface_type @.1 [template] -// CHECK:STDOUT: %Self: %.2 = bind_symbolic_name Self, 0 [symbolic] +// CHECK:STDOUT: %I.type: type = interface_type @I [template] +// CHECK:STDOUT: %.type: type = interface_type @.1 [template] +// CHECK:STDOUT: %Self: %.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { -// CHECK:STDOUT: %import_ref: type = import_ref Main//a, inst+1, loaded [template = constants.%.1] +// CHECK:STDOUT: %import_ref: type = import_ref Main//a, inst+1, loaded [template = constants.%I.type] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -60,13 +60,13 @@ interface I {} // CHECK:STDOUT: .I = imports.%import_ref // CHECK:STDOUT: } // CHECK:STDOUT: %default.import = import -// CHECK:STDOUT: %.decl: type = interface_decl @.1 [template = constants.%.2] {} {} +// CHECK:STDOUT: %.decl: type = interface_decl @.1 [template = constants.%.type] {} {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @I; // CHECK:STDOUT: // CHECK:STDOUT: interface @.1 { -// CHECK:STDOUT: %Self: %.2 = bind_symbolic_name Self, 0 [symbolic = constants.%Self] +// CHECK:STDOUT: %Self: %.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self diff --git a/toolchain/check/testdata/interface/no_prelude/fail_duplicate.carbon b/toolchain/check/testdata/interface/no_prelude/fail_duplicate.carbon index 7dd04f075f9a8..f6c7189e025eb 100644 --- a/toolchain/check/testdata/interface/no_prelude/fail_duplicate.carbon +++ b/toolchain/check/testdata/interface/no_prelude/fail_duplicate.carbon @@ -72,27 +72,27 @@ interface Class { } // CHECK:STDOUT: --- fail_redefine_without_dependents.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: type = interface_type @Interface [template] -// CHECK:STDOUT: %Self.1: %.1 = bind_symbolic_name Self, 0 [symbolic] -// CHECK:STDOUT: %.2: type = interface_type @.1 [template] -// CHECK:STDOUT: %Self.2: %.2 = bind_symbolic_name Self, 0 [symbolic] +// CHECK:STDOUT: %Interface.type: type = interface_type @Interface [template] +// CHECK:STDOUT: %Self.1: %Interface.type = bind_symbolic_name Self, 0 [symbolic] +// CHECK:STDOUT: %.type: type = interface_type @.1 [template] +// CHECK:STDOUT: %Self.2: %.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %.3: type = tuple_type () [template] +// CHECK:STDOUT: %.1: type = tuple_type () [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.4: type = assoc_entity_type %.2, %F.type [template] -// CHECK:STDOUT: %.5: %.4 = assoc_entity element0, @.1.%F.decl [template] +// CHECK:STDOUT: %.2: type = assoc_entity_type %.type, %F.type [template] +// CHECK:STDOUT: %.3: %.2 = assoc_entity element0, @.1.%F.decl [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: package: = namespace [template] { // CHECK:STDOUT: .Interface = %Interface.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %Interface.decl: type = interface_decl @Interface [template = constants.%.1] {} {} -// CHECK:STDOUT: %.decl: type = interface_decl @.1 [template = constants.%.2] {} {} +// CHECK:STDOUT: %Interface.decl: type = interface_decl @Interface [template = constants.%Interface.type] {} {} +// CHECK:STDOUT: %.decl: type = interface_decl @.1 [template = constants.%.type] {} {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @Interface { -// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self, 0 [symbolic = constants.%Self.1] +// CHECK:STDOUT: %Self: %Interface.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self.1] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -100,9 +100,9 @@ interface Class { } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @.1 { -// CHECK:STDOUT: %Self: %.2 = bind_symbolic_name Self, 0 [symbolic = constants.%Self.2] +// CHECK:STDOUT: %Self: %.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self.2] // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] {} {} -// CHECK:STDOUT: %.loc14: %.4 = assoc_entity element0, %F.decl [template = constants.%.5] +// CHECK:STDOUT: %.loc14: %.2 = assoc_entity element0, %F.decl [template = constants.%.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -110,7 +110,7 @@ interface Class { } // CHECK:STDOUT: witness = (%F.decl) // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @F(@.1.%Self: %.2) { +// CHECK:STDOUT: generic fn @F(@.1.%Self: %.type) { // CHECK:STDOUT: // CHECK:STDOUT: fn(); // CHECK:STDOUT: } @@ -120,27 +120,27 @@ interface Class { } // CHECK:STDOUT: --- fail_redefine_with_dependents.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: type = interface_type @Interface [template] -// CHECK:STDOUT: %Self.1: %.1 = bind_symbolic_name Self, 0 [symbolic] -// CHECK:STDOUT: %.2: type = interface_type @.1 [template] -// CHECK:STDOUT: %Self.2: %.2 = bind_symbolic_name Self, 0 [symbolic] +// CHECK:STDOUT: %Interface.type: type = interface_type @Interface [template] +// CHECK:STDOUT: %Self.1: %Interface.type = bind_symbolic_name Self, 0 [symbolic] +// CHECK:STDOUT: %.type: type = interface_type @.1 [template] +// CHECK:STDOUT: %Self.2: %.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %.3: type = tuple_type () [template] +// CHECK:STDOUT: %.1: type = tuple_type () [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.4: type = assoc_entity_type %.2, %F.type [template] -// CHECK:STDOUT: %.5: %.4 = assoc_entity element0, @.1.%F.decl [template] +// CHECK:STDOUT: %.2: type = assoc_entity_type %.type, %F.type [template] +// CHECK:STDOUT: %.3: %.2 = assoc_entity element0, @.1.%F.decl [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: package: = namespace [template] { // CHECK:STDOUT: .Interface = %Interface.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %Interface.decl: type = interface_decl @Interface [template = constants.%.1] {} {} -// CHECK:STDOUT: %.decl: type = interface_decl @.1 [template = constants.%.2] {} {} +// CHECK:STDOUT: %Interface.decl: type = interface_decl @Interface [template = constants.%Interface.type] {} {} +// CHECK:STDOUT: %.decl: type = interface_decl @.1 [template = constants.%.type] {} {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @Interface { -// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self, 0 [symbolic = constants.%Self.1] +// CHECK:STDOUT: %Self: %Interface.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self.1] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -148,17 +148,17 @@ interface Class { } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @.1 { -// CHECK:STDOUT: %Self: %.2 = bind_symbolic_name Self, 0 [symbolic = constants.%Self.2] +// CHECK:STDOUT: %Self: %.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self.2] // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %self.patt: @F.%Self (%Self.2) = binding_pattern self // CHECK:STDOUT: } { -// CHECK:STDOUT: %Self.ref: %.2 = name_ref Self, @.1.%Self [symbolic = %Self (constants.%Self.2)] +// CHECK:STDOUT: %Self.ref: %.type = name_ref Self, @.1.%Self [symbolic = %Self (constants.%Self.2)] // CHECK:STDOUT: %.loc14_14.1: type = facet_type_access %Self.ref [symbolic = %Self (constants.%Self.2)] // CHECK:STDOUT: %.loc14_14.2: type = converted %Self.ref, %.loc14_14.1 [symbolic = %Self (constants.%Self.2)] // CHECK:STDOUT: %self.param: @F.%Self (%Self.2) = param self, runtime_param0 // CHECK:STDOUT: %self: @F.%Self (%Self.2) = bind_name self, %self.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc14: %.4 = assoc_entity element0, %F.decl [template = constants.%.5] +// CHECK:STDOUT: %.loc14: %.2 = assoc_entity element0, %F.decl [template = constants.%.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -166,8 +166,8 @@ interface Class { } // CHECK:STDOUT: witness = (%F.decl) // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @F(@.1.%Self: %.2) { -// CHECK:STDOUT: %Self: %.2 = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self.2)] +// CHECK:STDOUT: generic fn @F(@.1.%Self: %.type) { +// CHECK:STDOUT: %Self: %.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self.2)] // CHECK:STDOUT: // CHECK:STDOUT: fn[%self: @F.%Self (%Self.2)](); // CHECK:STDOUT: } @@ -182,7 +182,7 @@ interface Class { } // CHECK:STDOUT: %Function.type: type = fn_type @Function [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] // CHECK:STDOUT: %Function: %Function.type = struct_value () [template] -// CHECK:STDOUT: %.2: type = interface_type @.1 [template] +// CHECK:STDOUT: %.type: type = interface_type @.1 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -190,7 +190,7 @@ interface Class { } // CHECK:STDOUT: .Function = %Function.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Function.decl: %Function.type = fn_decl @Function [template = constants.%Function] {} {} -// CHECK:STDOUT: %.decl: type = interface_decl @.1 [template = constants.%.2] {} {} +// CHECK:STDOUT: %.decl: type = interface_decl @.1 [template = constants.%.type] {} {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @.1; @@ -201,8 +201,8 @@ interface Class { } // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %Class: type = class_type @Class [template] -// CHECK:STDOUT: %.1: type = interface_type @.1 [template] -// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self, 0 [symbolic] +// CHECK:STDOUT: %.type: type = interface_type @.1 [template] +// CHECK:STDOUT: %Self: %.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -210,11 +210,11 @@ interface Class { } // CHECK:STDOUT: .Class = %Class.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Class.decl: type = class_decl @Class [template = constants.%Class] {} {} -// CHECK:STDOUT: %.decl: type = interface_decl @.1 [template = constants.%.1] {} {} +// CHECK:STDOUT: %.decl: type = interface_decl @.1 [template = constants.%.type] {} {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @.1 { -// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self, 0 [symbolic = constants.%Self] +// CHECK:STDOUT: %Self: %.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self diff --git a/toolchain/check/testdata/interface/no_prelude/fail_generic_redeclaration.carbon b/toolchain/check/testdata/interface/no_prelude/fail_generic_redeclaration.carbon index 42fe28e2ef0fd..3601f265e0f4b 100644 --- a/toolchain/check/testdata/interface/no_prelude/fail_generic_redeclaration.carbon +++ b/toolchain/check/testdata/interface/no_prelude/fail_generic_redeclaration.carbon @@ -40,24 +40,24 @@ interface DifferentParams(T:! ()) {} // CHECK:STDOUT: --- fail_generic_redeclaration.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: type = interface_type @NotGeneric [template] +// CHECK:STDOUT: %NotGeneric.type: type = interface_type @NotGeneric [template] // CHECK:STDOUT: %T.1: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %.type.1: type = generic_interface_type @.1 [template] -// CHECK:STDOUT: %.2: type = tuple_type () [template] -// CHECK:STDOUT: %.3: %.type.1 = struct_value () [template] -// CHECK:STDOUT: %.4: type = interface_type @.1, @.1(%T.1) [symbolic] -// CHECK:STDOUT: %Self.1: %.4 = bind_symbolic_name Self, 1 [symbolic] +// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %.2: %.type.1 = struct_value () [template] +// CHECK:STDOUT: %.type.2: type = interface_type @.1, @.1(%T.1) [symbolic] +// CHECK:STDOUT: %Self.1: %.type.2 = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: %Generic.type: type = generic_interface_type @Generic [template] // CHECK:STDOUT: %Generic: %Generic.type = struct_value () [template] -// CHECK:STDOUT: %.5: type = interface_type @.2 [template] -// CHECK:STDOUT: %Self.2: %.5 = bind_symbolic_name Self, 0 [symbolic] +// CHECK:STDOUT: %.type.3: type = interface_type @.2 [template] +// CHECK:STDOUT: %Self.2: %.type.3 = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %DifferentParams.type: type = generic_interface_type @DifferentParams [template] // CHECK:STDOUT: %DifferentParams: %DifferentParams.type = struct_value () [template] -// CHECK:STDOUT: %T.2: %.2 = bind_symbolic_name T, 0 [symbolic] -// CHECK:STDOUT: %.type.2: type = generic_interface_type @.3 [template] -// CHECK:STDOUT: %.6: %.type.2 = struct_value () [template] -// CHECK:STDOUT: %.7: type = interface_type @.3, @.3(%T.2) [symbolic] -// CHECK:STDOUT: %Self.3: %.7 = bind_symbolic_name Self, 1 [symbolic] +// CHECK:STDOUT: %T.2: %.1 = bind_symbolic_name T, 0 [symbolic] +// CHECK:STDOUT: %.type.4: type = generic_interface_type @.3 [template] +// CHECK:STDOUT: %.3: %.type.4 = struct_value () [template] +// CHECK:STDOUT: %.type.5: type = interface_type @.3, @.3(%T.2) [symbolic] +// CHECK:STDOUT: %Self.3: %.type.5 = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -66,8 +66,8 @@ interface DifferentParams(T:! ()) {} // CHECK:STDOUT: .Generic = %Generic.decl // CHECK:STDOUT: .DifferentParams = %DifferentParams.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %NotGeneric.decl: type = interface_decl @NotGeneric [template = constants.%.1] {} {} -// CHECK:STDOUT: %.decl.loc19: %.type.1 = interface_decl @.1 [template = constants.%.3] { +// CHECK:STDOUT: %NotGeneric.decl: type = interface_decl @NotGeneric [template = constants.%NotGeneric.type] {} {} +// CHECK:STDOUT: %.decl.loc19: %.type.1 = interface_decl @.1 [template = constants.%.2] { // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 // CHECK:STDOUT: } { // CHECK:STDOUT: %T.param: type = param T, runtime_param @@ -79,20 +79,20 @@ interface DifferentParams(T:! ()) {} // CHECK:STDOUT: %T.param: type = param T, runtime_param // CHECK:STDOUT: %T.loc21: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.1 (constants.%T.1)] // CHECK:STDOUT: } -// CHECK:STDOUT: %.decl.loc29: type = interface_decl @.2 [template = constants.%.5] {} {} +// CHECK:STDOUT: %.decl.loc29: type = interface_decl @.2 [template = constants.%.type.3] {} {} // CHECK:STDOUT: %DifferentParams.decl: %DifferentParams.type = interface_decl @DifferentParams [template = constants.%DifferentParams] { // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 // CHECK:STDOUT: } { // CHECK:STDOUT: %T.param: type = param T, runtime_param // CHECK:STDOUT: %T.loc31: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.1 (constants.%T.1)] // CHECK:STDOUT: } -// CHECK:STDOUT: %.decl.loc38: %.type.2 = interface_decl @.3 [template = constants.%.6] { -// CHECK:STDOUT: %T.patt: %.2 = symbolic_binding_pattern T, 0 +// CHECK:STDOUT: %.decl.loc38: %.type.4 = interface_decl @.3 [template = constants.%.3] { +// CHECK:STDOUT: %T.patt: %.1 = symbolic_binding_pattern T, 0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc38_32.1: %.2 = tuple_literal () -// CHECK:STDOUT: %.loc38_32.2: type = converted %.loc38_32.1, constants.%.2 [template = constants.%.2] -// CHECK:STDOUT: %T.param: %.2 = param T, runtime_param -// CHECK:STDOUT: %T.loc38: %.2 = bind_symbolic_name T, 0, %T.param [symbolic = %T.1 (constants.%T.2)] +// CHECK:STDOUT: %.loc38_32.1: %.1 = tuple_literal () +// CHECK:STDOUT: %.loc38_32.2: type = converted %.loc38_32.1, constants.%.1 [template = constants.%.1] +// CHECK:STDOUT: %T.param: %.1 = param T, runtime_param +// CHECK:STDOUT: %T.loc38: %.1 = bind_symbolic_name T, 0, %T.param [symbolic = %T.1 (constants.%T.2)] // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -102,11 +102,11 @@ interface DifferentParams(T:! ()) {} // CHECK:STDOUT: %T.1: type = bind_symbolic_name T, 0 [symbolic = %T.1 (constants.%T.1)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.1: type = interface_type @.1, @.1(%T.1) [symbolic = %.1 (constants.%.4)] -// CHECK:STDOUT: %Self.2: %.4 = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self.1)] +// CHECK:STDOUT: %.type: type = interface_type @.1, @.1(%T.1) [symbolic = %.type (constants.%.type.2)] +// CHECK:STDOUT: %Self.2: %.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self.1)] // CHECK:STDOUT: // CHECK:STDOUT: interface { -// CHECK:STDOUT: %Self.1: @.1.%.1 (%.4) = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self.1)] +// CHECK:STDOUT: %Self.1: @.1.%.type (%.type.2) = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self.1)] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self.1 @@ -121,7 +121,7 @@ interface DifferentParams(T:! ()) {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @.2 { -// CHECK:STDOUT: %Self: %.5 = bind_symbolic_name Self, 0 [symbolic = constants.%Self.2] +// CHECK:STDOUT: %Self: %.type.3 = bind_symbolic_name Self, 0 [symbolic = constants.%Self.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -134,15 +134,15 @@ interface DifferentParams(T:! ()) {} // CHECK:STDOUT: interface; // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic interface @.3(%T.loc38: %.2) { -// CHECK:STDOUT: %T.1: %.2 = bind_symbolic_name T, 0 [symbolic = %T.1 (constants.%T.2)] +// CHECK:STDOUT: generic interface @.3(%T.loc38: %.1) { +// CHECK:STDOUT: %T.1: %.1 = bind_symbolic_name T, 0 [symbolic = %T.1 (constants.%T.2)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.1: type = interface_type @.3, @.3(%T.1) [symbolic = %.1 (constants.%.7)] -// CHECK:STDOUT: %Self.2: %.7 = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self.3)] +// CHECK:STDOUT: %.type: type = interface_type @.3, @.3(%T.1) [symbolic = %.type (constants.%.type.5)] +// CHECK:STDOUT: %Self.2: %.type.5 = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self.3)] // CHECK:STDOUT: // CHECK:STDOUT: interface { -// CHECK:STDOUT: %Self.1: @.3.%.1 (%.7) = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self.3)] +// CHECK:STDOUT: %Self.1: @.3.%.type (%.type.5) = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self.3)] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self.1 diff --git a/toolchain/check/testdata/interface/no_prelude/fail_lookup_undefined.carbon b/toolchain/check/testdata/interface/no_prelude/fail_lookup_undefined.carbon index 48f996b7ee7ea..aeb79f4242712 100644 --- a/toolchain/check/testdata/interface/no_prelude/fail_lookup_undefined.carbon +++ b/toolchain/check/testdata/interface/no_prelude/fail_lookup_undefined.carbon @@ -52,20 +52,20 @@ interface BeingDefined { // CHECK:STDOUT: --- fail_lookup_undefined.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: type = interface_type @Undefined [template] +// CHECK:STDOUT: %Undefined.type: type = interface_type @Undefined [template] // CHECK:STDOUT: %.type.1: type = fn_type @.1 [template] -// CHECK:STDOUT: %.2: type = tuple_type () [template] -// CHECK:STDOUT: %.3: %.type.1 = struct_value () [template] +// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %.2: %.type.1 = struct_value () [template] // CHECK:STDOUT: %Test.type: type = fn_type @Test [template] // CHECK:STDOUT: %Test: %Test.type = struct_value () [template] -// CHECK:STDOUT: %.4: type = interface_type @BeingDefined [template] -// CHECK:STDOUT: %Self: %.4 = bind_symbolic_name Self, 0 [symbolic] +// CHECK:STDOUT: %BeingDefined.type: type = interface_type @BeingDefined [template] +// CHECK:STDOUT: %Self: %BeingDefined.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %H.type: type = fn_type @H [template] // CHECK:STDOUT: %H: %H.type = struct_value () [template] -// CHECK:STDOUT: %.5: type = assoc_entity_type %.4, %H.type [template] -// CHECK:STDOUT: %.6: %.5 = assoc_entity element0, @BeingDefined.%H.decl [template] +// CHECK:STDOUT: %.3: type = assoc_entity_type %BeingDefined.type, %H.type [template] +// CHECK:STDOUT: %.4: %.3 = assoc_entity element0, @BeingDefined.%H.decl [template] // CHECK:STDOUT: %.type.2: type = fn_type @.2 [template] -// CHECK:STDOUT: %.7: %.type.2 = struct_value () [template] +// CHECK:STDOUT: %.5: %.type.2 = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -74,23 +74,23 @@ interface BeingDefined { // CHECK:STDOUT: .Test = %Test.decl // CHECK:STDOUT: .BeingDefined = %BeingDefined.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %Undefined.decl: type = interface_decl @Undefined [template = constants.%.1] {} {} -// CHECK:STDOUT: %.decl: %.type.1 = fn_decl @.1 [template = constants.%.3] {} {} +// CHECK:STDOUT: %Undefined.decl: type = interface_decl @Undefined [template = constants.%Undefined.type] {} {} +// CHECK:STDOUT: %.decl: %.type.1 = fn_decl @.1 [template = constants.%.2] {} {} // CHECK:STDOUT: %Test.decl: %Test.type = fn_decl @Test [template = constants.%Test] {} {} -// CHECK:STDOUT: %BeingDefined.decl: type = interface_decl @BeingDefined [template = constants.%.4] {} {} +// CHECK:STDOUT: %BeingDefined.decl: type = interface_decl @BeingDefined [template = constants.%BeingDefined.type] {} {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @Undefined; // CHECK:STDOUT: // CHECK:STDOUT: interface @BeingDefined { -// CHECK:STDOUT: %Self: %.4 = bind_symbolic_name Self, 0 [symbolic = constants.%Self] +// CHECK:STDOUT: %Self: %BeingDefined.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self] // CHECK:STDOUT: %H.decl: %H.type = fn_decl @H [template = constants.%H] {} { -// CHECK:STDOUT: %BeingDefined.ref: type = name_ref BeingDefined, file.%BeingDefined.decl [template = constants.%.4] +// CHECK:STDOUT: %BeingDefined.ref: type = name_ref BeingDefined, file.%BeingDefined.decl [template = constants.%BeingDefined.type] // CHECK:STDOUT: %T.ref: = name_ref T, [template = ] // CHECK:STDOUT: %return: ref = var // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc45: %.5 = assoc_entity element0, %H.decl [template = constants.%.6] -// CHECK:STDOUT: %.decl: %.type.2 = fn_decl @.2 [template = constants.%.7] {} {} +// CHECK:STDOUT: %.loc45: %.3 = assoc_entity element0, %H.decl [template = constants.%.4] +// CHECK:STDOUT: %.decl: %.type.2 = fn_decl @.2 [template = constants.%.5] {} {} // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -102,17 +102,17 @@ interface BeingDefined { // CHECK:STDOUT: // CHECK:STDOUT: fn @Test() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Undefined.ref: type = name_ref Undefined, file.%Undefined.decl [template = constants.%.1] +// CHECK:STDOUT: %Undefined.ref: type = name_ref Undefined, file.%Undefined.decl [template = constants.%Undefined.type] // CHECK:STDOUT: %G.ref: = name_ref G, [template = ] // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @H(@BeingDefined.%Self: %.4) { +// CHECK:STDOUT: generic fn @H(@BeingDefined.%Self: %BeingDefined.type) { // CHECK:STDOUT: // CHECK:STDOUT: fn() -> ; // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @.2(@BeingDefined.%Self: %.4) { +// CHECK:STDOUT: generic fn @.2(@BeingDefined.%Self: %BeingDefined.type) { // CHECK:STDOUT: // CHECK:STDOUT: fn(); // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/interface/no_prelude/fail_member_lookup.carbon b/toolchain/check/testdata/interface/no_prelude/fail_member_lookup.carbon index d3b9a2a17c2e7..70b827e72a65d 100644 --- a/toolchain/check/testdata/interface/no_prelude/fail_member_lookup.carbon +++ b/toolchain/check/testdata/interface/no_prelude/fail_member_lookup.carbon @@ -30,15 +30,15 @@ fn F() { // CHECK:STDOUT: --- fail_member_lookup.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: type = interface_type @Interface [template] -// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self, 0 [symbolic] +// CHECK:STDOUT: %Interface.type: type = interface_type @Interface [template] +// CHECK:STDOUT: %Self: %Interface.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %F.type.1: type = fn_type @F.1 [template] -// CHECK:STDOUT: %.2: type = tuple_type () [template] +// CHECK:STDOUT: %.1: type = tuple_type () [template] // CHECK:STDOUT: %F.1: %F.type.1 = struct_value () [template] -// CHECK:STDOUT: %.3: type = assoc_entity_type %.1, %F.type.1 [template] -// CHECK:STDOUT: %.4: %.3 = assoc_entity element0, @Interface.%F.decl [template] -// CHECK:STDOUT: %.5: type = assoc_entity_type %.1, type [template] -// CHECK:STDOUT: %.6: %.5 = assoc_entity element1, @Interface.%T [template] +// CHECK:STDOUT: %.2: type = assoc_entity_type %Interface.type, %F.type.1 [template] +// CHECK:STDOUT: %.3: %.2 = assoc_entity element0, @Interface.%F.decl [template] +// CHECK:STDOUT: %.4: type = assoc_entity_type %Interface.type, type [template] +// CHECK:STDOUT: %.5: %.4 = assoc_entity element1, @Interface.%T [template] // CHECK:STDOUT: %F.type.2: type = fn_type @F.2 [template] // CHECK:STDOUT: %F.2: %F.type.2 = struct_value () [template] // CHECK:STDOUT: } @@ -48,16 +48,16 @@ fn F() { // CHECK:STDOUT: .Interface = %Interface.decl // CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %Interface.decl: type = interface_decl @Interface [template = constants.%.1] {} {} +// CHECK:STDOUT: %Interface.decl: type = interface_decl @Interface [template = constants.%Interface.type] {} {} // CHECK:STDOUT: %F.decl: %F.type.2 = fn_decl @F.2 [template = constants.%F.2] {} {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @Interface { -// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self, 0 [symbolic = constants.%Self] +// CHECK:STDOUT: %Self: %Interface.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self] // CHECK:STDOUT: %F.decl: %F.type.1 = fn_decl @F.1 [template = constants.%F.1] {} {} -// CHECK:STDOUT: %.loc12: %.3 = assoc_entity element0, %F.decl [template = constants.%.4] +// CHECK:STDOUT: %.loc12: %.2 = assoc_entity element0, %F.decl [template = constants.%.3] // CHECK:STDOUT: %T: type = assoc_const_decl T [template] -// CHECK:STDOUT: %.loc14: %.5 = assoc_entity element1, %T [template = constants.%.6] +// CHECK:STDOUT: %.loc14: %.4 = assoc_entity element1, %T [template = constants.%.5] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -66,17 +66,17 @@ fn F() { // CHECK:STDOUT: witness = (%F.decl, %T) // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @F.1(@Interface.%Self: %.1) { +// CHECK:STDOUT: generic fn @F.1(@Interface.%Self: %Interface.type) { // CHECK:STDOUT: // CHECK:STDOUT: fn(); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F.2() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Interface.ref.loc22: type = name_ref Interface, file.%Interface.decl [template = constants.%.1] -// CHECK:STDOUT: %F.ref: %.3 = name_ref F, @Interface.%.loc12 [template = constants.%.4] -// CHECK:STDOUT: %Interface.ref.loc27: type = name_ref Interface, file.%Interface.decl [template = constants.%.1] -// CHECK:STDOUT: %T.ref: %.5 = name_ref T, @Interface.%.loc14 [template = constants.%.6] +// CHECK:STDOUT: %Interface.ref.loc22: type = name_ref Interface, file.%Interface.decl [template = constants.%Interface.type] +// CHECK:STDOUT: %F.ref: %.2 = name_ref F, @Interface.%.loc12 [template = constants.%.3] +// CHECK:STDOUT: %Interface.ref.loc27: type = name_ref Interface, file.%Interface.decl [template = constants.%Interface.type] +// CHECK:STDOUT: %T.ref: %.4 = name_ref T, @Interface.%.loc14 [template = constants.%.5] // CHECK:STDOUT: %.loc27: type = converted %T.ref, [template = ] // CHECK:STDOUT: %v.var: ref = var v // CHECK:STDOUT: %v: ref = bind_name v, %v.var diff --git a/toolchain/check/testdata/interface/no_prelude/fail_modifiers.carbon b/toolchain/check/testdata/interface/no_prelude/fail_modifiers.carbon index 105810452fda0..938e424076e30 100644 --- a/toolchain/check/testdata/interface/no_prelude/fail_modifiers.carbon +++ b/toolchain/check/testdata/interface/no_prelude/fail_modifiers.carbon @@ -36,12 +36,12 @@ protected interface Protected; // CHECK:STDOUT: --- fail_modifiers.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: type = interface_type @Abstract [template] -// CHECK:STDOUT: %Self.1: %.1 = bind_symbolic_name Self, 0 [symbolic] -// CHECK:STDOUT: %.2: type = interface_type @Default [template] -// CHECK:STDOUT: %.3: type = interface_type @Virtual [template] -// CHECK:STDOUT: %Self.2: %.3 = bind_symbolic_name Self, 0 [symbolic] -// CHECK:STDOUT: %.4: type = interface_type @Protected [template] +// CHECK:STDOUT: %Abstract.type: type = interface_type @Abstract [template] +// CHECK:STDOUT: %Self.1: %Abstract.type = bind_symbolic_name Self, 0 [symbolic] +// CHECK:STDOUT: %Default.type: type = interface_type @Default [template] +// CHECK:STDOUT: %Virtual.type: type = interface_type @Virtual [template] +// CHECK:STDOUT: %Self.2: %Virtual.type = bind_symbolic_name Self, 0 [symbolic] +// CHECK:STDOUT: %Protected.type: type = interface_type @Protected [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -51,14 +51,14 @@ protected interface Protected; // CHECK:STDOUT: .Virtual = %Virtual.decl // CHECK:STDOUT: .Protected = %Protected.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %Abstract.decl: type = interface_decl @Abstract [template = constants.%.1] {} {} -// CHECK:STDOUT: %Default.decl: type = interface_decl @Default [template = constants.%.2] {} {} -// CHECK:STDOUT: %Virtual.decl: type = interface_decl @Virtual [template = constants.%.3] {} {} -// CHECK:STDOUT: %Protected.decl: type = interface_decl @Protected [template = constants.%.4] {} {} +// CHECK:STDOUT: %Abstract.decl: type = interface_decl @Abstract [template = constants.%Abstract.type] {} {} +// CHECK:STDOUT: %Default.decl: type = interface_decl @Default [template = constants.%Default.type] {} {} +// CHECK:STDOUT: %Virtual.decl: type = interface_decl @Virtual [template = constants.%Virtual.type] {} {} +// CHECK:STDOUT: %Protected.decl: type = interface_decl @Protected [template = constants.%Protected.type] {} {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @Abstract { -// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self, 0 [symbolic = constants.%Self.1] +// CHECK:STDOUT: %Self: %Abstract.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self.1] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -68,7 +68,7 @@ protected interface Protected; // CHECK:STDOUT: interface @Default; // CHECK:STDOUT: // CHECK:STDOUT: interface @Virtual { -// CHECK:STDOUT: %Self: %.3 = bind_symbolic_name Self, 0 [symbolic = constants.%Self.2] +// CHECK:STDOUT: %Self: %Virtual.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self diff --git a/toolchain/check/testdata/interface/no_prelude/fail_redeclare_member.carbon b/toolchain/check/testdata/interface/no_prelude/fail_redeclare_member.carbon index 15f932e77ca42..91d1e91d66b6f 100644 --- a/toolchain/check/testdata/interface/no_prelude/fail_redeclare_member.carbon +++ b/toolchain/check/testdata/interface/no_prelude/fail_redeclare_member.carbon @@ -22,29 +22,29 @@ interface Interface { // CHECK:STDOUT: --- fail_redeclare_member.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: type = interface_type @Interface [template] -// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self, 0 [symbolic] +// CHECK:STDOUT: %Interface.type: type = interface_type @Interface [template] +// CHECK:STDOUT: %Self: %Interface.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %.2: type = tuple_type () [template] +// CHECK:STDOUT: %.1: type = tuple_type () [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.3: type = assoc_entity_type %.1, %F.type [template] -// CHECK:STDOUT: %.4: %.3 = assoc_entity element0, @Interface.%F.decl [template] +// CHECK:STDOUT: %.2: type = assoc_entity_type %Interface.type, %F.type [template] +// CHECK:STDOUT: %.3: %.2 = assoc_entity element0, @Interface.%F.decl [template] // CHECK:STDOUT: %.type: type = fn_type @.1 [template] -// CHECK:STDOUT: %.5: %.type = struct_value () [template] +// CHECK:STDOUT: %.4: %.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: package: = namespace [template] { // CHECK:STDOUT: .Interface = %Interface.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %Interface.decl: type = interface_decl @Interface [template = constants.%.1] {} {} +// CHECK:STDOUT: %Interface.decl: type = interface_decl @Interface [template = constants.%Interface.type] {} {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @Interface { -// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self, 0 [symbolic = constants.%Self] +// CHECK:STDOUT: %Self: %Interface.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self] // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] {} {} -// CHECK:STDOUT: %.loc12: %.3 = assoc_entity element0, %F.decl [template = constants.%.4] -// CHECK:STDOUT: %.decl: %.type = fn_decl @.1 [template = constants.%.5] {} {} +// CHECK:STDOUT: %.loc12: %.2 = assoc_entity element0, %F.decl [template = constants.%.3] +// CHECK:STDOUT: %.decl: %.type = fn_decl @.1 [template = constants.%.4] {} {} // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -52,12 +52,12 @@ interface Interface { // CHECK:STDOUT: witness = (%F.decl) // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @F(@Interface.%Self: %.1) { +// CHECK:STDOUT: generic fn @F(@Interface.%Self: %Interface.type) { // CHECK:STDOUT: // CHECK:STDOUT: fn(); // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @.1(@Interface.%Self: %.1) { +// CHECK:STDOUT: generic fn @.1(@Interface.%Self: %Interface.type) { // CHECK:STDOUT: // CHECK:STDOUT: fn(); // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/interface/no_prelude/fail_todo_facet_lookup.carbon b/toolchain/check/testdata/interface/no_prelude/fail_todo_facet_lookup.carbon index 0c76e6ffbb7ce..55e4b38eba298 100644 --- a/toolchain/check/testdata/interface/no_prelude/fail_todo_facet_lookup.carbon +++ b/toolchain/check/testdata/interface/no_prelude/fail_todo_facet_lookup.carbon @@ -28,14 +28,14 @@ fn CallFacet(T:! Interface, x: T) { // CHECK:STDOUT: --- fail_todo_facet_lookup.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: type = interface_type @Interface [template] -// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self, 0 [symbolic] +// CHECK:STDOUT: %Interface.type: type = interface_type @Interface [template] +// CHECK:STDOUT: %Self: %Interface.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %.2: type = tuple_type () [template] +// CHECK:STDOUT: %.1: type = tuple_type () [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.3: type = assoc_entity_type %.1, %F.type [template] -// CHECK:STDOUT: %.4: %.3 = assoc_entity element0, @Interface.%F.decl [template] -// CHECK:STDOUT: %T: %.1 = bind_symbolic_name T, 0 [symbolic] +// CHECK:STDOUT: %.2: type = assoc_entity_type %Interface.type, %F.type [template] +// CHECK:STDOUT: %.3: %.2 = assoc_entity element0, @Interface.%F.decl [template] +// CHECK:STDOUT: %T: %Interface.type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %CallStatic.type: type = fn_type @CallStatic [template] // CHECK:STDOUT: %CallStatic: %CallStatic.type = struct_value () [template] // CHECK:STDOUT: %CallFacet.type: type = fn_type @CallFacet [template] @@ -48,22 +48,22 @@ fn CallFacet(T:! Interface, x: T) { // CHECK:STDOUT: .CallStatic = %CallStatic.decl // CHECK:STDOUT: .CallFacet = %CallFacet.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %Interface.decl: type = interface_decl @Interface [template = constants.%.1] {} {} +// CHECK:STDOUT: %Interface.decl: type = interface_decl @Interface [template = constants.%Interface.type] {} {} // CHECK:STDOUT: %CallStatic.decl: %CallStatic.type = fn_decl @CallStatic [template = constants.%CallStatic] { -// CHECK:STDOUT: %T.patt: %.1 = symbolic_binding_pattern T, 0 +// CHECK:STDOUT: %T.patt: %Interface.type = symbolic_binding_pattern T, 0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Interface.ref: type = name_ref Interface, file.%Interface.decl [template = constants.%.1] -// CHECK:STDOUT: %T.param: %.1 = param T, runtime_param -// CHECK:STDOUT: %T.loc13: %.1 = bind_symbolic_name T, 0, %T.param [symbolic = %T.1 (constants.%T)] +// CHECK:STDOUT: %Interface.ref: type = name_ref Interface, file.%Interface.decl [template = constants.%Interface.type] +// CHECK:STDOUT: %T.param: %Interface.type = param T, runtime_param +// CHECK:STDOUT: %T.loc13: %Interface.type = bind_symbolic_name T, 0, %T.param [symbolic = %T.1 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: %CallFacet.decl: %CallFacet.type = fn_decl @CallFacet [template = constants.%CallFacet] { -// CHECK:STDOUT: %T.patt: %.1 = symbolic_binding_pattern T, 0 +// CHECK:STDOUT: %T.patt: %Interface.type = symbolic_binding_pattern T, 0 // CHECK:STDOUT: %x.patt: @CallFacet.%T.1 (%T) = binding_pattern x // CHECK:STDOUT: } { -// CHECK:STDOUT: %Interface.ref: type = name_ref Interface, file.%Interface.decl [template = constants.%.1] -// CHECK:STDOUT: %T.param: %.1 = param T, runtime_param -// CHECK:STDOUT: %T.loc21: %.1 = bind_symbolic_name T, 0, %T.param [symbolic = %T.1 (constants.%T)] -// CHECK:STDOUT: %T.ref: %.1 = name_ref T, %T.loc21 [symbolic = %T.1 (constants.%T)] +// CHECK:STDOUT: %Interface.ref: type = name_ref Interface, file.%Interface.decl [template = constants.%Interface.type] +// CHECK:STDOUT: %T.param: %Interface.type = param T, runtime_param +// CHECK:STDOUT: %T.loc21: %Interface.type = bind_symbolic_name T, 0, %T.param [symbolic = %T.1 (constants.%T)] +// CHECK:STDOUT: %T.ref: %Interface.type = name_ref T, %T.loc21 [symbolic = %T.1 (constants.%T)] // CHECK:STDOUT: %.loc21_32.1: type = facet_type_access %T.ref [symbolic = %T.1 (constants.%T)] // CHECK:STDOUT: %.loc21_32.2: type = converted %T.ref, %.loc21_32.1 [symbolic = %T.1 (constants.%T)] // CHECK:STDOUT: %x.param: @CallFacet.%T.1 (%T) = param x, runtime_param0 @@ -72,9 +72,9 @@ fn CallFacet(T:! Interface, x: T) { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @Interface { -// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self, 0 [symbolic = constants.%Self] +// CHECK:STDOUT: %Self: %Interface.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self] // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] {} {} -// CHECK:STDOUT: %.loc11: %.3 = assoc_entity element0, %F.decl [template = constants.%.4] +// CHECK:STDOUT: %.loc11: %.2 = assoc_entity element0, %F.decl [template = constants.%.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -82,30 +82,30 @@ fn CallFacet(T:! Interface, x: T) { // CHECK:STDOUT: witness = (%F.decl) // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @F(@Interface.%Self: %.1) { +// CHECK:STDOUT: generic fn @F(@Interface.%Self: %Interface.type) { // CHECK:STDOUT: // CHECK:STDOUT: fn(); // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @CallStatic(%T.loc13: %.1) { -// CHECK:STDOUT: %T.1: %.1 = bind_symbolic_name T, 0 [symbolic = %T.1 (constants.%T)] +// CHECK:STDOUT: generic fn @CallStatic(%T.loc13: %Interface.type) { +// CHECK:STDOUT: %T.1: %Interface.type = bind_symbolic_name T, 0 [symbolic = %T.1 (constants.%T)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: -// CHECK:STDOUT: fn(%T.loc13: %.1) { +// CHECK:STDOUT: fn(%T.loc13: %Interface.type) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %T.ref: %.1 = name_ref T, %T.loc13 [symbolic = %T.1 (constants.%T)] -// CHECK:STDOUT: %F.ref: %.3 = name_ref F, @Interface.%.loc11 [template = constants.%.4] +// CHECK:STDOUT: %T.ref: %Interface.type = name_ref T, %T.loc13 [symbolic = %T.1 (constants.%T)] +// CHECK:STDOUT: %F.ref: %.2 = name_ref F, @Interface.%.loc11 [template = constants.%.3] // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @CallFacet(%T.loc21: %.1) { -// CHECK:STDOUT: %T.1: %.1 = bind_symbolic_name T, 0 [symbolic = %T.1 (constants.%T)] +// CHECK:STDOUT: generic fn @CallFacet(%T.loc21: %Interface.type) { +// CHECK:STDOUT: %T.1: %Interface.type = bind_symbolic_name T, 0 [symbolic = %T.1 (constants.%T)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: -// CHECK:STDOUT: fn(%T.loc21: %.1, %x: @CallFacet.%T.1 (%T)) { +// CHECK:STDOUT: fn(%T.loc21: %Interface.type, %x: @CallFacet.%T.1 (%T)) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %x.ref: @CallFacet.%T.1 (%T) = name_ref x, %x // CHECK:STDOUT: return diff --git a/toolchain/check/testdata/interface/no_prelude/fail_todo_generic_default_fn.carbon b/toolchain/check/testdata/interface/no_prelude/fail_todo_generic_default_fn.carbon index aca0a82de4133..fe1d827d8d6c8 100644 --- a/toolchain/check/testdata/interface/no_prelude/fail_todo_generic_default_fn.carbon +++ b/toolchain/check/testdata/interface/no_prelude/fail_todo_generic_default_fn.carbon @@ -25,42 +25,42 @@ fn I(T:! type).F[self: Self]() -> Self { return self; } // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] -// CHECK:STDOUT: %I.type: type = generic_interface_type @I [template] +// CHECK:STDOUT: %I.type.1: type = generic_interface_type @I [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %I: %I.type = struct_value () [template] -// CHECK:STDOUT: %.2: type = interface_type @I, @I(%T) [symbolic] -// CHECK:STDOUT: %Self: %.2 = bind_symbolic_name Self, 1 [symbolic] +// CHECK:STDOUT: %I: %I.type.1 = struct_value () [template] +// CHECK:STDOUT: %I.type.2: type = interface_type @I, @I(%T) [symbolic] +// CHECK:STDOUT: %Self: %I.type.2 = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: %F.type: type = fn_type @F, @I(%T) [symbolic] // CHECK:STDOUT: %F: %F.type = struct_value () [symbolic] -// CHECK:STDOUT: %.3: type = assoc_entity_type %.2, %F.type [symbolic] -// CHECK:STDOUT: %.4: %.3 = assoc_entity element0, @I.%F.decl [symbolic] +// CHECK:STDOUT: %.2: type = assoc_entity_type %I.type.2, %F.type [symbolic] +// CHECK:STDOUT: %.3: %.2 = assoc_entity element0, @I.%F.decl [symbolic] // CHECK:STDOUT: %.type: type = fn_type @.1, @I(%T) [symbolic] -// CHECK:STDOUT: %.5: %.type = struct_value () [symbolic] +// CHECK:STDOUT: %.4: %.type = struct_value () [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: package: = namespace [template] { // CHECK:STDOUT: .I = %I.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %I.decl: %I.type = interface_decl @I [template = constants.%I] { +// CHECK:STDOUT: %I.decl: %I.type.1 = interface_decl @I [template = constants.%I] { // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 // CHECK:STDOUT: } { // CHECK:STDOUT: %T.param: type = param T, runtime_param // CHECK:STDOUT: %T.loc11: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.1 (constants.%T)] // CHECK:STDOUT: } -// CHECK:STDOUT: %.decl: %.type = fn_decl @.1 [symbolic = constants.%.5] { +// CHECK:STDOUT: %.decl: %.type = fn_decl @.1 [symbolic = constants.%.4] { // CHECK:STDOUT: %self.patt: @.1.%Self (%Self) = binding_pattern self // CHECK:STDOUT: } { // CHECK:STDOUT: %T.param: type = param T, runtime_param // CHECK:STDOUT: %T.loc22: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.1 (constants.%T)] -// CHECK:STDOUT: %.loc22_24.1: @.1.%.1 (%.2) = specific_constant @I.%Self.1, @I(constants.%T) [symbolic = %Self (constants.%Self)] -// CHECK:STDOUT: %Self.ref.loc22_24: @.1.%.1 (%.2) = name_ref Self, %.loc22_24.1 [symbolic = %Self (constants.%Self)] +// CHECK:STDOUT: %.loc22_24.1: @.1.%I.type (%I.type.2) = specific_constant @I.%Self.1, @I(constants.%T) [symbolic = %Self (constants.%Self)] +// CHECK:STDOUT: %Self.ref.loc22_24: @.1.%I.type (%I.type.2) = name_ref Self, %.loc22_24.1 [symbolic = %Self (constants.%Self)] // CHECK:STDOUT: %.loc22_24.2: type = facet_type_access %Self.ref.loc22_24 [symbolic = %Self (constants.%Self)] // CHECK:STDOUT: %.loc22_24.3: type = converted %Self.ref.loc22_24, %.loc22_24.2 [symbolic = %Self (constants.%Self)] // CHECK:STDOUT: %self.param: @.1.%Self (%Self) = param self, runtime_param0 // CHECK:STDOUT: %self: @.1.%Self (%Self) = bind_name self, %self.param -// CHECK:STDOUT: %.loc22_35.1: @.1.%.1 (%.2) = specific_constant @I.%Self.1, @I(constants.%T) [symbolic = %Self (constants.%Self)] -// CHECK:STDOUT: %Self.ref.loc22_35: @.1.%.1 (%.2) = name_ref Self, %.loc22_35.1 [symbolic = %Self (constants.%Self)] +// CHECK:STDOUT: %.loc22_35.1: @.1.%I.type (%I.type.2) = specific_constant @I.%Self.1, @I(constants.%T) [symbolic = %Self (constants.%Self)] +// CHECK:STDOUT: %Self.ref.loc22_35: @.1.%I.type (%I.type.2) = name_ref Self, %.loc22_35.1 [symbolic = %Self (constants.%Self)] // CHECK:STDOUT: %.loc22_35.2: type = facet_type_access %Self.ref.loc22_35 [symbolic = %Self (constants.%Self)] // CHECK:STDOUT: %.loc22_35.3: type = converted %Self.ref.loc22_35, %.loc22_35.2 [symbolic = %Self (constants.%Self)] // CHECK:STDOUT: %return: ref @.1.%Self (%Self) = var @@ -71,31 +71,31 @@ fn I(T:! type).F[self: Self]() -> Self { return self; } // CHECK:STDOUT: %T.1: type = bind_symbolic_name T, 0 [symbolic = %T.1 (constants.%T)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.1: type = interface_type @I, @I(%T.1) [symbolic = %.1 (constants.%.2)] -// CHECK:STDOUT: %Self.2: %.2 = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self)] +// CHECK:STDOUT: %I.type: type = interface_type @I, @I(%T.1) [symbolic = %I.type (constants.%I.type.2)] +// CHECK:STDOUT: %Self.2: %I.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self)] // CHECK:STDOUT: %F.type: type = fn_type @F, @I(%T.1) [symbolic = %F.type (constants.%F.type)] // CHECK:STDOUT: %F: @I.%F.type (%F.type) = struct_value () [symbolic = %F (constants.%F)] -// CHECK:STDOUT: %.2: type = assoc_entity_type @I.%.1 (%.2), @I.%F.type (%F.type) [symbolic = %.2 (constants.%.3)] -// CHECK:STDOUT: %.3: @I.%.2 (%.3) = assoc_entity element0, %F.decl [symbolic = %.3 (constants.%.4)] +// CHECK:STDOUT: %.1: type = assoc_entity_type @I.%I.type (%I.type.2), @I.%F.type (%F.type) [symbolic = %.1 (constants.%.2)] +// CHECK:STDOUT: %.2: @I.%.1 (%.2) = assoc_entity element0, %F.decl [symbolic = %.2 (constants.%.3)] // CHECK:STDOUT: // CHECK:STDOUT: interface { -// CHECK:STDOUT: %Self.1: @I.%.1 (%.2) = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self)] +// CHECK:STDOUT: %Self.1: @I.%I.type (%I.type.2) = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self)] // CHECK:STDOUT: %F.decl: @I.%F.type (%F.type) = fn_decl @F [symbolic = @I.%F (constants.%F)] { // CHECK:STDOUT: %self.patt: @F.%Self (%Self) = binding_pattern self // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc13_14.1: @F.%.1 (%.2) = specific_constant @I.%Self.1, @I(constants.%T) [symbolic = %Self (constants.%Self)] -// CHECK:STDOUT: %Self.ref.loc13_14: @F.%.1 (%.2) = name_ref Self, %.loc13_14.1 [symbolic = %Self (constants.%Self)] +// CHECK:STDOUT: %.loc13_14.1: @F.%I.type (%I.type.2) = specific_constant @I.%Self.1, @I(constants.%T) [symbolic = %Self (constants.%Self)] +// CHECK:STDOUT: %Self.ref.loc13_14: @F.%I.type (%I.type.2) = name_ref Self, %.loc13_14.1 [symbolic = %Self (constants.%Self)] // CHECK:STDOUT: %.loc13_14.2: type = facet_type_access %Self.ref.loc13_14 [symbolic = %Self (constants.%Self)] // CHECK:STDOUT: %.loc13_14.3: type = converted %Self.ref.loc13_14, %.loc13_14.2 [symbolic = %Self (constants.%Self)] // CHECK:STDOUT: %self.param: @F.%Self (%Self) = param self, runtime_param0 // CHECK:STDOUT: %self: @F.%Self (%Self) = bind_name self, %self.param -// CHECK:STDOUT: %.loc13_25.1: @F.%.1 (%.2) = specific_constant @I.%Self.1, @I(constants.%T) [symbolic = %Self (constants.%Self)] -// CHECK:STDOUT: %Self.ref.loc13_25: @F.%.1 (%.2) = name_ref Self, %.loc13_25.1 [symbolic = %Self (constants.%Self)] +// CHECK:STDOUT: %.loc13_25.1: @F.%I.type (%I.type.2) = specific_constant @I.%Self.1, @I(constants.%T) [symbolic = %Self (constants.%Self)] +// CHECK:STDOUT: %Self.ref.loc13_25: @F.%I.type (%I.type.2) = name_ref Self, %.loc13_25.1 [symbolic = %Self (constants.%Self)] // CHECK:STDOUT: %.loc13_25.2: type = facet_type_access %Self.ref.loc13_25 [symbolic = %Self (constants.%Self)] // CHECK:STDOUT: %.loc13_25.3: type = converted %Self.ref.loc13_25, %.loc13_25.2 [symbolic = %Self (constants.%Self)] // CHECK:STDOUT: %return: ref @F.%Self (%Self) = var // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc13: @I.%.2 (%.3) = assoc_entity element0, %F.decl [symbolic = %.3 (constants.%.4)] +// CHECK:STDOUT: %.loc13: @I.%.1 (%.2) = assoc_entity element0, %F.decl [symbolic = %.2 (constants.%.3)] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self.1 @@ -104,18 +104,18 @@ fn I(T:! type).F[self: Self]() -> Self { return self; } // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @F(@I.%T.loc11: type, @I.%Self.1: @I.%.1 (%.2)) { +// CHECK:STDOUT: generic fn @F(@I.%T.loc11: type, @I.%Self.1: @I.%I.type (%I.type.2)) { // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T)] -// CHECK:STDOUT: %.1: type = interface_type @I, @I(%T) [symbolic = %.1 (constants.%.2)] -// CHECK:STDOUT: %Self: %.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self)] +// CHECK:STDOUT: %I.type: type = interface_type @I, @I(%T) [symbolic = %I.type (constants.%I.type.2)] +// CHECK:STDOUT: %Self: %I.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self)] // CHECK:STDOUT: // CHECK:STDOUT: fn[%self: @F.%Self (%Self)]() -> @F.%Self (%Self); // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @.1(%T.loc22: type, @I.%Self.1: @I.%.1 (%.2)) { +// CHECK:STDOUT: generic fn @.1(%T.loc22: type, @I.%Self.1: @I.%I.type (%I.type.2)) { // CHECK:STDOUT: %T.1: type = bind_symbolic_name T, 0 [symbolic = %T.1 (constants.%T)] -// CHECK:STDOUT: %.1: type = interface_type @I, @I(%T.1) [symbolic = %.1 (constants.%.2)] -// CHECK:STDOUT: %Self: %.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self)] +// CHECK:STDOUT: %I.type: type = interface_type @I, @I(%T.1) [symbolic = %I.type (constants.%I.type.2)] +// CHECK:STDOUT: %Self: %I.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: @@ -130,12 +130,12 @@ fn I(T:! type).F[self: Self]() -> Self { return self; } // CHECK:STDOUT: %T.1 => constants.%T // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.1 => constants.%.2 +// CHECK:STDOUT: %I.type => constants.%I.type.2 // CHECK:STDOUT: %Self.2 => constants.%Self // CHECK:STDOUT: %F.type => constants.%F.type // CHECK:STDOUT: %F => constants.%F +// CHECK:STDOUT: %.1 => constants.%.2 // CHECK:STDOUT: %.2 => constants.%.3 -// CHECK:STDOUT: %.3 => constants.%.4 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @I(@F.%T) { @@ -144,7 +144,7 @@ fn I(T:! type).F[self: Self]() -> Self { return self; } // CHECK:STDOUT: // CHECK:STDOUT: specific @F(constants.%T, constants.%Self) { // CHECK:STDOUT: %T => constants.%T -// CHECK:STDOUT: %.1 => constants.%.2 +// CHECK:STDOUT: %I.type => constants.%I.type.2 // CHECK:STDOUT: %Self => constants.%Self // CHECK:STDOUT: } // CHECK:STDOUT: @@ -158,7 +158,7 @@ fn I(T:! type).F[self: Self]() -> Self { return self; } // CHECK:STDOUT: // CHECK:STDOUT: specific @.1(constants.%T, constants.%Self) { // CHECK:STDOUT: %T.1 => constants.%T -// CHECK:STDOUT: %.1 => constants.%.2 +// CHECK:STDOUT: %I.type => constants.%I.type.2 // CHECK:STDOUT: %Self => constants.%Self // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/interface/no_prelude/fail_todo_modifiers.carbon b/toolchain/check/testdata/interface/no_prelude/fail_todo_modifiers.carbon index 98a20627d5045..7f7e9f1817e79 100644 --- a/toolchain/check/testdata/interface/no_prelude/fail_todo_modifiers.carbon +++ b/toolchain/check/testdata/interface/no_prelude/fail_todo_modifiers.carbon @@ -23,32 +23,32 @@ interface Modifiers { // CHECK:STDOUT: --- fail_todo_modifiers.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: type = interface_type @Modifiers [template] -// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self, 0 [symbolic] +// CHECK:STDOUT: %Modifiers.type: type = interface_type @Modifiers [template] +// CHECK:STDOUT: %Self: %Modifiers.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %Final.type: type = fn_type @Final [template] -// CHECK:STDOUT: %.2: type = tuple_type () [template] +// CHECK:STDOUT: %.1: type = tuple_type () [template] // CHECK:STDOUT: %Final: %Final.type = struct_value () [template] -// CHECK:STDOUT: %.3: type = assoc_entity_type %.1, %Final.type [template] -// CHECK:STDOUT: %.4: %.3 = assoc_entity element0, @Modifiers.%Final.decl [template] +// CHECK:STDOUT: %.2: type = assoc_entity_type %Modifiers.type, %Final.type [template] +// CHECK:STDOUT: %.3: %.2 = assoc_entity element0, @Modifiers.%Final.decl [template] // CHECK:STDOUT: %Default.type: type = fn_type @Default [template] // CHECK:STDOUT: %Default: %Default.type = struct_value () [template] -// CHECK:STDOUT: %.5: type = assoc_entity_type %.1, %Default.type [template] -// CHECK:STDOUT: %.6: %.5 = assoc_entity element1, @Modifiers.%Default.decl [template] +// CHECK:STDOUT: %.4: type = assoc_entity_type %Modifiers.type, %Default.type [template] +// CHECK:STDOUT: %.5: %.4 = assoc_entity element1, @Modifiers.%Default.decl [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: package: = namespace [template] { // CHECK:STDOUT: .Modifiers = %Modifiers.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %Modifiers.decl: type = interface_decl @Modifiers [template = constants.%.1] {} {} +// CHECK:STDOUT: %Modifiers.decl: type = interface_decl @Modifiers [template = constants.%Modifiers.type] {} {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @Modifiers { -// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self, 0 [symbolic = constants.%Self] +// CHECK:STDOUT: %Self: %Modifiers.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self] // CHECK:STDOUT: %Final.decl: %Final.type = fn_decl @Final [template = constants.%Final] {} {} -// CHECK:STDOUT: %.loc16: %.3 = assoc_entity element0, %Final.decl [template = constants.%.4] +// CHECK:STDOUT: %.loc16: %.2 = assoc_entity element0, %Final.decl [template = constants.%.3] // CHECK:STDOUT: %Default.decl: %Default.type = fn_decl @Default [template = constants.%Default] {} {} -// CHECK:STDOUT: %.loc20: %.5 = assoc_entity element1, %Default.decl [template = constants.%.6] +// CHECK:STDOUT: %.loc20: %.4 = assoc_entity element1, %Default.decl [template = constants.%.5] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -57,7 +57,7 @@ interface Modifiers { // CHECK:STDOUT: witness = (%Final.decl, %Default.decl) // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @Final(@Modifiers.%Self: %.1) { +// CHECK:STDOUT: generic fn @Final(@Modifiers.%Self: %Modifiers.type) { // CHECK:STDOUT: !definition: // CHECK:STDOUT: // CHECK:STDOUT: fn() { @@ -66,7 +66,7 @@ interface Modifiers { // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @Default(@Modifiers.%Self: %.1) { +// CHECK:STDOUT: generic fn @Default(@Modifiers.%Self: %Modifiers.type) { // CHECK:STDOUT: !definition: // CHECK:STDOUT: // CHECK:STDOUT: fn() { diff --git a/toolchain/check/testdata/interface/no_prelude/generic.carbon b/toolchain/check/testdata/interface/no_prelude/generic.carbon index 0f235dc2575e9..682f779e53e86 100644 --- a/toolchain/check/testdata/interface/no_prelude/generic.carbon +++ b/toolchain/check/testdata/interface/no_prelude/generic.carbon @@ -62,39 +62,39 @@ fn G(T:! Generic(B)) { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %T.1: type = bind_symbolic_name T, 0 [symbolic] -// CHECK:STDOUT: %Simple.type: type = generic_interface_type @Simple [template] +// CHECK:STDOUT: %Simple.type.1: type = generic_interface_type @Simple [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Simple: %Simple.type = struct_value () [template] -// CHECK:STDOUT: %.2: type = interface_type @Simple, @Simple(%T.1) [symbolic] -// CHECK:STDOUT: %Self.1: %.2 = bind_symbolic_name Self, 1 [symbolic] +// CHECK:STDOUT: %Simple: %Simple.type.1 = struct_value () [template] +// CHECK:STDOUT: %Simple.type.2: type = interface_type @Simple, @Simple(%T.1) [symbolic] +// CHECK:STDOUT: %Self.1: %Simple.type.2 = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: %X: type = class_type @X [template] -// CHECK:STDOUT: %.3: type = struct_type {} [template] -// CHECK:STDOUT: %.4: = complete_type_witness %.3 [template] -// CHECK:STDOUT: %WithAssocFn.type: type = generic_interface_type @WithAssocFn [template] -// CHECK:STDOUT: %WithAssocFn: %WithAssocFn.type = struct_value () [template] -// CHECK:STDOUT: %.5: type = interface_type @WithAssocFn, @WithAssocFn(%T.1) [symbolic] -// CHECK:STDOUT: %Self.2: %.5 = bind_symbolic_name Self, 1 [symbolic] +// CHECK:STDOUT: %.2: type = struct_type {} [template] +// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] +// CHECK:STDOUT: %WithAssocFn.type.1: type = generic_interface_type @WithAssocFn [template] +// CHECK:STDOUT: %WithAssocFn: %WithAssocFn.type.1 = struct_value () [template] +// CHECK:STDOUT: %WithAssocFn.type.2: type = interface_type @WithAssocFn, @WithAssocFn(%T.1) [symbolic] +// CHECK:STDOUT: %Self.2: %WithAssocFn.type.2 = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: %F.type.1: type = fn_type @F.1, @WithAssocFn(%T.1) [symbolic] // CHECK:STDOUT: %F.1: %F.type.1 = struct_value () [symbolic] -// CHECK:STDOUT: %.6: type = assoc_entity_type %.5, %F.type.1 [symbolic] -// CHECK:STDOUT: %.7: %.6 = assoc_entity element0, @WithAssocFn.%F.decl [symbolic] +// CHECK:STDOUT: %.4: type = assoc_entity_type %WithAssocFn.type.2, %F.type.1 [symbolic] +// CHECK:STDOUT: %.5: %.4 = assoc_entity element0, @WithAssocFn.%F.decl [symbolic] // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.8: type = interface_type @Simple, @Simple(%C) [template] -// CHECK:STDOUT: %.9: = interface_witness () [template] -// CHECK:STDOUT: %.10: type = interface_type @WithAssocFn, @WithAssocFn(%C) [template] +// CHECK:STDOUT: %Simple.type.3: type = interface_type @Simple, @Simple(%C) [template] +// CHECK:STDOUT: %.6: = interface_witness () [template] +// CHECK:STDOUT: %WithAssocFn.type.3: type = interface_type @WithAssocFn, @WithAssocFn(%C) [template] // CHECK:STDOUT: %F.type.2: type = fn_type @F.2 [template] // CHECK:STDOUT: %F.2: %F.type.2 = struct_value () [template] // CHECK:STDOUT: %F.type.3: type = fn_type @F.1, @WithAssocFn(%C) [template] // CHECK:STDOUT: %F.3: %F.type.3 = struct_value () [template] -// CHECK:STDOUT: %.11: type = assoc_entity_type %.10, %F.type.3 [template] -// CHECK:STDOUT: %.12: %.11 = assoc_entity element0, @WithAssocFn.%F.decl [template] -// CHECK:STDOUT: %.13: = interface_witness (%F.2) [template] -// CHECK:STDOUT: %.14: type = ptr_type %.3 [template] +// CHECK:STDOUT: %.7: type = assoc_entity_type %WithAssocFn.type.3, %F.type.3 [template] +// CHECK:STDOUT: %.8: %.7 = assoc_entity element0, @WithAssocFn.%F.decl [template] +// CHECK:STDOUT: %.9: = interface_witness (%F.2) [template] +// CHECK:STDOUT: %.10: type = ptr_type %.2 [template] // CHECK:STDOUT: %struct: %X = struct_value () [template] // CHECK:STDOUT: %N: %T.1 = bind_symbolic_name N, 1 [symbolic] // CHECK:STDOUT: %WithImplicitArgs.type: type = generic_interface_type @WithImplicitArgs [template] // CHECK:STDOUT: %WithImplicitArgs: %WithImplicitArgs.type = struct_value () [template] -// CHECK:STDOUT: %T.2: %.8 = bind_symbolic_name T, 0 [symbolic] +// CHECK:STDOUT: %T.2: %Simple.type.3 = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %Receive.type: type = fn_type @Receive [template] // CHECK:STDOUT: %Receive: %Receive.type = struct_value () [template] // CHECK:STDOUT: %Pass.type: type = fn_type @Pass [template] @@ -111,14 +111,14 @@ fn G(T:! Generic(B)) { // CHECK:STDOUT: .Receive = %Receive.decl // CHECK:STDOUT: .Pass = %Pass.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %Simple.decl: %Simple.type = interface_decl @Simple [template = constants.%Simple] { +// CHECK:STDOUT: %Simple.decl: %Simple.type.1 = interface_decl @Simple [template = constants.%Simple] { // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 // CHECK:STDOUT: } { // CHECK:STDOUT: %T.param: type = param T, runtime_param // CHECK:STDOUT: %T.loc4: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.1 (constants.%T.1)] // CHECK:STDOUT: } // CHECK:STDOUT: %X.decl: type = class_decl @X [template = constants.%X] {} {} -// CHECK:STDOUT: %WithAssocFn.decl: %WithAssocFn.type = interface_decl @WithAssocFn [template = constants.%WithAssocFn] { +// CHECK:STDOUT: %WithAssocFn.decl: %WithAssocFn.type.1 = interface_decl @WithAssocFn [template = constants.%WithAssocFn] { // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 // CHECK:STDOUT: } { // CHECK:STDOUT: %T.param: type = param T, runtime_param @@ -136,22 +136,22 @@ fn G(T:! Generic(B)) { // CHECK:STDOUT: %N.loc22: @WithImplicitArgs.%T.1 (%T.1) = bind_symbolic_name N, 1, %N.param [symbolic = %N.1 (constants.%N)] // CHECK:STDOUT: } // CHECK:STDOUT: %Receive.decl: %Receive.type = fn_decl @Receive [template = constants.%Receive] { -// CHECK:STDOUT: %T.patt: %.8 = symbolic_binding_pattern T, 0 +// CHECK:STDOUT: %T.patt: %Simple.type.3 = symbolic_binding_pattern T, 0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Simple.ref: %Simple.type = name_ref Simple, file.%Simple.decl [template = constants.%Simple] +// CHECK:STDOUT: %Simple.ref: %Simple.type.1 = name_ref Simple, file.%Simple.decl [template = constants.%Simple] // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %.loc24: type = interface_type @Simple, @Simple(constants.%C) [template = constants.%.8] -// CHECK:STDOUT: %T.param: %.8 = param T, runtime_param -// CHECK:STDOUT: %T.loc24: %.8 = bind_symbolic_name T, 0, %T.param [symbolic = %T.1 (constants.%T.2)] +// CHECK:STDOUT: %Simple.type: type = interface_type @Simple, @Simple(constants.%C) [template = constants.%Simple.type.3] +// CHECK:STDOUT: %T.param: %Simple.type.3 = param T, runtime_param +// CHECK:STDOUT: %T.loc24: %Simple.type.3 = bind_symbolic_name T, 0, %T.param [symbolic = %T.1 (constants.%T.2)] // CHECK:STDOUT: } // CHECK:STDOUT: %Pass.decl: %Pass.type = fn_decl @Pass [template = constants.%Pass] { -// CHECK:STDOUT: %T.patt: %.8 = symbolic_binding_pattern T, 0 +// CHECK:STDOUT: %T.patt: %Simple.type.3 = symbolic_binding_pattern T, 0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Simple.ref: %Simple.type = name_ref Simple, file.%Simple.decl [template = constants.%Simple] +// CHECK:STDOUT: %Simple.ref: %Simple.type.1 = name_ref Simple, file.%Simple.decl [template = constants.%Simple] // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %.loc25: type = interface_type @Simple, @Simple(constants.%C) [template = constants.%.8] -// CHECK:STDOUT: %T.param: %.8 = param T, runtime_param -// CHECK:STDOUT: %T.loc25: %.8 = bind_symbolic_name T, 0, %T.param [symbolic = %T.1 (constants.%T.2)] +// CHECK:STDOUT: %Simple.type: type = interface_type @Simple, @Simple(constants.%C) [template = constants.%Simple.type.3] +// CHECK:STDOUT: %T.param: %Simple.type.3 = param T, runtime_param +// CHECK:STDOUT: %T.loc25: %Simple.type.3 = bind_symbolic_name T, 0, %T.param [symbolic = %T.1 (constants.%T.2)] // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -159,11 +159,11 @@ fn G(T:! Generic(B)) { // CHECK:STDOUT: %T.1: type = bind_symbolic_name T, 0 [symbolic = %T.1 (constants.%T.1)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.1: type = interface_type @Simple, @Simple(%T.1) [symbolic = %.1 (constants.%.2)] -// CHECK:STDOUT: %Self.2: %.2 = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self.1)] +// CHECK:STDOUT: %Simple.type: type = interface_type @Simple, @Simple(%T.1) [symbolic = %Simple.type (constants.%Simple.type.2)] +// CHECK:STDOUT: %Self.2: %Simple.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self.1)] // CHECK:STDOUT: // CHECK:STDOUT: interface { -// CHECK:STDOUT: %Self.1: @Simple.%.1 (%.2) = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self.1)] +// CHECK:STDOUT: %Self.1: @Simple.%Simple.type (%Simple.type.2) = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self.1)] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self.1 @@ -175,20 +175,20 @@ fn G(T:! Generic(B)) { // CHECK:STDOUT: %T.1: type = bind_symbolic_name T, 0 [symbolic = %T.1 (constants.%T.1)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.1: type = interface_type @WithAssocFn, @WithAssocFn(%T.1) [symbolic = %.1 (constants.%.5)] -// CHECK:STDOUT: %Self.2: %.5 = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self.2)] +// CHECK:STDOUT: %WithAssocFn.type: type = interface_type @WithAssocFn, @WithAssocFn(%T.1) [symbolic = %WithAssocFn.type (constants.%WithAssocFn.type.2)] +// CHECK:STDOUT: %Self.2: %WithAssocFn.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self.2)] // CHECK:STDOUT: %F.type: type = fn_type @F.1, @WithAssocFn(%T.1) [symbolic = %F.type (constants.%F.type.1)] // CHECK:STDOUT: %F: @WithAssocFn.%F.type (%F.type.1) = struct_value () [symbolic = %F (constants.%F.1)] -// CHECK:STDOUT: %.2: type = assoc_entity_type @WithAssocFn.%.1 (%.5), @WithAssocFn.%F.type (%F.type.1) [symbolic = %.2 (constants.%.6)] -// CHECK:STDOUT: %.3: @WithAssocFn.%.2 (%.6) = assoc_entity element0, %F.decl [symbolic = %.3 (constants.%.7)] +// CHECK:STDOUT: %.1: type = assoc_entity_type @WithAssocFn.%WithAssocFn.type (%WithAssocFn.type.2), @WithAssocFn.%F.type (%F.type.1) [symbolic = %.1 (constants.%.4)] +// CHECK:STDOUT: %.2: @WithAssocFn.%.1 (%.4) = assoc_entity element0, %F.decl [symbolic = %.2 (constants.%.5)] // CHECK:STDOUT: // CHECK:STDOUT: interface { -// CHECK:STDOUT: %Self.1: @WithAssocFn.%.1 (%.5) = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self.2)] +// CHECK:STDOUT: %Self.1: @WithAssocFn.%WithAssocFn.type (%WithAssocFn.type.2) = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self.2)] // CHECK:STDOUT: %F.decl: @WithAssocFn.%F.type (%F.type.1) = fn_decl @F.1 [symbolic = @WithAssocFn.%F (constants.%F.1)] {} { // CHECK:STDOUT: %X.ref: type = name_ref X, file.%X.decl [template = constants.%X] // CHECK:STDOUT: %return: ref %X = var // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc10: @WithAssocFn.%.2 (%.6) = assoc_entity element0, %F.decl [symbolic = %.3 (constants.%.7)] +// CHECK:STDOUT: %.loc10: @WithAssocFn.%.1 (%.4) = assoc_entity element0, %F.decl [symbolic = %.2 (constants.%.5)] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self.1 @@ -204,27 +204,27 @@ fn G(T:! Generic(B)) { // CHECK:STDOUT: interface; // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: impl @impl.1: %Self.ref as %.loc14_17 { -// CHECK:STDOUT: %.loc14_21: = interface_witness () [template = constants.%.9] +// CHECK:STDOUT: impl @impl.1: %Self.ref as %Simple.type { +// CHECK:STDOUT: %.loc14: = interface_witness () [template = constants.%.6] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: witness = %.loc14_21 +// CHECK:STDOUT: witness = %.loc14 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: impl @impl.2: %Self.ref as %.loc15_22 { +// CHECK:STDOUT: impl @impl.2: %Self.ref as %WithAssocFn.type { // CHECK:STDOUT: %F.decl: %F.type.2 = fn_decl @F.2 [template = constants.%F.2] {} { // CHECK:STDOUT: %X.ref: type = name_ref X, file.%X.decl [template = constants.%X] // CHECK:STDOUT: %return: ref %X = var // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc15_26: = interface_witness (%F.decl) [template = constants.%.13] +// CHECK:STDOUT: %.loc15: = interface_witness (%F.decl) [template = constants.%.9] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %F.decl -// CHECK:STDOUT: witness = %.loc15_26 +// CHECK:STDOUT: witness = %.loc15 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @X { -// CHECK:STDOUT: %.loc6: = complete_type_witness %.3 [template = constants.%.4] +// CHECK:STDOUT: %.loc6: = complete_type_witness %.2 [template = constants.%.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%X @@ -233,50 +233,50 @@ fn G(T:! Generic(B)) { // CHECK:STDOUT: class @C { // CHECK:STDOUT: impl_decl @impl.1 [template] {} { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%C [template = constants.%C] -// CHECK:STDOUT: %Simple.ref: %Simple.type = name_ref Simple, file.%Simple.decl [template = constants.%Simple] +// CHECK:STDOUT: %Simple.ref: %Simple.type.1 = name_ref Simple, file.%Simple.decl [template = constants.%Simple] // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %.loc14_17: type = interface_type @Simple, @Simple(constants.%C) [template = constants.%.8] +// CHECK:STDOUT: %Simple.type: type = interface_type @Simple, @Simple(constants.%C) [template = constants.%Simple.type.3] // CHECK:STDOUT: } // CHECK:STDOUT: impl_decl @impl.2 [template] {} { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%C [template = constants.%C] -// CHECK:STDOUT: %WithAssocFn.ref: %WithAssocFn.type = name_ref WithAssocFn, file.%WithAssocFn.decl [template = constants.%WithAssocFn] +// CHECK:STDOUT: %WithAssocFn.ref: %WithAssocFn.type.1 = name_ref WithAssocFn, file.%WithAssocFn.decl [template = constants.%WithAssocFn] // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %.loc15_22: type = interface_type @WithAssocFn, @WithAssocFn(constants.%C) [template = constants.%.10] +// CHECK:STDOUT: %WithAssocFn.type: type = interface_type @WithAssocFn, @WithAssocFn(constants.%C) [template = constants.%WithAssocFn.type.3] // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc20: = complete_type_witness %.3 [template = constants.%.4] +// CHECK:STDOUT: %.loc20: = complete_type_witness %.2 [template = constants.%.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @F.1(@WithAssocFn.%T.loc8: type, @WithAssocFn.%Self.1: @WithAssocFn.%.1 (%.5)) { +// CHECK:STDOUT: generic fn @F.1(@WithAssocFn.%T.loc8: type, @WithAssocFn.%Self.1: @WithAssocFn.%WithAssocFn.type (%WithAssocFn.type.2)) { // CHECK:STDOUT: // CHECK:STDOUT: fn() -> %X; // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F.2() -> %return: %X { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc17_15.1: %.3 = struct_literal () +// CHECK:STDOUT: %.loc17_15.1: %.2 = struct_literal () // CHECK:STDOUT: %.loc17_15.2: init %X = class_init (), %return [template = constants.%struct] // CHECK:STDOUT: %.loc17_16: init %X = converted %.loc17_15.1, %.loc17_15.2 [template = constants.%struct] // CHECK:STDOUT: return %.loc17_16 to %return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @Receive(%T.loc24: %.8) { -// CHECK:STDOUT: %T.1: %.8 = bind_symbolic_name T, 0 [symbolic = %T.1 (constants.%T.2)] +// CHECK:STDOUT: generic fn @Receive(%T.loc24: %Simple.type.3) { +// CHECK:STDOUT: %T.1: %Simple.type.3 = bind_symbolic_name T, 0 [symbolic = %T.1 (constants.%T.2)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%T.loc24: %.8); +// CHECK:STDOUT: fn(%T.loc24: %Simple.type.3); // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @Pass(%T.loc25: %.8) { -// CHECK:STDOUT: %T.1: %.8 = bind_symbolic_name T, 0 [symbolic = %T.1 (constants.%T.2)] +// CHECK:STDOUT: generic fn @Pass(%T.loc25: %Simple.type.3) { +// CHECK:STDOUT: %T.1: %Simple.type.3 = bind_symbolic_name T, 0 [symbolic = %T.1 (constants.%T.2)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: -// CHECK:STDOUT: fn(%T.loc25: %.8) { +// CHECK:STDOUT: fn(%T.loc25: %Simple.type.3) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Receive.ref: %Receive.type = name_ref Receive, file.%Receive.decl [template = constants.%Receive] -// CHECK:STDOUT: %T.ref: %.8 = name_ref T, %T.loc25 [symbolic = %T.1 (constants.%T.2)] +// CHECK:STDOUT: %T.ref: %Simple.type.3 = name_ref T, %T.loc25 [symbolic = %T.1 (constants.%T.2)] // CHECK:STDOUT: %Receive.call: init %.1 = call %Receive.ref() // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -304,7 +304,7 @@ fn G(T:! Generic(B)) { // CHECK:STDOUT: %T.1 => constants.%C // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.1 => constants.%.8 +// CHECK:STDOUT: %Simple.type => constants.%Simple.type.3 // CHECK:STDOUT: %Self.2 => constants.%Self.1 // CHECK:STDOUT: } // CHECK:STDOUT: @@ -312,12 +312,12 @@ fn G(T:! Generic(B)) { // CHECK:STDOUT: %T.1 => constants.%C // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.1 => constants.%.10 +// CHECK:STDOUT: %WithAssocFn.type => constants.%WithAssocFn.type.3 // CHECK:STDOUT: %Self.2 => constants.%Self.2 // CHECK:STDOUT: %F.type => constants.%F.type.3 // CHECK:STDOUT: %F => constants.%F.3 -// CHECK:STDOUT: %.2 => constants.%.11 -// CHECK:STDOUT: %.3 => constants.%.12 +// CHECK:STDOUT: %.1 => constants.%.7 +// CHECK:STDOUT: %.2 => constants.%.8 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F.1(constants.%C, constants.%C) {} @@ -339,21 +339,21 @@ fn G(T:! Generic(B)) { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %T.1: type = bind_symbolic_name T, 0 [symbolic] -// CHECK:STDOUT: %Generic.type: type = generic_interface_type @Generic [template] +// CHECK:STDOUT: %Generic.type.1: type = generic_interface_type @Generic [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Generic: %Generic.type = struct_value () [template] -// CHECK:STDOUT: %.2: type = interface_type @Generic, @Generic(%T.1) [symbolic] -// CHECK:STDOUT: %Self: %.2 = bind_symbolic_name Self, 1 [symbolic] +// CHECK:STDOUT: %Generic: %Generic.type.1 = struct_value () [template] +// CHECK:STDOUT: %Generic.type.2: type = interface_type @Generic, @Generic(%T.1) [symbolic] +// CHECK:STDOUT: %Self: %Generic.type.2 = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: %A: type = class_type @A [template] -// CHECK:STDOUT: %.3: type = struct_type {} [template] -// CHECK:STDOUT: %.4: = complete_type_witness %.3 [template] +// CHECK:STDOUT: %.2: type = struct_type {} [template] +// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] // CHECK:STDOUT: %B: type = class_type @B [template] -// CHECK:STDOUT: %.5: type = interface_type @Generic, @Generic(%A) [template] -// CHECK:STDOUT: %T.2: %.5 = bind_symbolic_name T, 0 [symbolic] +// CHECK:STDOUT: %Generic.type.3: type = interface_type @Generic, @Generic(%A) [template] +// CHECK:STDOUT: %T.2: %Generic.type.3 = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.6: type = interface_type @Generic, @Generic(%B) [template] -// CHECK:STDOUT: %T.3: %.6 = bind_symbolic_name T, 0 [symbolic] +// CHECK:STDOUT: %Generic.type.4: type = interface_type @Generic, @Generic(%B) [template] +// CHECK:STDOUT: %T.3: %Generic.type.4 = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %G: %G.type = struct_value () [template] // CHECK:STDOUT: } @@ -366,7 +366,7 @@ fn G(T:! Generic(B)) { // CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: .G = %G.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %Generic.decl: %Generic.type = interface_decl @Generic [template = constants.%Generic] { +// CHECK:STDOUT: %Generic.decl: %Generic.type.1 = interface_decl @Generic [template = constants.%Generic] { // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 // CHECK:STDOUT: } { // CHECK:STDOUT: %T.param: type = param T, runtime_param @@ -375,22 +375,22 @@ fn G(T:! Generic(B)) { // CHECK:STDOUT: %A.decl: type = class_decl @A [template = constants.%A] {} {} // CHECK:STDOUT: %B.decl: type = class_decl @B [template = constants.%B] {} {} // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { -// CHECK:STDOUT: %T.patt: %.5 = symbolic_binding_pattern T, 0 +// CHECK:STDOUT: %T.patt: %Generic.type.3 = symbolic_binding_pattern T, 0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Generic.ref: %Generic.type = name_ref Generic, file.%Generic.decl [template = constants.%Generic] +// CHECK:STDOUT: %Generic.ref: %Generic.type.1 = name_ref Generic, file.%Generic.decl [template = constants.%Generic] // CHECK:STDOUT: %A.ref: type = name_ref A, file.%A.decl [template = constants.%A] -// CHECK:STDOUT: %.loc9: type = interface_type @Generic, @Generic(constants.%A) [template = constants.%.5] -// CHECK:STDOUT: %T.param: %.5 = param T, runtime_param -// CHECK:STDOUT: %T.loc9: %.5 = bind_symbolic_name T, 0, %T.param [symbolic = %T.1 (constants.%T.2)] +// CHECK:STDOUT: %Generic.type: type = interface_type @Generic, @Generic(constants.%A) [template = constants.%Generic.type.3] +// CHECK:STDOUT: %T.param: %Generic.type.3 = param T, runtime_param +// CHECK:STDOUT: %T.loc9: %Generic.type.3 = bind_symbolic_name T, 0, %T.param [symbolic = %T.1 (constants.%T.2)] // CHECK:STDOUT: } // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] { -// CHECK:STDOUT: %T.patt: %.6 = symbolic_binding_pattern T, 0 +// CHECK:STDOUT: %T.patt: %Generic.type.4 = symbolic_binding_pattern T, 0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Generic.ref: %Generic.type = name_ref Generic, file.%Generic.decl [template = constants.%Generic] +// CHECK:STDOUT: %Generic.ref: %Generic.type.1 = name_ref Generic, file.%Generic.decl [template = constants.%Generic] // CHECK:STDOUT: %B.ref: type = name_ref B, file.%B.decl [template = constants.%B] -// CHECK:STDOUT: %.loc10: type = interface_type @Generic, @Generic(constants.%B) [template = constants.%.6] -// CHECK:STDOUT: %T.param: %.6 = param T, runtime_param -// CHECK:STDOUT: %T.loc10: %.6 = bind_symbolic_name T, 0, %T.param [symbolic = %T.1 (constants.%T.3)] +// CHECK:STDOUT: %Generic.type: type = interface_type @Generic, @Generic(constants.%B) [template = constants.%Generic.type.4] +// CHECK:STDOUT: %T.param: %Generic.type.4 = param T, runtime_param +// CHECK:STDOUT: %T.loc10: %Generic.type.4 = bind_symbolic_name T, 0, %T.param [symbolic = %T.1 (constants.%T.3)] // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -398,11 +398,11 @@ fn G(T:! Generic(B)) { // CHECK:STDOUT: %T.1: type = bind_symbolic_name T, 0 [symbolic = %T.1 (constants.%T.1)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.1: type = interface_type @Generic, @Generic(%T.1) [symbolic = %.1 (constants.%.2)] -// CHECK:STDOUT: %Self.2: %.2 = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self)] +// CHECK:STDOUT: %Generic.type: type = interface_type @Generic, @Generic(%T.1) [symbolic = %Generic.type (constants.%Generic.type.2)] +// CHECK:STDOUT: %Self.2: %Generic.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self)] // CHECK:STDOUT: // CHECK:STDOUT: interface { -// CHECK:STDOUT: %Self.1: @Generic.%.1 (%.2) = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self)] +// CHECK:STDOUT: %Self.1: @Generic.%Generic.type (%Generic.type.2) = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self)] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self.1 @@ -411,35 +411,35 @@ fn G(T:! Generic(B)) { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @A { -// CHECK:STDOUT: %.loc6: = complete_type_witness %.3 [template = constants.%.4] +// CHECK:STDOUT: %.loc6: = complete_type_witness %.2 [template = constants.%.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%A // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @B { -// CHECK:STDOUT: %.loc7: = complete_type_witness %.3 [template = constants.%.4] +// CHECK:STDOUT: %.loc7: = complete_type_witness %.2 [template = constants.%.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%B // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @F(%T.loc9: %.5) { -// CHECK:STDOUT: %T.1: %.5 = bind_symbolic_name T, 0 [symbolic = %T.1 (constants.%T.2)] +// CHECK:STDOUT: generic fn @F(%T.loc9: %Generic.type.3) { +// CHECK:STDOUT: %T.1: %Generic.type.3 = bind_symbolic_name T, 0 [symbolic = %T.1 (constants.%T.2)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%T.loc9: %.5); +// CHECK:STDOUT: fn(%T.loc9: %Generic.type.3); // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @G(%T.loc10: %.6) { -// CHECK:STDOUT: %T.1: %.6 = bind_symbolic_name T, 0 [symbolic = %T.1 (constants.%T.3)] +// CHECK:STDOUT: generic fn @G(%T.loc10: %Generic.type.4) { +// CHECK:STDOUT: %T.1: %Generic.type.4 = bind_symbolic_name T, 0 [symbolic = %T.1 (constants.%T.3)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: -// CHECK:STDOUT: fn(%T.loc10: %.6) { +// CHECK:STDOUT: fn(%T.loc10: %Generic.type.4) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl [template = constants.%F] -// CHECK:STDOUT: %T.ref: %.6 = name_ref T, %T.loc10 [symbolic = %T.1 (constants.%T.3)] -// CHECK:STDOUT: %.loc18: %.5 = converted %T.ref, [template = ] +// CHECK:STDOUT: %T.ref: %Generic.type.4 = name_ref T, %T.loc10 [symbolic = %T.1 (constants.%T.3)] +// CHECK:STDOUT: %.loc18: %Generic.type.3 = converted %T.ref, [template = ] // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/interface/no_prelude/generic_binding_after_assoc_const.carbon b/toolchain/check/testdata/interface/no_prelude/generic_binding_after_assoc_const.carbon index a25c840a480f6..c50d05a4bf828 100644 --- a/toolchain/check/testdata/interface/no_prelude/generic_binding_after_assoc_const.carbon +++ b/toolchain/check/testdata/interface/no_prelude/generic_binding_after_assoc_const.carbon @@ -19,47 +19,47 @@ interface I { // CHECK:STDOUT: --- generic_binding_after_assoc_const.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: type = interface_type @I [template] -// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self, 0 [symbolic] +// CHECK:STDOUT: %I.type: type = interface_type @I [template] +// CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 1 [symbolic] // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %.2: type = tuple_type () [template] +// CHECK:STDOUT: %.1: type = tuple_type () [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.3: type = assoc_entity_type %.1, %F.type [template] -// CHECK:STDOUT: %.4: %.3 = assoc_entity element0, @I.%F.decl [template] -// CHECK:STDOUT: %.5: type = assoc_entity_type %.1, type [template] -// CHECK:STDOUT: %.6: %.5 = assoc_entity element1, @I.%U [template] +// CHECK:STDOUT: %.2: type = assoc_entity_type %I.type, %F.type [template] +// CHECK:STDOUT: %.3: %.2 = assoc_entity element0, @I.%F.decl [template] +// CHECK:STDOUT: %.4: type = assoc_entity_type %I.type, type [template] +// CHECK:STDOUT: %.5: %.4 = assoc_entity element1, @I.%U [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %G: %G.type = struct_value () [template] -// CHECK:STDOUT: %.7: type = assoc_entity_type %.1, %G.type [template] -// CHECK:STDOUT: %.8: %.7 = assoc_entity element2, @I.%G.decl [template] +// CHECK:STDOUT: %.6: type = assoc_entity_type %I.type, %G.type [template] +// CHECK:STDOUT: %.7: %.6 = assoc_entity element2, @I.%G.decl [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: package: = namespace [template] { // CHECK:STDOUT: .I = %I.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %I.decl: type = interface_decl @I [template = constants.%.1] {} {} +// CHECK:STDOUT: %I.decl: type = interface_decl @I [template = constants.%I.type] {} {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @I { -// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self, 0 [symbolic = constants.%Self] +// CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self] // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 1 // CHECK:STDOUT: } { // CHECK:STDOUT: %T.param: type = param T, runtime_param // CHECK:STDOUT: %T.loc12: type = bind_symbolic_name T, 1, %T.param [symbolic = %T.1 (constants.%T)] // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc12: %.3 = assoc_entity element0, %F.decl [template = constants.%.4] +// CHECK:STDOUT: %.loc12: %.2 = assoc_entity element0, %F.decl [template = constants.%.3] // CHECK:STDOUT: %U: type = assoc_const_decl U [template] -// CHECK:STDOUT: %.loc13: %.5 = assoc_entity element1, %U [template = constants.%.6] +// CHECK:STDOUT: %.loc13: %.4 = assoc_entity element1, %U [template = constants.%.5] // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] { // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 1 // CHECK:STDOUT: } { // CHECK:STDOUT: %T.param: type = param T, runtime_param // CHECK:STDOUT: %T.loc16: type = bind_symbolic_name T, 1, %T.param [symbolic = %T.1 (constants.%T)] // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc16: %.7 = assoc_entity element2, %G.decl [template = constants.%.8] +// CHECK:STDOUT: %.loc16: %.6 = assoc_entity element2, %G.decl [template = constants.%.7] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -69,13 +69,13 @@ interface I { // CHECK:STDOUT: witness = (%F.decl, %U, %G.decl) // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @F(@I.%Self: %.1, %T.loc12: type) { +// CHECK:STDOUT: generic fn @F(@I.%Self: %I.type, %T.loc12: type) { // CHECK:STDOUT: %T.1: type = bind_symbolic_name T, 1 [symbolic = %T.1 (constants.%T)] // CHECK:STDOUT: // CHECK:STDOUT: fn(%T.loc12: type); // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @G(@I.%Self: %.1, %T.loc16: type) { +// CHECK:STDOUT: generic fn @G(@I.%Self: %I.type, %T.loc16: type) { // CHECK:STDOUT: %T.1: type = bind_symbolic_name T, 1 [symbolic = %T.1 (constants.%T)] // CHECK:STDOUT: // CHECK:STDOUT: fn(%T.loc16: type); diff --git a/toolchain/check/testdata/interface/no_prelude/generic_import.carbon b/toolchain/check/testdata/interface/no_prelude/generic_import.carbon index f662e3e99f533..5b98ae6b59cf0 100644 --- a/toolchain/check/testdata/interface/no_prelude/generic_import.carbon +++ b/toolchain/check/testdata/interface/no_prelude/generic_import.carbon @@ -31,22 +31,22 @@ impl C as AddWith(C) { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] -// CHECK:STDOUT: %AddWith.type: type = generic_interface_type @AddWith [template] +// CHECK:STDOUT: %AddWith.type.1: type = generic_interface_type @AddWith [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %AddWith: %AddWith.type = struct_value () [template] -// CHECK:STDOUT: %.2: type = interface_type @AddWith, @AddWith(%T) [symbolic] -// CHECK:STDOUT: %Self: %.2 = bind_symbolic_name Self, 1 [symbolic] +// CHECK:STDOUT: %AddWith: %AddWith.type.1 = struct_value () [template] +// CHECK:STDOUT: %AddWith.type.2: type = interface_type @AddWith, @AddWith(%T) [symbolic] +// CHECK:STDOUT: %Self: %AddWith.type.2 = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: %F.type: type = fn_type @F, @AddWith(%T) [symbolic] // CHECK:STDOUT: %F: %F.type = struct_value () [symbolic] -// CHECK:STDOUT: %.3: type = assoc_entity_type %.2, %F.type [symbolic] -// CHECK:STDOUT: %.4: %.3 = assoc_entity element0, @AddWith.%F.decl [symbolic] +// CHECK:STDOUT: %.2: type = assoc_entity_type %AddWith.type.2, %F.type [symbolic] +// CHECK:STDOUT: %.3: %.2 = assoc_entity element0, @AddWith.%F.decl [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: package: = namespace [template] { // CHECK:STDOUT: .AddWith = %AddWith.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %AddWith.decl: %AddWith.type = interface_decl @AddWith [template = constants.%AddWith] { +// CHECK:STDOUT: %AddWith.decl: %AddWith.type.1 = interface_decl @AddWith [template = constants.%AddWith] { // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 // CHECK:STDOUT: } { // CHECK:STDOUT: %T.param: type = param T, runtime_param @@ -58,17 +58,17 @@ impl C as AddWith(C) { // CHECK:STDOUT: %T.1: type = bind_symbolic_name T, 0 [symbolic = %T.1 (constants.%T)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.1: type = interface_type @AddWith, @AddWith(%T.1) [symbolic = %.1 (constants.%.2)] -// CHECK:STDOUT: %Self.2: %.2 = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self)] +// CHECK:STDOUT: %AddWith.type: type = interface_type @AddWith, @AddWith(%T.1) [symbolic = %AddWith.type (constants.%AddWith.type.2)] +// CHECK:STDOUT: %Self.2: %AddWith.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self)] // CHECK:STDOUT: %F.type: type = fn_type @F, @AddWith(%T.1) [symbolic = %F.type (constants.%F.type)] // CHECK:STDOUT: %F: @AddWith.%F.type (%F.type) = struct_value () [symbolic = %F (constants.%F)] -// CHECK:STDOUT: %.2: type = assoc_entity_type @AddWith.%.1 (%.2), @AddWith.%F.type (%F.type) [symbolic = %.2 (constants.%.3)] -// CHECK:STDOUT: %.3: @AddWith.%.2 (%.3) = assoc_entity element0, %F.decl [symbolic = %.3 (constants.%.4)] +// CHECK:STDOUT: %.1: type = assoc_entity_type @AddWith.%AddWith.type (%AddWith.type.2), @AddWith.%F.type (%F.type) [symbolic = %.1 (constants.%.2)] +// CHECK:STDOUT: %.2: @AddWith.%.1 (%.2) = assoc_entity element0, %F.decl [symbolic = %.2 (constants.%.3)] // CHECK:STDOUT: // CHECK:STDOUT: interface { -// CHECK:STDOUT: %Self.1: @AddWith.%.1 (%.2) = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self)] +// CHECK:STDOUT: %Self.1: @AddWith.%AddWith.type (%AddWith.type.2) = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self)] // CHECK:STDOUT: %F.decl: @AddWith.%F.type (%F.type) = fn_decl @F [symbolic = @AddWith.%F (constants.%F)] {} {} -// CHECK:STDOUT: %.loc5: @AddWith.%.2 (%.3) = assoc_entity element0, %F.decl [symbolic = %.3 (constants.%.4)] +// CHECK:STDOUT: %.loc5: @AddWith.%.1 (%.2) = assoc_entity element0, %F.decl [symbolic = %.2 (constants.%.3)] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self.1 @@ -77,7 +77,7 @@ impl C as AddWith(C) { // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @F(@AddWith.%T.loc4: type, @AddWith.%Self.1: @AddWith.%.1 (%.2)) { +// CHECK:STDOUT: generic fn @F(@AddWith.%T.loc4: type, @AddWith.%Self.1: @AddWith.%AddWith.type (%AddWith.type.2)) { // CHECK:STDOUT: // CHECK:STDOUT: fn(); // CHECK:STDOUT: } @@ -98,29 +98,29 @@ impl C as AddWith(C) { // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %.1: type = struct_type {} [template] // CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] -// CHECK:STDOUT: %AddWith.type: type = generic_interface_type @AddWith [template] +// CHECK:STDOUT: %AddWith.type.1: type = generic_interface_type @AddWith [template] // CHECK:STDOUT: %.3: type = tuple_type () [template] -// CHECK:STDOUT: %AddWith: %AddWith.type = struct_value () [template] +// CHECK:STDOUT: %AddWith: %AddWith.type.1 = struct_value () [template] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] -// CHECK:STDOUT: %.4: type = interface_type @AddWith, @AddWith(%T) [symbolic] -// CHECK:STDOUT: %Self.1: @AddWith.%.1 (%.4) = bind_symbolic_name Self, 1 [symbolic] -// CHECK:STDOUT: %Self.2: %.4 = bind_symbolic_name Self, 1 [symbolic] +// CHECK:STDOUT: %AddWith.type.2: type = interface_type @AddWith, @AddWith(%T) [symbolic] +// CHECK:STDOUT: %Self.1: @AddWith.%AddWith.type (%AddWith.type.2) = bind_symbolic_name Self, 1 [symbolic] +// CHECK:STDOUT: %Self.2: %AddWith.type.2 = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: %F.type.1: type = fn_type @F.1, @AddWith(%T) [symbolic] // CHECK:STDOUT: %F.1: %F.type.1 = struct_value () [symbolic] -// CHECK:STDOUT: %.5: type = assoc_entity_type %.4, %F.type.1 [symbolic] -// CHECK:STDOUT: %.6: %.5 = assoc_entity element0, imports.%import_ref.5 [symbolic] -// CHECK:STDOUT: %.7: type = interface_type @AddWith, @AddWith(%C) [template] +// CHECK:STDOUT: %.4: type = assoc_entity_type %AddWith.type.2, %F.type.1 [symbolic] +// CHECK:STDOUT: %.5: %.4 = assoc_entity element0, imports.%import_ref.5 [symbolic] +// CHECK:STDOUT: %AddWith.type.3: type = interface_type @AddWith, @AddWith(%C) [template] // CHECK:STDOUT: %F.type.2: type = fn_type @F.2 [template] // CHECK:STDOUT: %F.2: %F.type.2 = struct_value () [template] // CHECK:STDOUT: %F.type.3: type = fn_type @F.1, @AddWith(%C) [template] // CHECK:STDOUT: %F.3: %F.type.3 = struct_value () [template] -// CHECK:STDOUT: %.8: type = assoc_entity_type %.7, %F.type.3 [template] -// CHECK:STDOUT: %.9: %.8 = assoc_entity element0, imports.%import_ref.5 [template] -// CHECK:STDOUT: %.10: = interface_witness (%F.2) [template] +// CHECK:STDOUT: %.6: type = assoc_entity_type %AddWith.type.3, %F.type.3 [template] +// CHECK:STDOUT: %.7: %.6 = assoc_entity element0, imports.%import_ref.5 [template] +// CHECK:STDOUT: %.8: = interface_witness (%F.2) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { -// CHECK:STDOUT: %import_ref.1: %AddWith.type = import_ref Main//a, inst+5, loaded [template = constants.%AddWith] +// CHECK:STDOUT: %import_ref.1: %AddWith.type.1 = import_ref Main//a, inst+5, loaded [template = constants.%AddWith] // CHECK:STDOUT: %import_ref.2 = import_ref Main//a, inst+11, unloaded // CHECK:STDOUT: %import_ref.3 = import_ref Main//a, inst+17, unloaded // CHECK:STDOUT: %import_ref.4: @AddWith.%F.type (%F.type.1) = import_ref Main//a, inst+13, loaded [symbolic = @AddWith.%F (constants.%F.1)] @@ -136,9 +136,9 @@ impl C as AddWith(C) { // CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {} {} // CHECK:STDOUT: impl_decl @impl [template] {} { // CHECK:STDOUT: %C.ref.loc7_6: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %AddWith.ref: %AddWith.type = name_ref AddWith, imports.%import_ref.1 [template = constants.%AddWith] +// CHECK:STDOUT: %AddWith.ref: %AddWith.type.1 = name_ref AddWith, imports.%import_ref.1 [template = constants.%AddWith] // CHECK:STDOUT: %C.ref.loc7_19: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %.loc7_18: type = interface_type @AddWith, @AddWith(constants.%C) [template = constants.%.7] +// CHECK:STDOUT: %AddWith.type: type = interface_type @AddWith, @AddWith(constants.%C) [template = constants.%AddWith.type.3] // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -146,12 +146,12 @@ impl C as AddWith(C) { // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.1: type = interface_type @AddWith, @AddWith(%T) [symbolic = %.1 (constants.%.4)] -// CHECK:STDOUT: %Self: %.4 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] +// CHECK:STDOUT: %AddWith.type: type = interface_type @AddWith, @AddWith(%T) [symbolic = %AddWith.type (constants.%AddWith.type.2)] +// CHECK:STDOUT: %Self: %AddWith.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] // CHECK:STDOUT: %F.type: type = fn_type @F.1, @AddWith(%T) [symbolic = %F.type (constants.%F.type.1)] // CHECK:STDOUT: %F: @AddWith.%F.type (%F.type.1) = struct_value () [symbolic = %F (constants.%F.1)] -// CHECK:STDOUT: %.2: type = assoc_entity_type @AddWith.%.1 (%.4), @AddWith.%F.type (%F.type.1) [symbolic = %.2 (constants.%.5)] -// CHECK:STDOUT: %.3: @AddWith.%.2 (%.5) = assoc_entity element0, imports.%import_ref.5 [symbolic = %.3 (constants.%.6)] +// CHECK:STDOUT: %.1: type = assoc_entity_type @AddWith.%AddWith.type (%AddWith.type.2), @AddWith.%F.type (%F.type.1) [symbolic = %.1 (constants.%.4)] +// CHECK:STDOUT: %.2: @AddWith.%.1 (%.4) = assoc_entity element0, imports.%import_ref.5 [symbolic = %.2 (constants.%.5)] // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: !members: @@ -161,13 +161,13 @@ impl C as AddWith(C) { // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: impl @impl: %C.ref.loc7_6 as %.loc7_18 { +// CHECK:STDOUT: impl @impl: %C.ref.loc7_6 as %AddWith.type { // CHECK:STDOUT: %F.decl: %F.type.2 = fn_decl @F.2 [template = constants.%F.2] {} {} -// CHECK:STDOUT: %.loc7_22: = interface_witness (%F.decl) [template = constants.%.10] +// CHECK:STDOUT: %.loc7: = interface_witness (%F.decl) [template = constants.%.8] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %F.decl -// CHECK:STDOUT: witness = %.loc7_22 +// CHECK:STDOUT: witness = %.loc7 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { @@ -177,7 +177,7 @@ impl C as AddWith(C) { // CHECK:STDOUT: .Self = constants.%C // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @F.1(constants.%T: type, constants.%Self.1: @AddWith.%.1 (%.4)) { +// CHECK:STDOUT: generic fn @F.1(constants.%T: type, constants.%Self.1: @AddWith.%AddWith.type (%AddWith.type.2)) { // CHECK:STDOUT: // CHECK:STDOUT: fn(); // CHECK:STDOUT: } @@ -201,12 +201,12 @@ impl C as AddWith(C) { // CHECK:STDOUT: %T => constants.%C // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.1 => constants.%.7 +// CHECK:STDOUT: %AddWith.type => constants.%AddWith.type.3 // CHECK:STDOUT: %Self => constants.%Self.2 // CHECK:STDOUT: %F.type => constants.%F.type.3 // CHECK:STDOUT: %F => constants.%F.3 -// CHECK:STDOUT: %.2 => constants.%.8 -// CHECK:STDOUT: %.3 => constants.%.9 +// CHECK:STDOUT: %.1 => constants.%.6 +// CHECK:STDOUT: %.2 => constants.%.7 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F.1(constants.%C, constants.%C) {} diff --git a/toolchain/check/testdata/interface/no_prelude/generic_vs_params.carbon b/toolchain/check/testdata/interface/no_prelude/generic_vs_params.carbon index 132fdfc2dc69d..6280ecac4d644 100644 --- a/toolchain/check/testdata/interface/no_prelude/generic_vs_params.carbon +++ b/toolchain/check/testdata/interface/no_prelude/generic_vs_params.carbon @@ -50,39 +50,39 @@ interface A(T: type) {} // CHECK:STDOUT: --- params.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: type = interface_type @NotGenericNoParams [template] -// CHECK:STDOUT: %Self.1: %.1 = bind_symbolic_name Self, 0 [symbolic] -// CHECK:STDOUT: %NotGenericButParams.type: type = generic_interface_type @NotGenericButParams [template] -// CHECK:STDOUT: %.2: type = tuple_type () [template] -// CHECK:STDOUT: %NotGenericButParams: %NotGenericButParams.type = struct_value () [template] -// CHECK:STDOUT: %.3: type = interface_type @NotGenericButParams [template] -// CHECK:STDOUT: %Self.2: %.3 = bind_symbolic_name Self, 0 [symbolic] +// CHECK:STDOUT: %NotGenericNoParams.type: type = interface_type @NotGenericNoParams [template] +// CHECK:STDOUT: %Self.1: %NotGenericNoParams.type = bind_symbolic_name Self, 0 [symbolic] +// CHECK:STDOUT: %NotGenericButParams.type.1: type = generic_interface_type @NotGenericButParams [template] +// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %NotGenericButParams: %NotGenericButParams.type.1 = struct_value () [template] +// CHECK:STDOUT: %NotGenericButParams.type.2: type = interface_type @NotGenericButParams [template] +// CHECK:STDOUT: %Self.2: %NotGenericButParams.type.2 = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %GenericAndParams.type.1: type = generic_interface_type @GenericAndParams.1 [template] // CHECK:STDOUT: %GenericAndParams.1: %GenericAndParams.type.1 = struct_value () [template] -// CHECK:STDOUT: %.4: type = interface_type @GenericAndParams.1, @GenericAndParams.1(%T) [symbolic] -// CHECK:STDOUT: %Self.3: %.4 = bind_symbolic_name Self, 1 [symbolic] +// CHECK:STDOUT: %GenericAndParams.type.2: type = interface_type @GenericAndParams.1, @GenericAndParams.1(%T) [symbolic] +// CHECK:STDOUT: %Self.3: %GenericAndParams.type.2 = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: %C.type: type = generic_class_type @C [template] // CHECK:STDOUT: %C.1: %C.type = struct_value () [template] // CHECK:STDOUT: %C.2: type = class_type @C, @C(%T) [symbolic] -// CHECK:STDOUT: %.5: type = interface_type @GenericNoParams [template] -// CHECK:STDOUT: %.6: type = interface_type @GenericNoParams, @GenericNoParams(%T) [symbolic] -// CHECK:STDOUT: %Self.4: %.6 = bind_symbolic_name Self, 1 [symbolic] +// CHECK:STDOUT: %GenericNoParams.type.1: type = interface_type @GenericNoParams [template] +// CHECK:STDOUT: %GenericNoParams.type.2: type = interface_type @GenericNoParams, @GenericNoParams(%T) [symbolic] +// CHECK:STDOUT: %Self.4: %GenericNoParams.type.2 = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: %U: type = bind_symbolic_name U, 1 [symbolic] -// CHECK:STDOUT: %GenericAndParams.type.2: type = generic_interface_type @GenericAndParams.2, @C(%T) [symbolic] -// CHECK:STDOUT: %GenericAndParams.2: %GenericAndParams.type.2 = struct_value () [symbolic] -// CHECK:STDOUT: %.7: type = interface_type @GenericAndParams.2, @GenericAndParams.2(%T, %U) [symbolic] -// CHECK:STDOUT: %Self.5: %.7 = bind_symbolic_name Self, 2 [symbolic] -// CHECK:STDOUT: %.8: type = struct_type {} [template] -// CHECK:STDOUT: %.9: = complete_type_witness %.8 [template] +// CHECK:STDOUT: %GenericAndParams.type.3: type = generic_interface_type @GenericAndParams.2, @C(%T) [symbolic] +// CHECK:STDOUT: %GenericAndParams.2: %GenericAndParams.type.3 = struct_value () [symbolic] +// CHECK:STDOUT: %GenericAndParams.type.4: type = interface_type @GenericAndParams.2, @GenericAndParams.2(%T, %U) [symbolic] +// CHECK:STDOUT: %Self.5: %GenericAndParams.type.4 = bind_symbolic_name Self, 2 [symbolic] +// CHECK:STDOUT: %.2: type = struct_type {} [template] +// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] // CHECK:STDOUT: %X: type = class_type @X [template] -// CHECK:STDOUT: %.10: = interface_witness () [template] -// CHECK:STDOUT: %.11: type = interface_type @GenericAndParams.1, @GenericAndParams.1(%X) [template] +// CHECK:STDOUT: %.4: = interface_witness () [template] +// CHECK:STDOUT: %GenericAndParams.type.5: type = interface_type @GenericAndParams.1, @GenericAndParams.1(%X) [template] // CHECK:STDOUT: %C.3: type = class_type @C, @C(%X) [template] -// CHECK:STDOUT: %GenericAndParams.type.3: type = generic_interface_type @GenericAndParams.2, @C(%X) [template] -// CHECK:STDOUT: %GenericAndParams.3: %GenericAndParams.type.3 = struct_value () [template] -// CHECK:STDOUT: %.12: type = ptr_type %.8 [template] -// CHECK:STDOUT: %.13: type = interface_type @GenericAndParams.2, @GenericAndParams.2(%X, %X) [template] +// CHECK:STDOUT: %GenericAndParams.type.6: type = generic_interface_type @GenericAndParams.2, @C(%X) [template] +// CHECK:STDOUT: %GenericAndParams.3: %GenericAndParams.type.6 = struct_value () [template] +// CHECK:STDOUT: %.5: type = ptr_type %.2 [template] +// CHECK:STDOUT: %GenericAndParams.type.7: type = interface_type @GenericAndParams.2, @GenericAndParams.2(%X, %X) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -93,8 +93,8 @@ interface A(T: type) {} // CHECK:STDOUT: .C = %C.decl // CHECK:STDOUT: .X = %X.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %NotGenericNoParams.decl: type = interface_decl @NotGenericNoParams [template = constants.%.1] {} {} -// CHECK:STDOUT: %NotGenericButParams.decl: %NotGenericButParams.type = interface_decl @NotGenericButParams [template = constants.%NotGenericButParams] {} {} +// CHECK:STDOUT: %NotGenericNoParams.decl: type = interface_decl @NotGenericNoParams [template = constants.%NotGenericNoParams.type] {} {} +// CHECK:STDOUT: %NotGenericButParams.decl: %NotGenericButParams.type.1 = interface_decl @NotGenericButParams [template = constants.%NotGenericButParams] {} {} // CHECK:STDOUT: %GenericAndParams.decl: %GenericAndParams.type.1 = interface_decl @GenericAndParams.1 [template = constants.%GenericAndParams.1] { // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 // CHECK:STDOUT: } { @@ -110,40 +110,40 @@ interface A(T: type) {} // CHECK:STDOUT: %X.decl: type = class_decl @X [template = constants.%X] {} {} // CHECK:STDOUT: impl_decl @impl.1 [template] {} { // CHECK:STDOUT: %X.ref: type = name_ref X, file.%X.decl [template = constants.%X] -// CHECK:STDOUT: %NotGenericNoParams.ref: type = name_ref NotGenericNoParams, file.%NotGenericNoParams.decl [template = constants.%.1] +// CHECK:STDOUT: %NotGenericNoParams.ref: type = name_ref NotGenericNoParams, file.%NotGenericNoParams.decl [template = constants.%NotGenericNoParams.type] // CHECK:STDOUT: } // CHECK:STDOUT: impl_decl @impl.2 [template] {} { // CHECK:STDOUT: %X.ref: type = name_ref X, file.%X.decl [template = constants.%X] -// CHECK:STDOUT: %NotGenericButParams.ref: %NotGenericButParams.type = name_ref NotGenericButParams, file.%NotGenericButParams.decl [template = constants.%NotGenericButParams] -// CHECK:STDOUT: %.loc15_30: type = interface_type @NotGenericButParams [template = constants.%.3] +// CHECK:STDOUT: %NotGenericButParams.ref: %NotGenericButParams.type.1 = name_ref NotGenericButParams, file.%NotGenericButParams.decl [template = constants.%NotGenericButParams] +// CHECK:STDOUT: %NotGenericButParams.type: type = interface_type @NotGenericButParams [template = constants.%NotGenericButParams.type.2] // CHECK:STDOUT: } // CHECK:STDOUT: impl_decl @impl.3 [template] {} { // CHECK:STDOUT: %X.ref.loc16_6: type = name_ref X, file.%X.decl [template = constants.%X] // CHECK:STDOUT: %GenericAndParams.ref: %GenericAndParams.type.1 = name_ref GenericAndParams, file.%GenericAndParams.decl [template = constants.%GenericAndParams.1] // CHECK:STDOUT: %X.ref.loc16_28: type = name_ref X, file.%X.decl [template = constants.%X] -// CHECK:STDOUT: %.loc16_27: type = interface_type @GenericAndParams.1, @GenericAndParams.1(constants.%X) [template = constants.%.11] +// CHECK:STDOUT: %GenericAndParams.type: type = interface_type @GenericAndParams.1, @GenericAndParams.1(constants.%X) [template = constants.%GenericAndParams.type.5] // CHECK:STDOUT: } // CHECK:STDOUT: impl_decl @impl.4 [template] {} { // CHECK:STDOUT: %X.ref.loc17_6: type = name_ref X, file.%X.decl [template = constants.%X] // CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [template = constants.%C.1] // CHECK:STDOUT: %X.ref.loc17_13: type = name_ref X, file.%X.decl [template = constants.%X] // CHECK:STDOUT: %C: type = class_type @C, @C(constants.%X) [template = constants.%C.3] -// CHECK:STDOUT: %GenericNoParams.ref: type = name_ref GenericNoParams, @C.%GenericNoParams.decl [template = constants.%.5] +// CHECK:STDOUT: %GenericNoParams.ref: type = name_ref GenericNoParams, @C.%GenericNoParams.decl [template = constants.%GenericNoParams.type.1] // CHECK:STDOUT: } // CHECK:STDOUT: impl_decl @impl.5 [template] {} { // CHECK:STDOUT: %X.ref.loc18_6: type = name_ref X, file.%X.decl [template = constants.%X] // CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [template = constants.%C.1] // CHECK:STDOUT: %X.ref.loc18_13: type = name_ref X, file.%X.decl [template = constants.%X] // CHECK:STDOUT: %C: type = class_type @C, @C(constants.%X) [template = constants.%C.3] -// CHECK:STDOUT: %.loc18_15: %GenericAndParams.type.3 = specific_constant @C.%GenericAndParams.decl, @C(constants.%X) [template = constants.%GenericAndParams.3] -// CHECK:STDOUT: %GenericAndParams.ref: %GenericAndParams.type.3 = name_ref GenericAndParams, %.loc18_15 [template = constants.%GenericAndParams.3] +// CHECK:STDOUT: %.loc18_15: %GenericAndParams.type.6 = specific_constant @C.%GenericAndParams.decl, @C(constants.%X) [template = constants.%GenericAndParams.3] +// CHECK:STDOUT: %GenericAndParams.ref: %GenericAndParams.type.6 = name_ref GenericAndParams, %.loc18_15 [template = constants.%GenericAndParams.3] // CHECK:STDOUT: %X.ref.loc18_33: type = name_ref X, file.%X.decl [template = constants.%X] -// CHECK:STDOUT: %.loc18_32: type = interface_type @GenericAndParams.2, @GenericAndParams.2(constants.%X, constants.%X) [template = constants.%.13] +// CHECK:STDOUT: %GenericAndParams.type: type = interface_type @GenericAndParams.2, @GenericAndParams.2(constants.%X, constants.%X) [template = constants.%GenericAndParams.type.7] // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @NotGenericNoParams { -// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self, 0 [symbolic = constants.%Self.1] +// CHECK:STDOUT: %Self: %NotGenericNoParams.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self.1] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -151,7 +151,7 @@ interface A(T: type) {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @NotGenericButParams { -// CHECK:STDOUT: %Self: %.3 = bind_symbolic_name Self, 0 [symbolic = constants.%Self.2] +// CHECK:STDOUT: %Self: %NotGenericButParams.type.2 = bind_symbolic_name Self, 0 [symbolic = constants.%Self.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -162,11 +162,11 @@ interface A(T: type) {} // CHECK:STDOUT: %T.1: type = bind_symbolic_name T, 0 [symbolic = %T.1 (constants.%T)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.1: type = interface_type @GenericAndParams.1, @GenericAndParams.1(%T.1) [symbolic = %.1 (constants.%.4)] -// CHECK:STDOUT: %Self.2: %.4 = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self.3)] +// CHECK:STDOUT: %GenericAndParams.type: type = interface_type @GenericAndParams.1, @GenericAndParams.1(%T.1) [symbolic = %GenericAndParams.type (constants.%GenericAndParams.type.2)] +// CHECK:STDOUT: %Self.2: %GenericAndParams.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self.3)] // CHECK:STDOUT: // CHECK:STDOUT: interface { -// CHECK:STDOUT: %Self.1: @GenericAndParams.1.%.1 (%.4) = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self.3)] +// CHECK:STDOUT: %Self.1: @GenericAndParams.1.%GenericAndParams.type (%GenericAndParams.type.2) = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self.3)] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self.1 @@ -177,11 +177,11 @@ interface A(T: type) {} // CHECK:STDOUT: generic interface @GenericNoParams(@C.%T.loc8: type) { // CHECK:STDOUT: !definition: // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T)] -// CHECK:STDOUT: %.1: type = interface_type @GenericNoParams, @GenericNoParams(%T) [symbolic = %.1 (constants.%.6)] -// CHECK:STDOUT: %Self.2: %.6 = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self.4)] +// CHECK:STDOUT: %GenericNoParams.type: type = interface_type @GenericNoParams, @GenericNoParams(%T) [symbolic = %GenericNoParams.type (constants.%GenericNoParams.type.2)] +// CHECK:STDOUT: %Self.2: %GenericNoParams.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self.4)] // CHECK:STDOUT: // CHECK:STDOUT: interface { -// CHECK:STDOUT: %Self.1: @GenericNoParams.%.1 (%.6) = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self.4)] +// CHECK:STDOUT: %Self.1: @GenericNoParams.%GenericNoParams.type (%GenericNoParams.type.2) = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self.4)] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self.1 @@ -194,11 +194,11 @@ interface A(T: type) {} // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T)] -// CHECK:STDOUT: %.1: type = interface_type @GenericAndParams.2, @GenericAndParams.2(%T, %U.1) [symbolic = %.1 (constants.%.7)] -// CHECK:STDOUT: %Self.2: %.7 = bind_symbolic_name Self, 2 [symbolic = %Self.2 (constants.%Self.5)] +// CHECK:STDOUT: %GenericAndParams.type: type = interface_type @GenericAndParams.2, @GenericAndParams.2(%T, %U.1) [symbolic = %GenericAndParams.type (constants.%GenericAndParams.type.4)] +// CHECK:STDOUT: %Self.2: %GenericAndParams.type.4 = bind_symbolic_name Self, 2 [symbolic = %Self.2 (constants.%Self.5)] // CHECK:STDOUT: // CHECK:STDOUT: interface { -// CHECK:STDOUT: %Self.1: @GenericAndParams.2.%.1 (%.7) = bind_symbolic_name Self, 2 [symbolic = %Self.2 (constants.%Self.5)] +// CHECK:STDOUT: %Self.1: @GenericAndParams.2.%GenericAndParams.type (%GenericAndParams.type.4) = bind_symbolic_name Self, 2 [symbolic = %Self.2 (constants.%Self.5)] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self.1 @@ -207,35 +207,35 @@ interface A(T: type) {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.1: %X.ref as %NotGenericNoParams.ref { -// CHECK:STDOUT: %.loc14: = interface_witness () [template = constants.%.10] +// CHECK:STDOUT: %.loc14: = interface_witness () [template = constants.%.4] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: witness = %.loc14 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: impl @impl.2: %X.ref as %.loc15_30 { -// CHECK:STDOUT: %.loc15_33: = interface_witness () [template = constants.%.10] +// CHECK:STDOUT: impl @impl.2: %X.ref as %NotGenericButParams.type { +// CHECK:STDOUT: %.loc15: = interface_witness () [template = constants.%.4] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: witness = %.loc15_33 +// CHECK:STDOUT: witness = %.loc15 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: impl @impl.3: %X.ref.loc16_6 as %.loc16_27 { -// CHECK:STDOUT: %.loc16_31: = interface_witness () [template = constants.%.10] +// CHECK:STDOUT: impl @impl.3: %X.ref.loc16_6 as %GenericAndParams.type { +// CHECK:STDOUT: %.loc16: = interface_witness () [template = constants.%.4] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: witness = %.loc16_31 +// CHECK:STDOUT: witness = %.loc16 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.4: %X.ref.loc17_6 as %GenericNoParams.ref { -// CHECK:STDOUT: %.loc17: = interface_witness () [template = constants.%.10] +// CHECK:STDOUT: %.loc17: = interface_witness () [template = constants.%.4] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: witness = %.loc17 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: impl @impl.5: %X.ref.loc18_6 as %.loc18_32 { -// CHECK:STDOUT: %.loc18_36: = interface_witness () [template = constants.%.10] +// CHECK:STDOUT: impl @impl.5: %X.ref.loc18_6 as %GenericAndParams.type { +// CHECK:STDOUT: %.loc18_36: = interface_witness () [template = constants.%.4] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: witness = %.loc18_36 @@ -245,18 +245,18 @@ interface A(T: type) {} // CHECK:STDOUT: %T.1: type = bind_symbolic_name T, 0 [symbolic = %T.1 (constants.%T)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %GenericAndParams.type: type = generic_interface_type @GenericAndParams.2, @C(%T.1) [symbolic = %GenericAndParams.type (constants.%GenericAndParams.type.2)] -// CHECK:STDOUT: %GenericAndParams: @C.%GenericAndParams.type (%GenericAndParams.type.2) = struct_value () [symbolic = %GenericAndParams (constants.%GenericAndParams.2)] +// CHECK:STDOUT: %GenericAndParams.type: type = generic_interface_type @GenericAndParams.2, @C(%T.1) [symbolic = %GenericAndParams.type (constants.%GenericAndParams.type.3)] +// CHECK:STDOUT: %GenericAndParams: @C.%GenericAndParams.type (%GenericAndParams.type.3) = struct_value () [symbolic = %GenericAndParams (constants.%GenericAndParams.2)] // CHECK:STDOUT: // CHECK:STDOUT: class { -// CHECK:STDOUT: %GenericNoParams.decl: type = interface_decl @GenericNoParams [template = constants.%.5] {} {} -// CHECK:STDOUT: %GenericAndParams.decl: @C.%GenericAndParams.type (%GenericAndParams.type.2) = interface_decl @GenericAndParams.2 [symbolic = @C.%GenericAndParams (constants.%GenericAndParams.2)] { +// CHECK:STDOUT: %GenericNoParams.decl: type = interface_decl @GenericNoParams [template = constants.%GenericNoParams.type.1] {} {} +// CHECK:STDOUT: %GenericAndParams.decl: @C.%GenericAndParams.type (%GenericAndParams.type.3) = interface_decl @GenericAndParams.2 [symbolic = @C.%GenericAndParams (constants.%GenericAndParams.2)] { // CHECK:STDOUT: %U.patt: type = symbolic_binding_pattern U, 1 // CHECK:STDOUT: } { // CHECK:STDOUT: %U.param: type = param U, runtime_param // CHECK:STDOUT: %U.loc10: type = bind_symbolic_name U, 1, %U.param [symbolic = %U.1 (constants.%U)] // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc11: = complete_type_witness %.8 [template = constants.%.9] +// CHECK:STDOUT: %.loc11: = complete_type_witness %.2 [template = constants.%.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C.2 @@ -266,7 +266,7 @@ interface A(T: type) {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @X { -// CHECK:STDOUT: %.loc13: = complete_type_witness %.8 [template = constants.%.9] +// CHECK:STDOUT: %.loc13: = complete_type_witness %.2 [template = constants.%.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%X @@ -304,7 +304,7 @@ interface A(T: type) {} // CHECK:STDOUT: %T.1 => constants.%X // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.1 => constants.%.11 +// CHECK:STDOUT: %GenericAndParams.type => constants.%GenericAndParams.type.5 // CHECK:STDOUT: %Self.2 => constants.%Self.3 // CHECK:STDOUT: } // CHECK:STDOUT: @@ -312,7 +312,7 @@ interface A(T: type) {} // CHECK:STDOUT: %T.1 => constants.%X // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %GenericAndParams.type => constants.%GenericAndParams.type.3 +// CHECK:STDOUT: %GenericAndParams.type => constants.%GenericAndParams.type.6 // CHECK:STDOUT: %GenericAndParams => constants.%GenericAndParams.3 // CHECK:STDOUT: } // CHECK:STDOUT: @@ -321,25 +321,25 @@ interface A(T: type) {} // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %T => constants.%X -// CHECK:STDOUT: %.1 => constants.%.13 +// CHECK:STDOUT: %GenericAndParams.type => constants.%GenericAndParams.type.7 // CHECK:STDOUT: %Self.2 => constants.%Self.5 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- fail_non_generic_implicit_params.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %A.type: type = generic_interface_type @A [template] +// CHECK:STDOUT: %A.type.1: type = generic_interface_type @A [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %A: %A.type = struct_value () [template] -// CHECK:STDOUT: %.2: type = interface_type @A [template] -// CHECK:STDOUT: %Self: %.2 = bind_symbolic_name Self, 0 [symbolic] +// CHECK:STDOUT: %A: %A.type.1 = struct_value () [template] +// CHECK:STDOUT: %A.type.2: type = interface_type @A [template] +// CHECK:STDOUT: %Self: %A.type.2 = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: package: = namespace [template] { // CHECK:STDOUT: .A = %A.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %A.decl: %A.type = interface_decl @A [template = constants.%A] { +// CHECK:STDOUT: %A.decl: %A.type.1 = interface_decl @A [template = constants.%A] { // CHECK:STDOUT: %T.patt: type = binding_pattern T // CHECK:STDOUT: } { // CHECK:STDOUT: %T.param: type = param T, runtime_param @@ -348,7 +348,7 @@ interface A(T: type) {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @A { -// CHECK:STDOUT: %Self: %.2 = bind_symbolic_name Self, 0 [symbolic = constants.%Self] +// CHECK:STDOUT: %Self: %A.type.2 = bind_symbolic_name Self, 0 [symbolic = constants.%Self] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -358,18 +358,18 @@ interface A(T: type) {} // CHECK:STDOUT: --- fail_non_generic_params.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %A.type: type = generic_interface_type @A [template] +// CHECK:STDOUT: %A.type.1: type = generic_interface_type @A [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %A: %A.type = struct_value () [template] -// CHECK:STDOUT: %.2: type = interface_type @A [template] -// CHECK:STDOUT: %Self: %.2 = bind_symbolic_name Self, 0 [symbolic] +// CHECK:STDOUT: %A: %A.type.1 = struct_value () [template] +// CHECK:STDOUT: %A.type.2: type = interface_type @A [template] +// CHECK:STDOUT: %Self: %A.type.2 = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: package: = namespace [template] { // CHECK:STDOUT: .A = %A.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %A.decl: %A.type = interface_decl @A [template = constants.%A] { +// CHECK:STDOUT: %A.decl: %A.type.1 = interface_decl @A [template = constants.%A] { // CHECK:STDOUT: %T.patt: type = binding_pattern T // CHECK:STDOUT: } { // CHECK:STDOUT: %T.param: type = param T, runtime_param @@ -378,7 +378,7 @@ interface A(T: type) {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @A { -// CHECK:STDOUT: %Self: %.2 = bind_symbolic_name Self, 0 [symbolic = constants.%Self] +// CHECK:STDOUT: %Self: %A.type.2 = bind_symbolic_name Self, 0 [symbolic = constants.%Self] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self diff --git a/toolchain/check/testdata/interface/no_prelude/import.carbon b/toolchain/check/testdata/interface/no_prelude/import.carbon index 98c1ddd05f042..39fcf7ce1c6bc 100644 --- a/toolchain/check/testdata/interface/no_prelude/import.carbon +++ b/toolchain/check/testdata/interface/no_prelude/import.carbon @@ -51,27 +51,27 @@ var f: ForwardDeclared* = &f_ref.f; // CHECK:STDOUT: --- a.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: type = interface_type @Empty [template] -// CHECK:STDOUT: %Self.1: %.1 = bind_symbolic_name Self, 0 [symbolic] -// CHECK:STDOUT: %.2: type = interface_type @Basic [template] -// CHECK:STDOUT: %Self.2: %.2 = bind_symbolic_name Self, 0 [symbolic] -// CHECK:STDOUT: %.3: type = assoc_entity_type %.2, type [template] -// CHECK:STDOUT: %.4: %.3 = assoc_entity element0, @Basic.%T [template] +// CHECK:STDOUT: %Empty.type: type = interface_type @Empty [template] +// CHECK:STDOUT: %Self.1: %Empty.type = bind_symbolic_name Self, 0 [symbolic] +// CHECK:STDOUT: %Basic.type: type = interface_type @Basic [template] +// CHECK:STDOUT: %Self.2: %Basic.type = bind_symbolic_name Self, 0 [symbolic] +// CHECK:STDOUT: %.1: type = assoc_entity_type %Basic.type, type [template] +// CHECK:STDOUT: %.2: %.1 = assoc_entity element0, @Basic.%T [template] // CHECK:STDOUT: %F.type.1: type = fn_type @F.1 [template] -// CHECK:STDOUT: %.5: type = tuple_type () [template] +// CHECK:STDOUT: %.3: type = tuple_type () [template] // CHECK:STDOUT: %F.1: %F.type.1 = struct_value () [template] -// CHECK:STDOUT: %.6: type = assoc_entity_type %.2, %F.type.1 [template] -// CHECK:STDOUT: %.7: %.6 = assoc_entity element1, @Basic.%F.decl [template] -// CHECK:STDOUT: %.8: type = interface_type @ForwardDeclared [template] -// CHECK:STDOUT: %Self.3: %.8 = bind_symbolic_name Self, 0 [symbolic] -// CHECK:STDOUT: %.9: type = assoc_entity_type %.8, type [template] -// CHECK:STDOUT: %.10: %.9 = assoc_entity element0, @ForwardDeclared.%T [template] +// CHECK:STDOUT: %.4: type = assoc_entity_type %Basic.type, %F.type.1 [template] +// CHECK:STDOUT: %.5: %.4 = assoc_entity element1, @Basic.%F.decl [template] +// CHECK:STDOUT: %ForwardDeclared.type: type = interface_type @ForwardDeclared [template] +// CHECK:STDOUT: %Self.3: %ForwardDeclared.type = bind_symbolic_name Self, 0 [symbolic] +// CHECK:STDOUT: %.6: type = assoc_entity_type %ForwardDeclared.type, type [template] +// CHECK:STDOUT: %.7: %.6 = assoc_entity element0, @ForwardDeclared.%T [template] // CHECK:STDOUT: %F.type.2: type = fn_type @F.2 [template] // CHECK:STDOUT: %F.2: %F.type.2 = struct_value () [template] -// CHECK:STDOUT: %.11: type = assoc_entity_type %.8, %F.type.2 [template] -// CHECK:STDOUT: %.12: %.11 = assoc_entity element1, @ForwardDeclared.%F.decl [template] -// CHECK:STDOUT: %.13: type = struct_type {.f: %.8} [template] -// CHECK:STDOUT: %.14: type = struct_type {.f: %.5} [template] +// CHECK:STDOUT: %.8: type = assoc_entity_type %ForwardDeclared.type, %F.type.2 [template] +// CHECK:STDOUT: %.9: %.8 = assoc_entity element1, @ForwardDeclared.%F.decl [template] +// CHECK:STDOUT: %.10: type = struct_type {.f: %ForwardDeclared.type} [template] +// CHECK:STDOUT: %.11: type = struct_type {.f: %.3} [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -81,17 +81,17 @@ var f: ForwardDeclared* = &f_ref.f; // CHECK:STDOUT: .ForwardDeclared = %ForwardDeclared.decl // CHECK:STDOUT: .f_ref = %f_ref // CHECK:STDOUT: } -// CHECK:STDOUT: %Empty.decl: type = interface_decl @Empty [template = constants.%.1] {} {} -// CHECK:STDOUT: %Basic.decl: type = interface_decl @Basic [template = constants.%.2] {} {} -// CHECK:STDOUT: %ForwardDeclared.decl: type = interface_decl @ForwardDeclared [template = constants.%.8] {} {} -// CHECK:STDOUT: %ForwardDeclared.ref: type = name_ref ForwardDeclared, %ForwardDeclared.decl [template = constants.%.8] -// CHECK:STDOUT: %.loc20: type = struct_type {.f: %.8} [template = constants.%.13] -// CHECK:STDOUT: %f_ref.var: ref %.13 = var f_ref -// CHECK:STDOUT: %f_ref: ref %.13 = bind_name f_ref, %f_ref.var +// CHECK:STDOUT: %Empty.decl: type = interface_decl @Empty [template = constants.%Empty.type] {} {} +// CHECK:STDOUT: %Basic.decl: type = interface_decl @Basic [template = constants.%Basic.type] {} {} +// CHECK:STDOUT: %ForwardDeclared.decl: type = interface_decl @ForwardDeclared [template = constants.%ForwardDeclared.type] {} {} +// CHECK:STDOUT: %ForwardDeclared.ref: type = name_ref ForwardDeclared, %ForwardDeclared.decl [template = constants.%ForwardDeclared.type] +// CHECK:STDOUT: %.loc20: type = struct_type {.f: %ForwardDeclared.type} [template = constants.%.10] +// CHECK:STDOUT: %f_ref.var: ref %.10 = var f_ref +// CHECK:STDOUT: %f_ref: ref %.10 = bind_name f_ref, %f_ref.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @Empty { -// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self, 0 [symbolic = constants.%Self.1] +// CHECK:STDOUT: %Self: %Empty.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self.1] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -99,11 +99,11 @@ var f: ForwardDeclared* = &f_ref.f; // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @Basic { -// CHECK:STDOUT: %Self: %.2 = bind_symbolic_name Self, 0 [symbolic = constants.%Self.2] +// CHECK:STDOUT: %Self: %Basic.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self.2] // CHECK:STDOUT: %T: type = assoc_const_decl T [template] -// CHECK:STDOUT: %.loc8: %.3 = assoc_entity element0, %T [template = constants.%.4] +// CHECK:STDOUT: %.loc8: %.1 = assoc_entity element0, %T [template = constants.%.2] // CHECK:STDOUT: %F.decl: %F.type.1 = fn_decl @F.1 [template = constants.%F.1] {} {} -// CHECK:STDOUT: %.loc9: %.6 = assoc_entity element1, %F.decl [template = constants.%.7] +// CHECK:STDOUT: %.loc9: %.4 = assoc_entity element1, %F.decl [template = constants.%.5] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -113,11 +113,11 @@ var f: ForwardDeclared* = &f_ref.f; // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @ForwardDeclared { -// CHECK:STDOUT: %Self: %.8 = bind_symbolic_name Self, 0 [symbolic = constants.%Self.3] +// CHECK:STDOUT: %Self: %ForwardDeclared.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self.3] // CHECK:STDOUT: %T: type = assoc_const_decl T [template] -// CHECK:STDOUT: %.loc16: %.9 = assoc_entity element0, %T [template = constants.%.10] +// CHECK:STDOUT: %.loc16: %.6 = assoc_entity element0, %T [template = constants.%.7] // CHECK:STDOUT: %F.decl: %F.type.2 = fn_decl @F.2 [template = constants.%F.2] {} {} -// CHECK:STDOUT: %.loc17: %.11 = assoc_entity element1, %F.decl [template = constants.%.12] +// CHECK:STDOUT: %.loc17: %.8 = assoc_entity element1, %F.decl [template = constants.%.9] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -126,12 +126,12 @@ var f: ForwardDeclared* = &f_ref.f; // CHECK:STDOUT: witness = (%T, %F.decl) // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @F.1(@Basic.%Self: %.2) { +// CHECK:STDOUT: generic fn @F.1(@Basic.%Self: %Basic.type) { // CHECK:STDOUT: // CHECK:STDOUT: fn(); // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @F.2(@ForwardDeclared.%Self: %.8) { +// CHECK:STDOUT: generic fn @F.2(@ForwardDeclared.%Self: %ForwardDeclared.type) { // CHECK:STDOUT: // CHECK:STDOUT: fn(); // CHECK:STDOUT: } @@ -143,50 +143,50 @@ var f: ForwardDeclared* = &f_ref.f; // CHECK:STDOUT: --- b.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: type = interface_type @Empty [template] -// CHECK:STDOUT: %Self.1: %.1 = bind_symbolic_name Self, 0 [symbolic] +// CHECK:STDOUT: %Empty.type: type = interface_type @Empty [template] +// CHECK:STDOUT: %Self.1: %Empty.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %UseEmpty.type: type = fn_type @UseEmpty [template] -// CHECK:STDOUT: %.2: type = tuple_type () [template] +// CHECK:STDOUT: %.1: type = tuple_type () [template] // CHECK:STDOUT: %UseEmpty: %UseEmpty.type = struct_value () [template] -// CHECK:STDOUT: %.3: type = interface_type @Basic [template] -// CHECK:STDOUT: %Self.2: %.3 = bind_symbolic_name Self, 0 [symbolic] +// CHECK:STDOUT: %Basic.type: type = interface_type @Basic [template] +// CHECK:STDOUT: %Self.2: %Basic.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %UseBasic.type: type = fn_type @UseBasic [template] // CHECK:STDOUT: %UseBasic: %UseBasic.type = struct_value () [template] -// CHECK:STDOUT: %.4: type = interface_type @ForwardDeclared [template] -// CHECK:STDOUT: %Self.3: %.4 = bind_symbolic_name Self, 0 [symbolic] +// CHECK:STDOUT: %ForwardDeclared.type: type = interface_type @ForwardDeclared [template] +// CHECK:STDOUT: %Self.3: %ForwardDeclared.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %UseForwardDeclared.type: type = fn_type @UseForwardDeclared [template] // CHECK:STDOUT: %UseForwardDeclared: %UseForwardDeclared.type = struct_value () [template] -// CHECK:STDOUT: %.5: type = assoc_entity_type %.3, type [template] -// CHECK:STDOUT: %.6: %.5 = assoc_entity element0, imports.%import_ref.16 [template] +// CHECK:STDOUT: %.2: type = assoc_entity_type %Basic.type, type [template] +// CHECK:STDOUT: %.3: %.2 = assoc_entity element0, imports.%import_ref.16 [template] // CHECK:STDOUT: %F.type.1: type = fn_type @F.1 [template] // CHECK:STDOUT: %F.1: %F.type.1 = struct_value () [template] -// CHECK:STDOUT: %.7: type = assoc_entity_type %.3, %F.type.1 [template] -// CHECK:STDOUT: %.8: %.7 = assoc_entity element1, imports.%import_ref.17 [template] -// CHECK:STDOUT: %.9: type = assoc_entity_type %.4, type [template] -// CHECK:STDOUT: %.10: %.9 = assoc_entity element0, imports.%import_ref.18 [template] +// CHECK:STDOUT: %.4: type = assoc_entity_type %Basic.type, %F.type.1 [template] +// CHECK:STDOUT: %.5: %.4 = assoc_entity element1, imports.%import_ref.17 [template] +// CHECK:STDOUT: %.6: type = assoc_entity_type %ForwardDeclared.type, type [template] +// CHECK:STDOUT: %.7: %.6 = assoc_entity element0, imports.%import_ref.18 [template] // CHECK:STDOUT: %F.type.2: type = fn_type @F.2 [template] // CHECK:STDOUT: %F.2: %F.type.2 = struct_value () [template] -// CHECK:STDOUT: %.11: type = assoc_entity_type %.4, %F.type.2 [template] -// CHECK:STDOUT: %.12: %.11 = assoc_entity element1, imports.%import_ref.19 [template] -// CHECK:STDOUT: %.13: type = ptr_type %.4 [template] -// CHECK:STDOUT: %.14: type = struct_type {.f: %.4} [template] -// CHECK:STDOUT: %.15: type = struct_type {.f: %.2} [template] +// CHECK:STDOUT: %.8: type = assoc_entity_type %ForwardDeclared.type, %F.type.2 [template] +// CHECK:STDOUT: %.9: %.8 = assoc_entity element1, imports.%import_ref.19 [template] +// CHECK:STDOUT: %.10: type = ptr_type %ForwardDeclared.type [template] +// CHECK:STDOUT: %.11: type = struct_type {.f: %ForwardDeclared.type} [template] +// CHECK:STDOUT: %.12: type = struct_type {.f: %.1} [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { -// CHECK:STDOUT: %import_ref.1: type = import_ref Main//a, inst+1, loaded [template = constants.%.1] -// CHECK:STDOUT: %import_ref.2: type = import_ref Main//a, inst+5, loaded [template = constants.%.3] -// CHECK:STDOUT: %import_ref.3: type = import_ref Main//a, inst+20, loaded [template = constants.%.4] -// CHECK:STDOUT: %import_ref.4: ref %.14 = import_ref Main//a, inst+42, loaded +// CHECK:STDOUT: %import_ref.1: type = import_ref Main//a, inst+1, loaded [template = constants.%Empty.type] +// CHECK:STDOUT: %import_ref.2: type = import_ref Main//a, inst+5, loaded [template = constants.%Basic.type] +// CHECK:STDOUT: %import_ref.3: type = import_ref Main//a, inst+20, loaded [template = constants.%ForwardDeclared.type] +// CHECK:STDOUT: %import_ref.4: ref %.11 = import_ref Main//a, inst+42, loaded // CHECK:STDOUT: %import_ref.5 = import_ref Main//a, inst+3, unloaded // CHECK:STDOUT: %import_ref.6 = import_ref Main//a, inst+7, unloaded -// CHECK:STDOUT: %import_ref.7: %.5 = import_ref Main//a, inst+11, loaded [template = constants.%.6] -// CHECK:STDOUT: %import_ref.8: %.7 = import_ref Main//a, inst+18, loaded [template = constants.%.8] +// CHECK:STDOUT: %import_ref.7: %.2 = import_ref Main//a, inst+11, loaded [template = constants.%.3] +// CHECK:STDOUT: %import_ref.8: %.4 = import_ref Main//a, inst+18, loaded [template = constants.%.5] // CHECK:STDOUT: %import_ref.9 = import_ref Main//a, inst+9, unloaded // CHECK:STDOUT: %import_ref.10 = import_ref Main//a, inst+13, unloaded // CHECK:STDOUT: %import_ref.11 = import_ref Main//a, inst+22, unloaded -// CHECK:STDOUT: %import_ref.12: %.9 = import_ref Main//a, inst+26, loaded [template = constants.%.10] -// CHECK:STDOUT: %import_ref.13: %.11 = import_ref Main//a, inst+32, loaded [template = constants.%.12] +// CHECK:STDOUT: %import_ref.12: %.6 = import_ref Main//a, inst+26, loaded [template = constants.%.7] +// CHECK:STDOUT: %import_ref.13: %.8 = import_ref Main//a, inst+32, loaded [template = constants.%.9] // CHECK:STDOUT: %import_ref.14 = import_ref Main//a, inst+24, unloaded // CHECK:STDOUT: %import_ref.15 = import_ref Main//a, inst+28, unloaded // CHECK:STDOUT: %import_ref.16 = import_ref Main//a, inst+9, unloaded @@ -212,42 +212,42 @@ var f: ForwardDeclared* = &f_ref.f; // CHECK:STDOUT: } // CHECK:STDOUT: %default.import = import // CHECK:STDOUT: %UseEmpty.decl: %UseEmpty.type = fn_decl @UseEmpty [template = constants.%UseEmpty] { -// CHECK:STDOUT: %e.patt: %.1 = binding_pattern e +// CHECK:STDOUT: %e.patt: %Empty.type = binding_pattern e // CHECK:STDOUT: } { -// CHECK:STDOUT: %Empty.ref: type = name_ref Empty, imports.%import_ref.1 [template = constants.%.1] -// CHECK:STDOUT: %e.param: %.1 = param e, runtime_param0 -// CHECK:STDOUT: %e: %.1 = bind_name e, %e.param +// CHECK:STDOUT: %Empty.ref: type = name_ref Empty, imports.%import_ref.1 [template = constants.%Empty.type] +// CHECK:STDOUT: %e.param: %Empty.type = param e, runtime_param0 +// CHECK:STDOUT: %e: %Empty.type = bind_name e, %e.param // CHECK:STDOUT: } // CHECK:STDOUT: %UseBasic.decl: %UseBasic.type = fn_decl @UseBasic [template = constants.%UseBasic] { -// CHECK:STDOUT: %e.patt: %.3 = binding_pattern e +// CHECK:STDOUT: %e.patt: %Basic.type = binding_pattern e // CHECK:STDOUT: } { -// CHECK:STDOUT: %Basic.ref: type = name_ref Basic, imports.%import_ref.2 [template = constants.%.3] -// CHECK:STDOUT: %e.param: %.3 = param e, runtime_param0 -// CHECK:STDOUT: %e: %.3 = bind_name e, %e.param +// CHECK:STDOUT: %Basic.ref: type = name_ref Basic, imports.%import_ref.2 [template = constants.%Basic.type] +// CHECK:STDOUT: %e.param: %Basic.type = param e, runtime_param0 +// CHECK:STDOUT: %e: %Basic.type = bind_name e, %e.param // CHECK:STDOUT: } // CHECK:STDOUT: %UseForwardDeclared.decl: %UseForwardDeclared.type = fn_decl @UseForwardDeclared [template = constants.%UseForwardDeclared] { -// CHECK:STDOUT: %f.patt: %.4 = binding_pattern f +// CHECK:STDOUT: %f.patt: %ForwardDeclared.type = binding_pattern f // CHECK:STDOUT: } { -// CHECK:STDOUT: %ForwardDeclared.ref: type = name_ref ForwardDeclared, imports.%import_ref.3 [template = constants.%.4] -// CHECK:STDOUT: %f.param: %.4 = param f, runtime_param0 -// CHECK:STDOUT: %f: %.4 = bind_name f, %f.param +// CHECK:STDOUT: %ForwardDeclared.ref: type = name_ref ForwardDeclared, imports.%import_ref.3 [template = constants.%ForwardDeclared.type] +// CHECK:STDOUT: %f.param: %ForwardDeclared.type = param f, runtime_param0 +// CHECK:STDOUT: %f: %ForwardDeclared.type = bind_name f, %f.param // CHECK:STDOUT: } -// CHECK:STDOUT: %Basic.ref.loc10: type = name_ref Basic, imports.%import_ref.2 [template = constants.%.3] -// CHECK:STDOUT: %T.ref.loc10: %.5 = name_ref T, imports.%import_ref.7 [template = constants.%.6] -// CHECK:STDOUT: %UseBasicT: %.5 = bind_alias UseBasicT, imports.%import_ref.7 [template = constants.%.6] -// CHECK:STDOUT: %Basic.ref.loc11: type = name_ref Basic, imports.%import_ref.2 [template = constants.%.3] -// CHECK:STDOUT: %F.ref.loc11: %.7 = name_ref F, imports.%import_ref.8 [template = constants.%.8] -// CHECK:STDOUT: %UseBasicF: %.7 = bind_alias UseBasicF, imports.%import_ref.8 [template = constants.%.8] -// CHECK:STDOUT: %ForwardDeclared.ref.loc13: type = name_ref ForwardDeclared, imports.%import_ref.3 [template = constants.%.4] -// CHECK:STDOUT: %T.ref.loc13: %.9 = name_ref T, imports.%import_ref.12 [template = constants.%.10] -// CHECK:STDOUT: %UseForwardDeclaredT: %.9 = bind_alias UseForwardDeclaredT, imports.%import_ref.12 [template = constants.%.10] -// CHECK:STDOUT: %ForwardDeclared.ref.loc14: type = name_ref ForwardDeclared, imports.%import_ref.3 [template = constants.%.4] -// CHECK:STDOUT: %F.ref.loc14: %.11 = name_ref F, imports.%import_ref.13 [template = constants.%.12] -// CHECK:STDOUT: %UseForwardDeclaredF: %.11 = bind_alias UseForwardDeclaredF, imports.%import_ref.13 [template = constants.%.12] -// CHECK:STDOUT: %ForwardDeclared.ref.loc16: type = name_ref ForwardDeclared, imports.%import_ref.3 [template = constants.%.4] -// CHECK:STDOUT: %.loc16: type = ptr_type %.4 [template = constants.%.13] -// CHECK:STDOUT: %f.var: ref %.13 = var f -// CHECK:STDOUT: %f: ref %.13 = bind_name f, %f.var +// CHECK:STDOUT: %Basic.ref.loc10: type = name_ref Basic, imports.%import_ref.2 [template = constants.%Basic.type] +// CHECK:STDOUT: %T.ref.loc10: %.2 = name_ref T, imports.%import_ref.7 [template = constants.%.3] +// CHECK:STDOUT: %UseBasicT: %.2 = bind_alias UseBasicT, imports.%import_ref.7 [template = constants.%.3] +// CHECK:STDOUT: %Basic.ref.loc11: type = name_ref Basic, imports.%import_ref.2 [template = constants.%Basic.type] +// CHECK:STDOUT: %F.ref.loc11: %.4 = name_ref F, imports.%import_ref.8 [template = constants.%.5] +// CHECK:STDOUT: %UseBasicF: %.4 = bind_alias UseBasicF, imports.%import_ref.8 [template = constants.%.5] +// CHECK:STDOUT: %ForwardDeclared.ref.loc13: type = name_ref ForwardDeclared, imports.%import_ref.3 [template = constants.%ForwardDeclared.type] +// CHECK:STDOUT: %T.ref.loc13: %.6 = name_ref T, imports.%import_ref.12 [template = constants.%.7] +// CHECK:STDOUT: %UseForwardDeclaredT: %.6 = bind_alias UseForwardDeclaredT, imports.%import_ref.12 [template = constants.%.7] +// CHECK:STDOUT: %ForwardDeclared.ref.loc14: type = name_ref ForwardDeclared, imports.%import_ref.3 [template = constants.%ForwardDeclared.type] +// CHECK:STDOUT: %F.ref.loc14: %.8 = name_ref F, imports.%import_ref.13 [template = constants.%.9] +// CHECK:STDOUT: %UseForwardDeclaredF: %.8 = bind_alias UseForwardDeclaredF, imports.%import_ref.13 [template = constants.%.9] +// CHECK:STDOUT: %ForwardDeclared.ref.loc16: type = name_ref ForwardDeclared, imports.%import_ref.3 [template = constants.%ForwardDeclared.type] +// CHECK:STDOUT: %.loc16: type = ptr_type %ForwardDeclared.type [template = constants.%.10] +// CHECK:STDOUT: %f.var: ref %.10 = var f +// CHECK:STDOUT: %f: ref %.10 = bind_name f, %f.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @Empty { @@ -272,36 +272,36 @@ var f: ForwardDeclared* = &f_ref.f; // CHECK:STDOUT: witness = (imports.%import_ref.14, imports.%import_ref.15) // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @UseEmpty(%e: %.1) { +// CHECK:STDOUT: fn @UseEmpty(%e: %Empty.type) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @UseBasic(%e: %.3) { +// CHECK:STDOUT: fn @UseBasic(%e: %Basic.type) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @UseForwardDeclared(%f: %.4) { +// CHECK:STDOUT: fn @UseForwardDeclared(%f: %ForwardDeclared.type) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @F.1(constants.%Self.2: %.3) { +// CHECK:STDOUT: generic fn @F.1(constants.%Self.2: %Basic.type) { // CHECK:STDOUT: // CHECK:STDOUT: fn(); // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @F.2(constants.%Self.3: %.4) { +// CHECK:STDOUT: generic fn @F.2(constants.%Self.3: %ForwardDeclared.type) { // CHECK:STDOUT: // CHECK:STDOUT: fn(); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %f_ref.ref: ref %.14 = name_ref f_ref, imports.%import_ref.4 -// CHECK:STDOUT: %.loc16_33: ref %.4 = struct_access %f_ref.ref, element0 -// CHECK:STDOUT: %.loc16_27: %.13 = addr_of %.loc16_33 +// CHECK:STDOUT: %f_ref.ref: ref %.11 = name_ref f_ref, imports.%import_ref.4 +// CHECK:STDOUT: %.loc16_33: ref %ForwardDeclared.type = struct_access %f_ref.ref, element0 +// CHECK:STDOUT: %.loc16_27: %.10 = addr_of %.loc16_33 // CHECK:STDOUT: assign file.%f.var, %.loc16_27 // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/interface/no_prelude/import_access.carbon b/toolchain/check/testdata/interface/no_prelude/import_access.carbon index 0a8e4434fc2c6..c84b596b1cc10 100644 --- a/toolchain/check/testdata/interface/no_prelude/import_access.carbon +++ b/toolchain/check/testdata/interface/no_prelude/import_access.carbon @@ -143,19 +143,19 @@ private interface Redecl {} // CHECK:STDOUT: --- def.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: type = interface_type @Def [template] -// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self, 0 [symbolic] +// CHECK:STDOUT: %Def.type: type = interface_type @Def [template] +// CHECK:STDOUT: %Self: %Def.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: package: = namespace [template] { // CHECK:STDOUT: .Def [private] = %Def.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %Def.decl: type = interface_decl @Def [template = constants.%.1] {} {} +// CHECK:STDOUT: %Def.decl: type = interface_decl @Def [template = constants.%Def.type] {} {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @Def { -// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self, 0 [symbolic = constants.%Self] +// CHECK:STDOUT: %Self: %Def.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -165,20 +165,20 @@ private interface Redecl {} // CHECK:STDOUT: --- forward_with_def.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: type = interface_type @ForwardWithDef [template] -// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self, 0 [symbolic] +// CHECK:STDOUT: %ForwardWithDef.type: type = interface_type @ForwardWithDef [template] +// CHECK:STDOUT: %Self: %ForwardWithDef.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: package: = namespace [template] { // CHECK:STDOUT: .ForwardWithDef [private] = %ForwardWithDef.decl.loc4 // CHECK:STDOUT: } -// CHECK:STDOUT: %ForwardWithDef.decl.loc4: type = interface_decl @ForwardWithDef [template = constants.%.1] {} {} -// CHECK:STDOUT: %ForwardWithDef.decl.loc6: type = interface_decl @ForwardWithDef [template = constants.%.1] {} {} +// CHECK:STDOUT: %ForwardWithDef.decl.loc4: type = interface_decl @ForwardWithDef [template = constants.%ForwardWithDef.type] {} {} +// CHECK:STDOUT: %ForwardWithDef.decl.loc6: type = interface_decl @ForwardWithDef [template = constants.%ForwardWithDef.type] {} {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @ForwardWithDef { -// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self, 0 [symbolic = constants.%Self] +// CHECK:STDOUT: %Self: %ForwardWithDef.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -194,15 +194,15 @@ private interface Redecl {} // CHECK:STDOUT: --- def.impl.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: type = interface_type @Def [template] -// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self, 0 [symbolic] +// CHECK:STDOUT: %Def.type: type = interface_type @Def [template] +// CHECK:STDOUT: %Self: %Def.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %.2: type = tuple_type () [template] +// CHECK:STDOUT: %.1: type = tuple_type () [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { -// CHECK:STDOUT: %import_ref.1: type = import_ref Test//def, inst+1, loaded [template = constants.%.1] +// CHECK:STDOUT: %import_ref.1: type = import_ref Test//def, inst+1, loaded [template = constants.%Def.type] // CHECK:STDOUT: %import_ref.2 = import_ref Test//def, inst+3, unloaded // CHECK:STDOUT: } // CHECK:STDOUT: @@ -214,11 +214,11 @@ private interface Redecl {} // CHECK:STDOUT: %Test.import = import Test // CHECK:STDOUT: %default.import = import // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { -// CHECK:STDOUT: %i.patt: %.1 = binding_pattern i +// CHECK:STDOUT: %i.patt: %Def.type = binding_pattern i // CHECK:STDOUT: } { -// CHECK:STDOUT: %Def.ref: type = name_ref Def, imports.%import_ref.1 [template = constants.%.1] -// CHECK:STDOUT: %i.param: %.1 = param i, runtime_param0 -// CHECK:STDOUT: %i: %.1 = bind_name i, %i.param +// CHECK:STDOUT: %Def.ref: type = name_ref Def, imports.%import_ref.1 [template = constants.%Def.type] +// CHECK:STDOUT: %i.param: %Def.type = param i, runtime_param0 +// CHECK:STDOUT: %i: %Def.type = bind_name i, %i.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -228,7 +228,7 @@ private interface Redecl {} // CHECK:STDOUT: witness = () // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @F(%i: %.1) { +// CHECK:STDOUT: fn @F(%i: %Def.type) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -298,15 +298,15 @@ private interface Redecl {} // CHECK:STDOUT: --- forward_with_def.impl.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: type = interface_type @ForwardWithDef [template] -// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self, 0 [symbolic] +// CHECK:STDOUT: %ForwardWithDef.type: type = interface_type @ForwardWithDef [template] +// CHECK:STDOUT: %Self: %ForwardWithDef.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %.2: type = tuple_type () [template] +// CHECK:STDOUT: %.1: type = tuple_type () [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { -// CHECK:STDOUT: %import_ref.1: type = import_ref Test//forward_with_def, inst+1, loaded [template = constants.%.1] +// CHECK:STDOUT: %import_ref.1: type = import_ref Test//forward_with_def, inst+1, loaded [template = constants.%ForwardWithDef.type] // CHECK:STDOUT: %import_ref.2 = import_ref Test//forward_with_def, inst+4, unloaded // CHECK:STDOUT: } // CHECK:STDOUT: @@ -318,11 +318,11 @@ private interface Redecl {} // CHECK:STDOUT: %Test.import = import Test // CHECK:STDOUT: %default.import = import // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { -// CHECK:STDOUT: %i.patt: %.1 = binding_pattern i +// CHECK:STDOUT: %i.patt: %ForwardWithDef.type = binding_pattern i // CHECK:STDOUT: } { -// CHECK:STDOUT: %ForwardWithDef.ref: type = name_ref ForwardWithDef, imports.%import_ref.1 [template = constants.%.1] -// CHECK:STDOUT: %i.param: %.1 = param i, runtime_param0 -// CHECK:STDOUT: %i: %.1 = bind_name i, %i.param +// CHECK:STDOUT: %ForwardWithDef.ref: type = name_ref ForwardWithDef, imports.%import_ref.1 [template = constants.%ForwardWithDef.type] +// CHECK:STDOUT: %i.param: %ForwardWithDef.type = param i, runtime_param0 +// CHECK:STDOUT: %i: %ForwardWithDef.type = bind_name i, %i.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -332,7 +332,7 @@ private interface Redecl {} // CHECK:STDOUT: witness = () // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @F(%i: %.1) { +// CHECK:STDOUT: fn @F(%i: %ForwardWithDef.type) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -405,8 +405,8 @@ private interface Redecl {} // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.2: type = interface_type @Forward [template] -// CHECK:STDOUT: %Self: %.2 = bind_symbolic_name Self, 0 [symbolic] +// CHECK:STDOUT: %Forward.type: type = interface_type @Forward [template] +// CHECK:STDOUT: %Self: %Forward.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -424,11 +424,11 @@ private interface Redecl {} // CHECK:STDOUT: %i.param: = param i, runtime_param0 // CHECK:STDOUT: %i: = bind_name i, %i.param // CHECK:STDOUT: } -// CHECK:STDOUT: %Forward.decl: type = interface_decl @Forward [template = constants.%.2] {} {} +// CHECK:STDOUT: %Forward.decl: type = interface_decl @Forward [template = constants.%Forward.type] {} {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @Forward { -// CHECK:STDOUT: %Self: %.2 = bind_symbolic_name Self, 0 [symbolic = constants.%Self] +// CHECK:STDOUT: %Self: %Forward.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -506,20 +506,20 @@ private interface Redecl {} // CHECK:STDOUT: --- todo_fail_private_on_redecl.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: type = interface_type @Redecl [template] -// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self, 0 [symbolic] +// CHECK:STDOUT: %Redecl.type: type = interface_type @Redecl [template] +// CHECK:STDOUT: %Self: %Redecl.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: package: = namespace [template] { // CHECK:STDOUT: .Redecl [private] = %Redecl.decl.loc4 // CHECK:STDOUT: } -// CHECK:STDOUT: %Redecl.decl.loc4: type = interface_decl @Redecl [template = constants.%.1] {} {} -// CHECK:STDOUT: %Redecl.decl.loc6: type = interface_decl @Redecl [template = constants.%.1] {} {} +// CHECK:STDOUT: %Redecl.decl.loc4: type = interface_decl @Redecl [template = constants.%Redecl.type] {} {} +// CHECK:STDOUT: %Redecl.decl.loc6: type = interface_decl @Redecl [template = constants.%Redecl.type] {} {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @Redecl { -// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self, 0 [symbolic = constants.%Self] +// CHECK:STDOUT: %Self: %Redecl.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self diff --git a/toolchain/check/testdata/interface/no_prelude/import_interface_decl.carbon b/toolchain/check/testdata/interface/no_prelude/import_interface_decl.carbon index 017f659e43f24..5fbb60ccd42d8 100644 --- a/toolchain/check/testdata/interface/no_prelude/import_interface_decl.carbon +++ b/toolchain/check/testdata/interface/no_prelude/import_interface_decl.carbon @@ -20,19 +20,19 @@ impl library "[[@TEST_NAME]]"; // CHECK:STDOUT: --- a.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: type = interface_type @A [template] -// CHECK:STDOUT: %.2: type = tuple_type () [template] +// CHECK:STDOUT: %A.type: type = interface_type @A [template] +// CHECK:STDOUT: %.1: type = tuple_type () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: package: = namespace [template] { // CHECK:STDOUT: .A = %A.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %A.decl: type = interface_decl @A [template = constants.%.1] {} {} +// CHECK:STDOUT: %A.decl: type = interface_decl @A [template = constants.%A.type] {} {} // CHECK:STDOUT: impl_decl @impl [template] {} { -// CHECK:STDOUT: %.loc3_7.1: %.2 = tuple_literal () -// CHECK:STDOUT: %.loc3_7.2: type = converted %.loc3_7.1, constants.%.2 [template = constants.%.2] -// CHECK:STDOUT: %A.ref: type = name_ref A, file.%A.decl [template = constants.%.1] +// CHECK:STDOUT: %.loc3_7.1: %.1 = tuple_literal () +// CHECK:STDOUT: %.loc3_7.2: type = converted %.loc3_7.1, constants.%.1 [template = constants.%.1] +// CHECK:STDOUT: %A.ref: type = name_ref A, file.%A.decl [template = constants.%A.type] // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -43,14 +43,14 @@ impl library "[[@TEST_NAME]]"; // CHECK:STDOUT: --- a.impl.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: type = interface_type @A [template] -// CHECK:STDOUT: %.2: type = tuple_type () [template] +// CHECK:STDOUT: %A.type: type = interface_type @A [template] +// CHECK:STDOUT: %.1: type = tuple_type () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %import_ref.1 = import_ref Main//a, inst+1, unloaded -// CHECK:STDOUT: %import_ref.2: type = import_ref Main//a, inst+5, loaded [template = constants.%.2] -// CHECK:STDOUT: %import_ref.3: type = import_ref Main//a, inst+6, loaded [template = constants.%.1] +// CHECK:STDOUT: %import_ref.2: type = import_ref Main//a, inst+5, loaded [template = constants.%.1] +// CHECK:STDOUT: %import_ref.3: type = import_ref Main//a, inst+6, loaded [template = constants.%A.type] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { diff --git a/toolchain/check/testdata/interface/no_prelude/self.carbon b/toolchain/check/testdata/interface/no_prelude/self.carbon index 0a4ee490cc3e9..10051ce648286 100644 --- a/toolchain/check/testdata/interface/no_prelude/self.carbon +++ b/toolchain/check/testdata/interface/no_prelude/self.carbon @@ -15,38 +15,38 @@ interface UseSelf { // CHECK:STDOUT: --- self.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: type = interface_type @UseSelf [template] -// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self, 0 [symbolic] +// CHECK:STDOUT: %UseSelf.type: type = interface_type @UseSelf [template] +// CHECK:STDOUT: %Self: %UseSelf.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %.2: type = tuple_type () [template] +// CHECK:STDOUT: %.1: type = tuple_type () [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.3: type = assoc_entity_type %.1, %F.type [template] -// CHECK:STDOUT: %.4: %.3 = assoc_entity element0, @UseSelf.%F.decl [template] +// CHECK:STDOUT: %.2: type = assoc_entity_type %UseSelf.type, %F.type [template] +// CHECK:STDOUT: %.3: %.2 = assoc_entity element0, @UseSelf.%F.decl [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: package: = namespace [template] { // CHECK:STDOUT: .UseSelf = %UseSelf.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %UseSelf.decl: type = interface_decl @UseSelf [template = constants.%.1] {} {} +// CHECK:STDOUT: %UseSelf.decl: type = interface_decl @UseSelf [template = constants.%UseSelf.type] {} {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @UseSelf { -// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self, 0 [symbolic = constants.%Self] +// CHECK:STDOUT: %Self: %UseSelf.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self] // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %self.patt: @F.%Self (%Self) = binding_pattern self // CHECK:STDOUT: } { -// CHECK:STDOUT: %Self.ref.loc12_14: %.1 = name_ref Self, @UseSelf.%Self [symbolic = %Self (constants.%Self)] +// CHECK:STDOUT: %Self.ref.loc12_14: %UseSelf.type = name_ref Self, @UseSelf.%Self [symbolic = %Self (constants.%Self)] // CHECK:STDOUT: %.loc12_14.1: type = facet_type_access %Self.ref.loc12_14 [symbolic = %Self (constants.%Self)] // CHECK:STDOUT: %.loc12_14.2: type = converted %Self.ref.loc12_14, %.loc12_14.1 [symbolic = %Self (constants.%Self)] // CHECK:STDOUT: %self.param: @F.%Self (%Self) = param self, runtime_param0 // CHECK:STDOUT: %self: @F.%Self (%Self) = bind_name self, %self.param -// CHECK:STDOUT: %Self.ref.loc12_25: %.1 = name_ref Self, @UseSelf.%Self [symbolic = %Self (constants.%Self)] +// CHECK:STDOUT: %Self.ref.loc12_25: %UseSelf.type = name_ref Self, @UseSelf.%Self [symbolic = %Self (constants.%Self)] // CHECK:STDOUT: %.loc12_25.1: type = facet_type_access %Self.ref.loc12_25 [symbolic = %Self (constants.%Self)] // CHECK:STDOUT: %.loc12_25.2: type = converted %Self.ref.loc12_25, %.loc12_25.1 [symbolic = %Self (constants.%Self)] // CHECK:STDOUT: %return: ref @F.%Self (%Self) = var // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc12: %.3 = assoc_entity element0, %F.decl [template = constants.%.4] +// CHECK:STDOUT: %.loc12: %.2 = assoc_entity element0, %F.decl [template = constants.%.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -54,8 +54,8 @@ interface UseSelf { // CHECK:STDOUT: witness = (%F.decl) // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @F(@UseSelf.%Self: %.1) { -// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self)] +// CHECK:STDOUT: generic fn @F(@UseSelf.%Self: %UseSelf.type) { +// CHECK:STDOUT: %Self: %UseSelf.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self)] // CHECK:STDOUT: // CHECK:STDOUT: fn[%self: @F.%Self (%Self)]() -> @F.%Self (%Self); // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/interface/no_prelude/syntactic_merge.carbon b/toolchain/check/testdata/interface/no_prelude/syntactic_merge.carbon index 8b2c9aee0eeff..3b7438b3ac59c 100644 --- a/toolchain/check/testdata/interface/no_prelude/syntactic_merge.carbon +++ b/toolchain/check/testdata/interface/no_prelude/syntactic_merge.carbon @@ -192,15 +192,15 @@ interface Foo(a:! const (const C)) {} // CHECK:STDOUT: %.1: type = struct_type {} [template] // CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] // CHECK:STDOUT: %a: %C = bind_symbolic_name a, 0 [symbolic] -// CHECK:STDOUT: %Foo.type: type = generic_interface_type @Foo [template] +// CHECK:STDOUT: %Foo.type.1: type = generic_interface_type @Foo [template] // CHECK:STDOUT: %.3: type = tuple_type () [template] -// CHECK:STDOUT: %Foo: %Foo.type = struct_value () [template] -// CHECK:STDOUT: %.4: type = interface_type @Foo, @Foo(%a) [symbolic] -// CHECK:STDOUT: %Self.1: %.4 = bind_symbolic_name Self, 1 [symbolic] -// CHECK:STDOUT: %Bar.type: type = generic_interface_type @Bar [template] -// CHECK:STDOUT: %Bar: %Bar.type = struct_value () [template] -// CHECK:STDOUT: %.5: type = interface_type @Bar, @Bar(%a) [symbolic] -// CHECK:STDOUT: %Self.2: %.5 = bind_symbolic_name Self, 1 [symbolic] +// CHECK:STDOUT: %Foo: %Foo.type.1 = struct_value () [template] +// CHECK:STDOUT: %Foo.type.2: type = interface_type @Foo, @Foo(%a) [symbolic] +// CHECK:STDOUT: %Self.1: %Foo.type.2 = bind_symbolic_name Self, 1 [symbolic] +// CHECK:STDOUT: %Bar.type.1: type = generic_interface_type @Bar [template] +// CHECK:STDOUT: %Bar: %Bar.type.1 = struct_value () [template] +// CHECK:STDOUT: %Bar.type.2: type = interface_type @Bar, @Bar(%a) [symbolic] +// CHECK:STDOUT: %Self.2: %Bar.type.2 = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -213,28 +213,28 @@ interface Foo(a:! const (const C)) {} // CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {} {} // CHECK:STDOUT: %C.ref: type = name_ref C, %C.decl [template = constants.%C] // CHECK:STDOUT: %D: type = bind_alias D, %C.decl [template = constants.%C] -// CHECK:STDOUT: %Foo.decl.loc7: %Foo.type = interface_decl @Foo [template = constants.%Foo] { +// CHECK:STDOUT: %Foo.decl.loc7: %Foo.type.1 = interface_decl @Foo [template = constants.%Foo] { // CHECK:STDOUT: %a.patt: %C = symbolic_binding_pattern a, 0 // CHECK:STDOUT: } { // CHECK:STDOUT: %C.ref.loc7: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %a.param.loc7: %C = param a, runtime_param // CHECK:STDOUT: %a.loc7: %C = bind_symbolic_name a, 0, %a.param.loc7 [symbolic = %a.1 (constants.%a)] // CHECK:STDOUT: } -// CHECK:STDOUT: %Foo.decl.loc8: %Foo.type = interface_decl @Foo [template = constants.%Foo] { +// CHECK:STDOUT: %Foo.decl.loc8: %Foo.type.1 = interface_decl @Foo [template = constants.%Foo] { // CHECK:STDOUT: %a.patt: %C = symbolic_binding_pattern a, 0 // CHECK:STDOUT: } { // CHECK:STDOUT: %C.ref.loc8: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %a.param.loc8: %C = param a, runtime_param // CHECK:STDOUT: %a.loc8: %C = bind_symbolic_name a, 0, %a.param.loc8 [symbolic = constants.%a] // CHECK:STDOUT: } -// CHECK:STDOUT: %Bar.decl.loc10: %Bar.type = interface_decl @Bar [template = constants.%Bar] { +// CHECK:STDOUT: %Bar.decl.loc10: %Bar.type.1 = interface_decl @Bar [template = constants.%Bar] { // CHECK:STDOUT: %a.patt: %C = symbolic_binding_pattern a, 0 // CHECK:STDOUT: } { // CHECK:STDOUT: %D.ref.loc10: type = name_ref D, file.%D [template = constants.%C] // CHECK:STDOUT: %a.param.loc10: %C = param a, runtime_param // CHECK:STDOUT: %a.loc10: %C = bind_symbolic_name a, 0, %a.param.loc10 [symbolic = %a.1 (constants.%a)] // CHECK:STDOUT: } -// CHECK:STDOUT: %Bar.decl.loc11: %Bar.type = interface_decl @Bar [template = constants.%Bar] { +// CHECK:STDOUT: %Bar.decl.loc11: %Bar.type.1 = interface_decl @Bar [template = constants.%Bar] { // CHECK:STDOUT: %a.patt: %C = symbolic_binding_pattern a, 0 // CHECK:STDOUT: } { // CHECK:STDOUT: %D.ref.loc11: type = name_ref D, file.%D [template = constants.%C] @@ -247,11 +247,11 @@ interface Foo(a:! const (const C)) {} // CHECK:STDOUT: %a.1: %C = bind_symbolic_name a, 0 [symbolic = %a.1 (constants.%a)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.1: type = interface_type @Foo, @Foo(%a.1) [symbolic = %.1 (constants.%.4)] -// CHECK:STDOUT: %Self.2: %.4 = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self.1)] +// CHECK:STDOUT: %Foo.type: type = interface_type @Foo, @Foo(%a.1) [symbolic = %Foo.type (constants.%Foo.type.2)] +// CHECK:STDOUT: %Self.2: %Foo.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self.1)] // CHECK:STDOUT: // CHECK:STDOUT: interface { -// CHECK:STDOUT: %Self.1: @Foo.%.1 (%.4) = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self.1)] +// CHECK:STDOUT: %Self.1: @Foo.%Foo.type (%Foo.type.2) = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self.1)] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self.1 @@ -263,11 +263,11 @@ interface Foo(a:! const (const C)) {} // CHECK:STDOUT: %a.1: %C = bind_symbolic_name a, 0 [symbolic = %a.1 (constants.%a)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.1: type = interface_type @Bar, @Bar(%a.1) [symbolic = %.1 (constants.%.5)] -// CHECK:STDOUT: %Self.2: %.5 = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self.2)] +// CHECK:STDOUT: %Bar.type: type = interface_type @Bar, @Bar(%a.1) [symbolic = %Bar.type (constants.%Bar.type.2)] +// CHECK:STDOUT: %Self.2: %Bar.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self.2)] // CHECK:STDOUT: // CHECK:STDOUT: interface { -// CHECK:STDOUT: %Self.1: @Bar.%.1 (%.5) = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self.2)] +// CHECK:STDOUT: %Self.1: @Bar.%Bar.type (%Bar.type.2) = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self.2)] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self.1 @@ -305,11 +305,11 @@ interface Foo(a:! const (const C)) {} // CHECK:STDOUT: %.1: type = struct_type {} [template] // CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] // CHECK:STDOUT: %a: %C = bind_symbolic_name a, 0 [symbolic] -// CHECK:STDOUT: %Foo.type: type = generic_interface_type @Foo [template] +// CHECK:STDOUT: %Foo.type.1: type = generic_interface_type @Foo [template] // CHECK:STDOUT: %.3: type = tuple_type () [template] -// CHECK:STDOUT: %Foo: %Foo.type = struct_value () [template] -// CHECK:STDOUT: %.4: type = interface_type @Foo, @Foo(%a) [symbolic] -// CHECK:STDOUT: %Self: %.4 = bind_symbolic_name Self, 1 [symbolic] +// CHECK:STDOUT: %Foo: %Foo.type.1 = struct_value () [template] +// CHECK:STDOUT: %Foo.type.2: type = interface_type @Foo, @Foo(%a) [symbolic] +// CHECK:STDOUT: %Self: %Foo.type.2 = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -318,14 +318,14 @@ interface Foo(a:! const (const C)) {} // CHECK:STDOUT: .Foo = %Foo.decl.loc6 // CHECK:STDOUT: } // CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {} {} -// CHECK:STDOUT: %Foo.decl.loc6: %Foo.type = interface_decl @Foo [template = constants.%Foo] { +// CHECK:STDOUT: %Foo.decl.loc6: %Foo.type.1 = interface_decl @Foo [template = constants.%Foo] { // CHECK:STDOUT: %a.patt: %C = symbolic_binding_pattern a, 0 // CHECK:STDOUT: } { // CHECK:STDOUT: %C.ref.loc6: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %a.param.loc6: %C = param a, runtime_param // CHECK:STDOUT: %a.loc6: %C = bind_symbolic_name a, 0, %a.param.loc6 [symbolic = %a.1 (constants.%a)] // CHECK:STDOUT: } -// CHECK:STDOUT: %Foo.decl.loc7: %Foo.type = interface_decl @Foo [template = constants.%Foo] { +// CHECK:STDOUT: %Foo.decl.loc7: %Foo.type.1 = interface_decl @Foo [template = constants.%Foo] { // CHECK:STDOUT: %a.patt: %C = symbolic_binding_pattern a, 0 // CHECK:STDOUT: } { // CHECK:STDOUT: %C.ref.loc7: type = name_ref C, file.%C.decl [template = constants.%C] @@ -338,11 +338,11 @@ interface Foo(a:! const (const C)) {} // CHECK:STDOUT: %a.1: %C = bind_symbolic_name a, 0 [symbolic = %a.1 (constants.%a)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.1: type = interface_type @Foo, @Foo(%a.1) [symbolic = %.1 (constants.%.4)] -// CHECK:STDOUT: %Self.2: %.4 = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self)] +// CHECK:STDOUT: %Foo.type: type = interface_type @Foo, @Foo(%a.1) [symbolic = %Foo.type (constants.%Foo.type.2)] +// CHECK:STDOUT: %Self.2: %Foo.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self)] // CHECK:STDOUT: // CHECK:STDOUT: interface { -// CHECK:STDOUT: %Self.1: @Foo.%.1 (%.4) = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self)] +// CHECK:STDOUT: %Self.1: @Foo.%Foo.type (%Foo.type.2) = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self)] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self.1 @@ -375,10 +375,10 @@ interface Foo(a:! const (const C)) {} // CHECK:STDOUT: %Foo.type: type = generic_interface_type @Foo [template] // CHECK:STDOUT: %.3: type = tuple_type () [template] // CHECK:STDOUT: %Foo: %Foo.type = struct_value () [template] -// CHECK:STDOUT: %.type: type = generic_interface_type @.1 [template] -// CHECK:STDOUT: %.4: %.type = struct_value () [template] -// CHECK:STDOUT: %.5: type = interface_type @.1, @.1(%a) [symbolic] -// CHECK:STDOUT: %Self: %.5 = bind_symbolic_name Self, 1 [symbolic] +// CHECK:STDOUT: %.type.1: type = generic_interface_type @.1 [template] +// CHECK:STDOUT: %.4: %.type.1 = struct_value () [template] +// CHECK:STDOUT: %.type.2: type = interface_type @.1, @.1(%a) [symbolic] +// CHECK:STDOUT: %Self: %.type.2 = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -394,7 +394,7 @@ interface Foo(a:! const (const C)) {} // CHECK:STDOUT: %a.param: %C = param a, runtime_param // CHECK:STDOUT: %a.loc6: %C = bind_symbolic_name a, 0, %a.param [symbolic = %a.1 (constants.%a)] // CHECK:STDOUT: } -// CHECK:STDOUT: %.decl: %.type = interface_decl @.1 [template = constants.%.4] { +// CHECK:STDOUT: %.decl: %.type.1 = interface_decl @.1 [template = constants.%.4] { // CHECK:STDOUT: %a.patt: %C = symbolic_binding_pattern a, 0 // CHECK:STDOUT: } { // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] @@ -413,11 +413,11 @@ interface Foo(a:! const (const C)) {} // CHECK:STDOUT: %a.1: %C = bind_symbolic_name a, 0 [symbolic = %a.1 (constants.%a)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.1: type = interface_type @.1, @.1(%a.1) [symbolic = %.1 (constants.%.5)] -// CHECK:STDOUT: %Self.2: %.5 = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self)] +// CHECK:STDOUT: %.type: type = interface_type @.1, @.1(%a.1) [symbolic = %.type (constants.%.type.2)] +// CHECK:STDOUT: %Self.2: %.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self)] // CHECK:STDOUT: // CHECK:STDOUT: interface { -// CHECK:STDOUT: %Self.1: @.1.%.1 (%.5) = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self)] +// CHECK:STDOUT: %Self.1: @.1.%.type (%.type.2) = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self)] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self.1 @@ -451,11 +451,11 @@ interface Foo(a:! const (const C)) {} // CHECK:STDOUT: %.1: type = struct_type {} [template] // CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] // CHECK:STDOUT: %a: %C = bind_symbolic_name a, 0 [symbolic] -// CHECK:STDOUT: %Foo.type: type = generic_interface_type @Foo [template] +// CHECK:STDOUT: %Foo.type.1: type = generic_interface_type @Foo [template] // CHECK:STDOUT: %.3: type = tuple_type () [template] -// CHECK:STDOUT: %Foo: %Foo.type = struct_value () [template] -// CHECK:STDOUT: %.4: type = interface_type @Foo, @Foo(%a) [symbolic] -// CHECK:STDOUT: %Self: %.4 = bind_symbolic_name Self, 1 [symbolic] +// CHECK:STDOUT: %Foo: %Foo.type.1 = struct_value () [template] +// CHECK:STDOUT: %Foo.type.2: type = interface_type @Foo, @Foo(%a) [symbolic] +// CHECK:STDOUT: %Self: %Foo.type.2 = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -464,14 +464,14 @@ interface Foo(a:! const (const C)) {} // CHECK:STDOUT: .Foo = %Foo.decl.loc6 // CHECK:STDOUT: } // CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {} {} -// CHECK:STDOUT: %Foo.decl.loc6: %Foo.type = interface_decl @Foo [template = constants.%Foo] { +// CHECK:STDOUT: %Foo.decl.loc6: %Foo.type.1 = interface_decl @Foo [template = constants.%Foo] { // CHECK:STDOUT: %a.patt: %C = symbolic_binding_pattern a, 0 // CHECK:STDOUT: } { // CHECK:STDOUT: %C.ref.loc6: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %a.param.loc6: %C = param a, runtime_param // CHECK:STDOUT: %a.loc6: %C = bind_symbolic_name a, 0, %a.param.loc6 [symbolic = %a.1 (constants.%a)] // CHECK:STDOUT: } -// CHECK:STDOUT: %Foo.decl.loc7: %Foo.type = interface_decl @Foo [template = constants.%Foo] { +// CHECK:STDOUT: %Foo.decl.loc7: %Foo.type.1 = interface_decl @Foo [template = constants.%Foo] { // CHECK:STDOUT: %a.patt: %C = symbolic_binding_pattern a, 0 // CHECK:STDOUT: } { // CHECK:STDOUT: %C.ref.loc7: type = name_ref C, file.%C.decl [template = constants.%C] @@ -484,11 +484,11 @@ interface Foo(a:! const (const C)) {} // CHECK:STDOUT: %a.1: %C = bind_symbolic_name a, 0 [symbolic = %a.1 (constants.%a)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.1: type = interface_type @Foo, @Foo(%a.1) [symbolic = %.1 (constants.%.4)] -// CHECK:STDOUT: %Self.2: %.4 = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self)] +// CHECK:STDOUT: %Foo.type: type = interface_type @Foo, @Foo(%a.1) [symbolic = %Foo.type (constants.%Foo.type.2)] +// CHECK:STDOUT: %Self.2: %Foo.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self)] // CHECK:STDOUT: // CHECK:STDOUT: interface { -// CHECK:STDOUT: %Self.1: @Foo.%.1 (%.4) = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self)] +// CHECK:STDOUT: %Self.1: @Foo.%Foo.type (%Foo.type.2) = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self)] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self.1 @@ -590,14 +590,14 @@ interface Foo(a:! const (const C)) {} // CHECK:STDOUT: %Foo: %Foo.type = struct_value () [template] // CHECK:STDOUT: %.type.1: type = generic_interface_type @.1 [template] // CHECK:STDOUT: %.4: %.type.1 = struct_value () [template] -// CHECK:STDOUT: %.5: type = interface_type @.1, @.1(%a) [symbolic] -// CHECK:STDOUT: %Self.1: %.5 = bind_symbolic_name Self, 1 [symbolic] +// CHECK:STDOUT: %.type.2: type = interface_type @.1, @.1(%a) [symbolic] +// CHECK:STDOUT: %Self.1: %.type.2 = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: %Bar.type: type = generic_interface_type @Bar [template] // CHECK:STDOUT: %Bar: %Bar.type = struct_value () [template] -// CHECK:STDOUT: %.type.2: type = generic_interface_type @.2 [template] -// CHECK:STDOUT: %.6: %.type.2 = struct_value () [template] -// CHECK:STDOUT: %.7: type = interface_type @.2, @.2(%a) [symbolic] -// CHECK:STDOUT: %Self.2: %.7 = bind_symbolic_name Self, 1 [symbolic] +// CHECK:STDOUT: %.type.3: type = generic_interface_type @.2 [template] +// CHECK:STDOUT: %.5: %.type.3 = struct_value () [template] +// CHECK:STDOUT: %.type.4: type = interface_type @.2, @.2(%a) [symbolic] +// CHECK:STDOUT: %Self.2: %.type.4 = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -624,7 +624,7 @@ interface Foo(a:! const (const C)) {} // CHECK:STDOUT: %a.param: %C = param a, runtime_param // CHECK:STDOUT: %a.loc12: %C = bind_symbolic_name a, 0, %a.param [symbolic = %a.1 (constants.%a)] // CHECK:STDOUT: } -// CHECK:STDOUT: %.decl.loc21: %.type.2 = interface_decl @.2 [template = constants.%.6] { +// CHECK:STDOUT: %.decl.loc21: %.type.3 = interface_decl @.2 [template = constants.%.5] { // CHECK:STDOUT: %a.patt: %C = symbolic_binding_pattern a, 0 // CHECK:STDOUT: } { // CHECK:STDOUT: %D.ref: type = name_ref D, imports.%import_ref.2 [template = constants.%C] @@ -643,11 +643,11 @@ interface Foo(a:! const (const C)) {} // CHECK:STDOUT: %a.1: %C = bind_symbolic_name a, 0 [symbolic = %a.1 (constants.%a)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.1: type = interface_type @.1, @.1(%a.1) [symbolic = %.1 (constants.%.5)] -// CHECK:STDOUT: %Self.2: %.5 = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self.1)] +// CHECK:STDOUT: %.type: type = interface_type @.1, @.1(%a.1) [symbolic = %.type (constants.%.type.2)] +// CHECK:STDOUT: %Self.2: %.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self.1)] // CHECK:STDOUT: // CHECK:STDOUT: interface { -// CHECK:STDOUT: %Self.1: @.1.%.1 (%.5) = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self.1)] +// CHECK:STDOUT: %Self.1: @.1.%.type (%.type.2) = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self.1)] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self.1 @@ -665,11 +665,11 @@ interface Foo(a:! const (const C)) {} // CHECK:STDOUT: %a.1: %C = bind_symbolic_name a, 0 [symbolic = %a.1 (constants.%a)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.1: type = interface_type @.2, @.2(%a.1) [symbolic = %.1 (constants.%.7)] -// CHECK:STDOUT: %Self.2: %.7 = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self.2)] +// CHECK:STDOUT: %.type: type = interface_type @.2, @.2(%a.1) [symbolic = %.type (constants.%.type.4)] +// CHECK:STDOUT: %Self.2: %.type.4 = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self.2)] // CHECK:STDOUT: // CHECK:STDOUT: interface { -// CHECK:STDOUT: %Self.1: @.2.%.1 (%.7) = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self.2)] +// CHECK:STDOUT: %Self.1: @.2.%.type (%.type.4) = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self.2)] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self.1 @@ -717,10 +717,10 @@ interface Foo(a:! const (const C)) {} // CHECK:STDOUT: %.3: type = tuple_type () [template] // CHECK:STDOUT: %Foo: %Foo.type = struct_value () [template] // CHECK:STDOUT: %b: %C = bind_symbolic_name b, 0 [symbolic] -// CHECK:STDOUT: %.type: type = generic_interface_type @.1 [template] -// CHECK:STDOUT: %.4: %.type = struct_value () [template] -// CHECK:STDOUT: %.5: type = interface_type @.1, @.1(%b) [symbolic] -// CHECK:STDOUT: %Self: %.5 = bind_symbolic_name Self, 1 [symbolic] +// CHECK:STDOUT: %.type.1: type = generic_interface_type @.1 [template] +// CHECK:STDOUT: %.4: %.type.1 = struct_value () [template] +// CHECK:STDOUT: %.type.2: type = interface_type @.1, @.1(%b) [symbolic] +// CHECK:STDOUT: %Self: %.type.2 = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -739,7 +739,7 @@ interface Foo(a:! const (const C)) {} // CHECK:STDOUT: %a.param: %C = param a, runtime_param // CHECK:STDOUT: %a.loc7: %C = bind_symbolic_name a, 0, %a.param [symbolic = %a.1 (constants.%a)] // CHECK:STDOUT: } -// CHECK:STDOUT: %.decl: %.type = interface_decl @.1 [template = constants.%.4] { +// CHECK:STDOUT: %.decl: %.type.1 = interface_decl @.1 [template = constants.%.4] { // CHECK:STDOUT: %b.patt: %C = symbolic_binding_pattern b, 0 // CHECK:STDOUT: } { // CHECK:STDOUT: %D.ref: type = name_ref D, file.%D [template = constants.%C] @@ -758,11 +758,11 @@ interface Foo(a:! const (const C)) {} // CHECK:STDOUT: %b.1: %C = bind_symbolic_name b, 0 [symbolic = %b.1 (constants.%b)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.1: type = interface_type @.1, @.1(%b.1) [symbolic = %.1 (constants.%.5)] -// CHECK:STDOUT: %Self.2: %.5 = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self)] +// CHECK:STDOUT: %.type: type = interface_type @.1, @.1(%b.1) [symbolic = %.type (constants.%.type.2)] +// CHECK:STDOUT: %Self.2: %.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self)] // CHECK:STDOUT: // CHECK:STDOUT: interface { -// CHECK:STDOUT: %Self.1: @.1.%.1 (%.5) = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self)] +// CHECK:STDOUT: %Self.1: @.1.%.type (%.type.2) = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self)] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self.1 @@ -799,10 +799,10 @@ interface Foo(a:! const (const C)) {} // CHECK:STDOUT: %Foo.type: type = generic_interface_type @Foo [template] // CHECK:STDOUT: %.3: type = tuple_type () [template] // CHECK:STDOUT: %Foo: %Foo.type = struct_value () [template] -// CHECK:STDOUT: %.type: type = generic_interface_type @.1 [template] -// CHECK:STDOUT: %.4: %.type = struct_value () [template] -// CHECK:STDOUT: %.5: type = interface_type @.1, @.1(%a) [symbolic] -// CHECK:STDOUT: %Self: %.5 = bind_symbolic_name Self, 1 [symbolic] +// CHECK:STDOUT: %.type.1: type = generic_interface_type @.1 [template] +// CHECK:STDOUT: %.4: %.type.1 = struct_value () [template] +// CHECK:STDOUT: %.type.2: type = interface_type @.1, @.1(%a) [symbolic] +// CHECK:STDOUT: %Self: %.type.2 = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -821,7 +821,7 @@ interface Foo(a:! const (const C)) {} // CHECK:STDOUT: %a.param: %C = param a, runtime_param // CHECK:STDOUT: %a.loc7: %C = bind_symbolic_name a, 0, %a.param [symbolic = %a.1 (constants.%a)] // CHECK:STDOUT: } -// CHECK:STDOUT: %.decl: %.type = interface_decl @.1 [template = constants.%.4] { +// CHECK:STDOUT: %.decl: %.type.1 = interface_decl @.1 [template = constants.%.4] { // CHECK:STDOUT: %a.patt: %C = symbolic_binding_pattern a, 0 // CHECK:STDOUT: } { // CHECK:STDOUT: %D.ref: type = name_ref D, file.%D [template = constants.%C] @@ -840,11 +840,11 @@ interface Foo(a:! const (const C)) {} // CHECK:STDOUT: %a.1: %C = bind_symbolic_name a, 0 [symbolic = %a.1 (constants.%a)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.1: type = interface_type @.1, @.1(%a.1) [symbolic = %.1 (constants.%.5)] -// CHECK:STDOUT: %Self.2: %.5 = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self)] +// CHECK:STDOUT: %.type: type = interface_type @.1, @.1(%a.1) [symbolic = %.type (constants.%.type.2)] +// CHECK:STDOUT: %Self.2: %.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self)] // CHECK:STDOUT: // CHECK:STDOUT: interface { -// CHECK:STDOUT: %Self.1: @.1.%.1 (%.5) = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self)] +// CHECK:STDOUT: %Self.1: @.1.%.type (%.type.2) = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self)] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self.1 @@ -881,10 +881,10 @@ interface Foo(a:! const (const C)) {} // CHECK:STDOUT: %Foo.type: type = generic_interface_type @Foo [template] // CHECK:STDOUT: %.3: type = tuple_type () [template] // CHECK:STDOUT: %Foo: %Foo.type = struct_value () [template] -// CHECK:STDOUT: %.type: type = generic_interface_type @.1 [template] -// CHECK:STDOUT: %.4: %.type = struct_value () [template] -// CHECK:STDOUT: %.5: type = interface_type @.1, @.1(%a) [symbolic] -// CHECK:STDOUT: %Self: %.5 = bind_symbolic_name Self, 1 [symbolic] +// CHECK:STDOUT: %.type.1: type = generic_interface_type @.1 [template] +// CHECK:STDOUT: %.4: %.type.1 = struct_value () [template] +// CHECK:STDOUT: %.type.2: type = interface_type @.1, @.1(%a) [symbolic] +// CHECK:STDOUT: %Self: %.type.2 = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -903,7 +903,7 @@ interface Foo(a:! const (const C)) {} // CHECK:STDOUT: %a.param: %C = param a, runtime_param // CHECK:STDOUT: %a.loc7: %C = bind_symbolic_name a, 0, %a.param [symbolic = %a.1 (constants.%a)] // CHECK:STDOUT: } -// CHECK:STDOUT: %.decl: %.type = interface_decl @.1 [template = constants.%.4] { +// CHECK:STDOUT: %.decl: %.type.1 = interface_decl @.1 [template = constants.%.4] { // CHECK:STDOUT: %a.patt: %C = symbolic_binding_pattern a, 0 // CHECK:STDOUT: } { // CHECK:STDOUT: %D.ref: type = name_ref D, file.%D [template = constants.%C] @@ -922,11 +922,11 @@ interface Foo(a:! const (const C)) {} // CHECK:STDOUT: %a.1: %C = bind_symbolic_name a, 0 [symbolic = %a.1 (constants.%a)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.1: type = interface_type @.1, @.1(%a.1) [symbolic = %.1 (constants.%.5)] -// CHECK:STDOUT: %Self.2: %.5 = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self)] +// CHECK:STDOUT: %.type: type = interface_type @.1, @.1(%a.1) [symbolic = %.type (constants.%.type.2)] +// CHECK:STDOUT: %Self.2: %.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self)] // CHECK:STDOUT: // CHECK:STDOUT: interface { -// CHECK:STDOUT: %Self.1: @.1.%.1 (%.5) = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self)] +// CHECK:STDOUT: %Self.1: @.1.%.type (%.type.2) = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self)] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self.1 @@ -1007,10 +1007,10 @@ interface Foo(a:! const (const C)) {} // CHECK:STDOUT: %Foo.type: type = generic_interface_type @Foo [template] // CHECK:STDOUT: %.3: type = tuple_type () [template] // CHECK:STDOUT: %Foo: %Foo.type = struct_value () [template] -// CHECK:STDOUT: %.type: type = generic_interface_type @.1 [template] -// CHECK:STDOUT: %.4: %.type = struct_value () [template] -// CHECK:STDOUT: %.5: type = interface_type @.1, @.1(%a) [symbolic] -// CHECK:STDOUT: %Self: %.5 = bind_symbolic_name Self, 1 [symbolic] +// CHECK:STDOUT: %.type.1: type = generic_interface_type @.1 [template] +// CHECK:STDOUT: %.4: %.type.1 = struct_value () [template] +// CHECK:STDOUT: %.type.2: type = interface_type @.1, @.1(%a) [symbolic] +// CHECK:STDOUT: %Self: %.type.2 = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -1029,7 +1029,7 @@ interface Foo(a:! const (const C)) {} // CHECK:STDOUT: %default.import.loc2_6.2 = import // CHECK:STDOUT: %C.ref: type = name_ref C, imports.%import_ref.1 [template = constants.%C] // CHECK:STDOUT: %D: type = bind_alias D, imports.%import_ref.1 [template = constants.%C] -// CHECK:STDOUT: %.decl: %.type = interface_decl @.1 [template = constants.%.4] { +// CHECK:STDOUT: %.decl: %.type.1 = interface_decl @.1 [template = constants.%.4] { // CHECK:STDOUT: %a.patt: %C = symbolic_binding_pattern a, 0 // CHECK:STDOUT: } { // CHECK:STDOUT: %D.ref: type = name_ref D, file.%D [template = constants.%C] @@ -1048,11 +1048,11 @@ interface Foo(a:! const (const C)) {} // CHECK:STDOUT: %a.1: %C = bind_symbolic_name a, 0 [symbolic = %a.1 (constants.%a)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.1: type = interface_type @.1, @.1(%a.1) [symbolic = %.1 (constants.%.5)] -// CHECK:STDOUT: %Self.2: %.5 = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self)] +// CHECK:STDOUT: %.type: type = interface_type @.1, @.1(%a.1) [symbolic = %.type (constants.%.type.2)] +// CHECK:STDOUT: %Self.2: %.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self)] // CHECK:STDOUT: // CHECK:STDOUT: interface { -// CHECK:STDOUT: %Self.1: @.1.%.1 (%.5) = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self)] +// CHECK:STDOUT: %Self.1: @.1.%.type (%.type.2) = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self)] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self.1 @@ -1088,10 +1088,10 @@ interface Foo(a:! const (const C)) {} // CHECK:STDOUT: %Foo.type: type = generic_interface_type @Foo [template] // CHECK:STDOUT: %.4: type = tuple_type () [template] // CHECK:STDOUT: %Foo: %Foo.type = struct_value () [template] -// CHECK:STDOUT: %.type: type = generic_interface_type @.1 [template] -// CHECK:STDOUT: %.5: %.type = struct_value () [template] -// CHECK:STDOUT: %.6: type = interface_type @.1, @.1(%a) [symbolic] -// CHECK:STDOUT: %Self: %.6 = bind_symbolic_name Self, 1 [symbolic] +// CHECK:STDOUT: %.type.1: type = generic_interface_type @.1 [template] +// CHECK:STDOUT: %.5: %.type.1 = struct_value () [template] +// CHECK:STDOUT: %.type.2: type = interface_type @.1, @.1(%a) [symbolic] +// CHECK:STDOUT: %Self: %.type.2 = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -1108,7 +1108,7 @@ interface Foo(a:! const (const C)) {} // CHECK:STDOUT: %a.param: %.3 = param a, runtime_param // CHECK:STDOUT: %a.loc6: %.3 = bind_symbolic_name a, 0, %a.param [symbolic = %a.1 (constants.%a)] // CHECK:STDOUT: } -// CHECK:STDOUT: %.decl: %.type = interface_decl @.1 [template = constants.%.5] { +// CHECK:STDOUT: %.decl: %.type.1 = interface_decl @.1 [template = constants.%.5] { // CHECK:STDOUT: %a.patt: %.3 = symbolic_binding_pattern a, 0 // CHECK:STDOUT: } { // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] @@ -1129,11 +1129,11 @@ interface Foo(a:! const (const C)) {} // CHECK:STDOUT: %a.1: %.3 = bind_symbolic_name a, 0 [symbolic = %a.1 (constants.%a)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.1: type = interface_type @.1, @.1(%a.1) [symbolic = %.1 (constants.%.6)] -// CHECK:STDOUT: %Self.2: %.6 = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self)] +// CHECK:STDOUT: %.type: type = interface_type @.1, @.1(%a.1) [symbolic = %.type (constants.%.type.2)] +// CHECK:STDOUT: %Self.2: %.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self)] // CHECK:STDOUT: // CHECK:STDOUT: interface { -// CHECK:STDOUT: %Self.1: @.1.%.1 (%.6) = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self)] +// CHECK:STDOUT: %Self.1: @.1.%.type (%.type.2) = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self)] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self.1 diff --git a/toolchain/check/testdata/interface/todo_define_not_default.carbon b/toolchain/check/testdata/interface/todo_define_not_default.carbon index fa4971b3d8e36..234e2ef5cd6c3 100644 --- a/toolchain/check/testdata/interface/todo_define_not_default.carbon +++ b/toolchain/check/testdata/interface/todo_define_not_default.carbon @@ -22,26 +22,26 @@ interface I { // CHECK:STDOUT: --- todo_define_not_default.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: type = interface_type @I [template] -// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self, 0 [symbolic] +// CHECK:STDOUT: %I.type: type = interface_type @I [template] +// CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %.2: type = tuple_type () [template] +// CHECK:STDOUT: %.1: type = tuple_type () [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.3: type = assoc_entity_type %.1, %F.type [template] -// CHECK:STDOUT: %.4: %.3 = assoc_entity element0, @I.%F.decl [template] +// CHECK:STDOUT: %.2: type = assoc_entity_type %I.type, %F.type [template] +// CHECK:STDOUT: %.3: %.2 = assoc_entity element0, @I.%F.decl [template] // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %G: %G.type = struct_value () [template] -// CHECK:STDOUT: %.5: type = assoc_entity_type %.1, %G.type [template] -// CHECK:STDOUT: %.6: %.5 = assoc_entity element1, @I.%G.decl [template] -// CHECK:STDOUT: %.7: type = tuple_type (type, type) [template] -// CHECK:STDOUT: %.8: type = tuple_type (i32, i32) [template] -// CHECK:STDOUT: %.9: type = assoc_entity_type %.1, type [template] -// CHECK:STDOUT: %.10: %.9 = assoc_entity element2, @I.%T [template] -// CHECK:STDOUT: %.11: i32 = int_literal 42 [template] -// CHECK:STDOUT: %.12: type = assoc_entity_type %.1, i32 [template] -// CHECK:STDOUT: %.13: %.12 = assoc_entity element3, @I.%N [template] +// CHECK:STDOUT: %.4: type = assoc_entity_type %I.type, %G.type [template] +// CHECK:STDOUT: %.5: %.4 = assoc_entity element1, @I.%G.decl [template] +// CHECK:STDOUT: %.6: type = tuple_type (type, type) [template] +// CHECK:STDOUT: %.7: type = tuple_type (i32, i32) [template] +// CHECK:STDOUT: %.8: type = assoc_entity_type %I.type, type [template] +// CHECK:STDOUT: %.9: %.8 = assoc_entity element2, @I.%T [template] +// CHECK:STDOUT: %.10: i32 = int_literal 42 [template] +// CHECK:STDOUT: %.11: type = assoc_entity_type %I.type, i32 [template] +// CHECK:STDOUT: %.12: %.11 = assoc_entity element3, @I.%N [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -65,13 +65,13 @@ interface I { // CHECK:STDOUT: .I = %I.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %I.decl: type = interface_decl @I [template = constants.%.1] {} {} +// CHECK:STDOUT: %I.decl: type = interface_decl @I [template = constants.%I.type] {} {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @I { -// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self, 0 [symbolic = constants.%Self] +// CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self] // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] {} {} -// CHECK:STDOUT: %.loc13: %.3 = assoc_entity element0, %F.decl [template = constants.%.4] +// CHECK:STDOUT: %.loc13: %.2 = assoc_entity element0, %F.decl [template = constants.%.3] // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] { // CHECK:STDOUT: %a.patt: i32 = binding_pattern a // CHECK:STDOUT: %b.patt: i32 = binding_pattern b @@ -91,23 +91,23 @@ interface I { // CHECK:STDOUT: %.loc14_27.2: type = converted %int.make_type_32.loc14_27, %.loc14_27.1 [template = i32] // CHECK:STDOUT: %return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc14: %.5 = assoc_entity element1, %G.decl [template = constants.%.6] +// CHECK:STDOUT: %.loc14: %.4 = assoc_entity element1, %G.decl [template = constants.%.5] // CHECK:STDOUT: %int.make_type_32.loc18_19: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %int.make_type_32.loc18_24: init type = call constants.%Int32() [template = i32] -// CHECK:STDOUT: %.loc18_27: %.7 = tuple_literal (%int.make_type_32.loc18_19, %int.make_type_32.loc18_24) +// CHECK:STDOUT: %.loc18_27: %.6 = tuple_literal (%int.make_type_32.loc18_19, %int.make_type_32.loc18_24) // CHECK:STDOUT: %.loc18_28.1: type = value_of_initializer %int.make_type_32.loc18_19 [template = i32] // CHECK:STDOUT: %.loc18_28.2: type = converted %int.make_type_32.loc18_19, %.loc18_28.1 [template = i32] // CHECK:STDOUT: %.loc18_28.3: type = value_of_initializer %int.make_type_32.loc18_24 [template = i32] // CHECK:STDOUT: %.loc18_28.4: type = converted %int.make_type_32.loc18_24, %.loc18_28.3 [template = i32] -// CHECK:STDOUT: %.loc18_28.5: type = converted %.loc18_27, constants.%.8 [template = constants.%.8] +// CHECK:STDOUT: %.loc18_28.5: type = converted %.loc18_27, constants.%.7 [template = constants.%.7] // CHECK:STDOUT: %T: type = assoc_const_decl T [template] -// CHECK:STDOUT: %.loc18_28.6: %.9 = assoc_entity element2, %T [template = constants.%.10] +// CHECK:STDOUT: %.loc18_28.6: %.8 = assoc_entity element2, %T [template = constants.%.9] // CHECK:STDOUT: %int.make_type_32.loc19: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc19_11.1: type = value_of_initializer %int.make_type_32.loc19 [template = i32] // CHECK:STDOUT: %.loc19_11.2: type = converted %int.make_type_32.loc19, %.loc19_11.1 [template = i32] -// CHECK:STDOUT: %.loc19_17: i32 = int_literal 42 [template = constants.%.11] +// CHECK:STDOUT: %.loc19_17: i32 = int_literal 42 [template = constants.%.10] // CHECK:STDOUT: %N: i32 = assoc_const_decl N [template] -// CHECK:STDOUT: %.loc19_19: %.12 = assoc_entity element3, %N [template = constants.%.13] +// CHECK:STDOUT: %.loc19_19: %.11 = assoc_entity element3, %N [template = constants.%.12] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -118,7 +118,7 @@ interface I { // CHECK:STDOUT: witness = (%F.decl, %G.decl, %T, %N) // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @F(@I.%Self: %.1) { +// CHECK:STDOUT: generic fn @F(@I.%Self: %I.type) { // CHECK:STDOUT: !definition: // CHECK:STDOUT: // CHECK:STDOUT: fn() { @@ -129,7 +129,7 @@ interface I { // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32"; // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @G(@I.%Self: %.1) { +// CHECK:STDOUT: generic fn @G(@I.%Self: %I.type) { // CHECK:STDOUT: // CHECK:STDOUT: fn(%a: i32, %b: i32) -> i32 = "int.sadd"; // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/let/compile_time_bindings.carbon b/toolchain/check/testdata/let/compile_time_bindings.carbon index 7fcbda6abfd15..e4c53e7af855d 100644 --- a/toolchain/check/testdata/let/compile_time_bindings.carbon +++ b/toolchain/check/testdata/let/compile_time_bindings.carbon @@ -563,33 +563,33 @@ fn F() -> T; // CHECK:STDOUT: --- fail_return_in_interface.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: type = interface_type @I [template] -// CHECK:STDOUT: %Self.1: %.1 = bind_symbolic_name Self, 0 [symbolic] +// CHECK:STDOUT: %I.type: type = interface_type @I [template] +// CHECK:STDOUT: %Self.1: %I.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] -// CHECK:STDOUT: %.2: type = tuple_type () [template] +// CHECK:STDOUT: %.1: type = tuple_type () [template] // CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] -// CHECK:STDOUT: %.3: type = assoc_entity_type %.1, type [template] -// CHECK:STDOUT: %.4: %.3 = assoc_entity element0, @I.%T [template] -// CHECK:STDOUT: %ImplicitAs.type: type = generic_interface_type @ImplicitAs [template] -// CHECK:STDOUT: %ImplicitAs: %ImplicitAs.type = struct_value () [template] +// CHECK:STDOUT: %.2: type = assoc_entity_type %I.type, type [template] +// CHECK:STDOUT: %.3: %.2 = assoc_entity element0, @I.%T [template] +// CHECK:STDOUT: %ImplicitAs.type.1: type = generic_interface_type @ImplicitAs [template] +// CHECK:STDOUT: %ImplicitAs: %ImplicitAs.type.1 = struct_value () [template] // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic] -// CHECK:STDOUT: %.5: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic] -// CHECK:STDOUT: %Self.2: @ImplicitAs.%.1 (%.5) = bind_symbolic_name Self, 1 [symbolic] -// CHECK:STDOUT: %Self.3: %.5 = bind_symbolic_name Self, 1 [symbolic] +// CHECK:STDOUT: %ImplicitAs.type.2: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic] +// CHECK:STDOUT: %Self.2: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2) = bind_symbolic_name Self, 1 [symbolic] +// CHECK:STDOUT: %Self.3: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: %Convert.type.1: type = fn_type @Convert, @ImplicitAs(%Dest) [symbolic] // CHECK:STDOUT: %Convert.1: %Convert.type.1 = struct_value () [symbolic] -// CHECK:STDOUT: %.6: type = assoc_entity_type %.5, %Convert.type.1 [symbolic] -// CHECK:STDOUT: %.7: %.6 = assoc_entity element0, imports.%import_ref.6 [symbolic] -// CHECK:STDOUT: %.8: type = interface_type @ImplicitAs, @ImplicitAs(type) [template] +// CHECK:STDOUT: %.4: type = assoc_entity_type %ImplicitAs.type.2, %Convert.type.1 [symbolic] +// CHECK:STDOUT: %.5: %.4 = assoc_entity element0, imports.%import_ref.6 [symbolic] +// CHECK:STDOUT: %ImplicitAs.type.3: type = interface_type @ImplicitAs, @ImplicitAs(type) [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert, @ImplicitAs(type) [template] // CHECK:STDOUT: %Convert.2: %Convert.type.2 = struct_value () [template] -// CHECK:STDOUT: %.9: type = assoc_entity_type %.8, %Convert.type.2 [template] -// CHECK:STDOUT: %.10: %.9 = assoc_entity element0, imports.%import_ref.6 [template] -// CHECK:STDOUT: %.11: %.6 = assoc_entity element0, imports.%import_ref.7 [symbolic] +// CHECK:STDOUT: %.6: type = assoc_entity_type %ImplicitAs.type.3, %Convert.type.2 [template] +// CHECK:STDOUT: %.7: %.6 = assoc_entity element0, imports.%import_ref.6 [template] +// CHECK:STDOUT: %.8: %.4 = assoc_entity element0, imports.%import_ref.7 [symbolic] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.12: type = assoc_entity_type %.1, %F.type [template] -// CHECK:STDOUT: %.13: %.12 = assoc_entity element1, @I.%F.decl [template] +// CHECK:STDOUT: %.9: type = assoc_entity_type %I.type, %F.type [template] +// CHECK:STDOUT: %.10: %.9 = assoc_entity element1, @I.%F.decl [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -606,9 +606,9 @@ fn F() -> T; // CHECK:STDOUT: import Core//prelude/types/bool // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref Core//prelude/types, inst+4, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.2: %ImplicitAs.type = import_ref Core//prelude/operators/as, inst+40, loaded [template = constants.%ImplicitAs] +// CHECK:STDOUT: %import_ref.2: %ImplicitAs.type.1 = import_ref Core//prelude/operators/as, inst+40, loaded [template = constants.%ImplicitAs] // CHECK:STDOUT: %import_ref.3 = import_ref Core//prelude/operators/as, inst+45, unloaded -// CHECK:STDOUT: %import_ref.4: @ImplicitAs.%.2 (%.6) = import_ref Core//prelude/operators/as, inst+63, loaded [symbolic = @ImplicitAs.%.3 (constants.%.11)] +// CHECK:STDOUT: %import_ref.4: @ImplicitAs.%.1 (%.4) = import_ref Core//prelude/operators/as, inst+63, loaded [symbolic = @ImplicitAs.%.2 (constants.%.8)] // CHECK:STDOUT: %import_ref.5 = import_ref Core//prelude/operators/as, inst+56, unloaded // CHECK:STDOUT: %import_ref.6 = import_ref Core//prelude/operators/as, inst+56, unloaded // CHECK:STDOUT: %import_ref.7 = import_ref Core//prelude/operators/as, inst+56, unloaded @@ -620,25 +620,25 @@ fn F() -> T; // CHECK:STDOUT: .I = %I.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %I.decl: type = interface_decl @I [template = constants.%.1] {} {} +// CHECK:STDOUT: %I.decl: type = interface_decl @I [template = constants.%I.type] {} {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @I { -// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self, 0 [symbolic = constants.%Self.1] +// CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self.1] // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc5_21.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc5_21.2: type = converted %int.make_type_32, %.loc5_21.1 [template = i32] // CHECK:STDOUT: %T: type = assoc_const_decl T [template] -// CHECK:STDOUT: %.loc5_21.3: %.3 = assoc_entity element0, %T [template = constants.%.4] +// CHECK:STDOUT: %.loc5_21.3: %.2 = assoc_entity element0, %T [template = constants.%.3] // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] {} { -// CHECK:STDOUT: %T.ref: %.3 = name_ref T, @I.%.loc5_21.3 [template = constants.%.4] -// CHECK:STDOUT: %.loc13_13.1: type = interface_type @ImplicitAs, @ImplicitAs(type) [template = constants.%.8] -// CHECK:STDOUT: %.loc13_13.2: %.9 = specific_constant imports.%import_ref.4, @ImplicitAs(type) [template = constants.%.10] -// CHECK:STDOUT: %Convert.ref: %.9 = name_ref Convert, %.loc13_13.2 [template = constants.%.10] -// CHECK:STDOUT: %.loc13_13.3: type = converted %T.ref, [template = ] +// CHECK:STDOUT: %T.ref: %.2 = name_ref T, @I.%.loc5_21.3 [template = constants.%.3] +// CHECK:STDOUT: %ImplicitAs.type: type = interface_type @ImplicitAs, @ImplicitAs(type) [template = constants.%ImplicitAs.type.3] +// CHECK:STDOUT: %.loc13_13.1: %.6 = specific_constant imports.%import_ref.4, @ImplicitAs(type) [template = constants.%.7] +// CHECK:STDOUT: %Convert.ref: %.6 = name_ref Convert, %.loc13_13.1 [template = constants.%.7] +// CHECK:STDOUT: %.loc13_13.2: type = converted %T.ref, [template = ] // CHECK:STDOUT: %return: ref = var // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc13: %.12 = assoc_entity element1, %F.decl [template = constants.%.13] +// CHECK:STDOUT: %.loc13: %.9 = assoc_entity element1, %F.decl [template = constants.%.10] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -651,12 +651,12 @@ fn F() -> T; // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic = %Dest (constants.%Dest)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.1: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic = %.1 (constants.%.5)] -// CHECK:STDOUT: %Self: %.5 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.3)] +// CHECK:STDOUT: %ImplicitAs.type: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.2)] +// CHECK:STDOUT: %Self: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.3)] // CHECK:STDOUT: %Convert.type: type = fn_type @Convert, @ImplicitAs(%Dest) [symbolic = %Convert.type (constants.%Convert.type.1)] // CHECK:STDOUT: %Convert: @ImplicitAs.%Convert.type (%Convert.type.1) = struct_value () [symbolic = %Convert (constants.%Convert.1)] -// CHECK:STDOUT: %.2: type = assoc_entity_type @ImplicitAs.%.1 (%.5), @ImplicitAs.%Convert.type (%Convert.type.1) [symbolic = %.2 (constants.%.6)] -// CHECK:STDOUT: %.3: @ImplicitAs.%.2 (%.6) = assoc_entity element0, imports.%import_ref.6 [symbolic = %.3 (constants.%.7)] +// CHECK:STDOUT: %.1: type = assoc_entity_type @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2), @ImplicitAs.%Convert.type (%Convert.type.1) [symbolic = %.1 (constants.%.4)] +// CHECK:STDOUT: %.2: @ImplicitAs.%.1 (%.4) = assoc_entity element0, imports.%import_ref.6 [symbolic = %.2 (constants.%.5)] // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: !members: @@ -668,15 +668,15 @@ fn F() -> T; // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32"; // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @Convert(constants.%Dest: type, constants.%Self.2: @ImplicitAs.%.1 (%.5)) { +// CHECK:STDOUT: generic fn @Convert(constants.%Dest: type, constants.%Self.2: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2)) { // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic = %Dest (constants.%Dest)] -// CHECK:STDOUT: %.1: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic = %.1 (constants.%.5)] -// CHECK:STDOUT: %Self: %.5 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.3)] +// CHECK:STDOUT: %ImplicitAs.type: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.2)] +// CHECK:STDOUT: %Self: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.3)] // CHECK:STDOUT: // CHECK:STDOUT: fn[%self: @Convert.%Self (%Self.3)]() -> @Convert.%Dest (%Dest); // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @F(@I.%Self: %.1) { +// CHECK:STDOUT: generic fn @F(@I.%Self: %I.type) { // CHECK:STDOUT: // CHECK:STDOUT: fn() -> ; // CHECK:STDOUT: } @@ -695,7 +695,7 @@ fn F() -> T; // CHECK:STDOUT: // CHECK:STDOUT: specific @Convert(constants.%Dest, constants.%Self.2) { // CHECK:STDOUT: %Dest => constants.%Dest -// CHECK:STDOUT: %.1 => constants.%.5 +// CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.2 // CHECK:STDOUT: %Self => constants.%Self.2 // CHECK:STDOUT: } // CHECK:STDOUT: @@ -703,12 +703,12 @@ fn F() -> T; // CHECK:STDOUT: %Dest => type // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.1 => constants.%.8 +// CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.3 // CHECK:STDOUT: %Self => constants.%Self.3 // CHECK:STDOUT: %Convert.type => constants.%Convert.type.2 // CHECK:STDOUT: %Convert => constants.%Convert.2 -// CHECK:STDOUT: %.2 => constants.%.9 -// CHECK:STDOUT: %.3 => constants.%.10 +// CHECK:STDOUT: %.1 => constants.%.6 +// CHECK:STDOUT: %.2 => constants.%.7 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F(constants.%Self.1) {} diff --git a/toolchain/check/testdata/let/fail_generic.carbon b/toolchain/check/testdata/let/fail_generic.carbon index 0698891c42905..1a6e558e89b13 100644 --- a/toolchain/check/testdata/let/fail_generic.carbon +++ b/toolchain/check/testdata/let/fail_generic.carbon @@ -38,27 +38,27 @@ fn F(a: i32) -> i32 { // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %.2: i32 = int_literal 5 [template] -// CHECK:STDOUT: %ImplicitAs.type: type = generic_interface_type @ImplicitAs [template] -// CHECK:STDOUT: %ImplicitAs: %ImplicitAs.type = struct_value () [template] +// CHECK:STDOUT: %ImplicitAs.type.1: type = generic_interface_type @ImplicitAs [template] +// CHECK:STDOUT: %ImplicitAs: %ImplicitAs.type.1 = struct_value () [template] // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic] -// CHECK:STDOUT: %.3: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic] -// CHECK:STDOUT: %Self.1: @ImplicitAs.%.1 (%.3) = bind_symbolic_name Self, 1 [symbolic] -// CHECK:STDOUT: %Self.2: %.3 = bind_symbolic_name Self, 1 [symbolic] +// CHECK:STDOUT: %ImplicitAs.type.2: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic] +// CHECK:STDOUT: %Self.1: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2) = bind_symbolic_name Self, 1 [symbolic] +// CHECK:STDOUT: %Self.2: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: %Convert.type.1: type = fn_type @Convert, @ImplicitAs(%Dest) [symbolic] // CHECK:STDOUT: %Convert.1: %Convert.type.1 = struct_value () [symbolic] -// CHECK:STDOUT: %.4: type = assoc_entity_type %.3, %Convert.type.1 [symbolic] -// CHECK:STDOUT: %.5: %.4 = assoc_entity element0, imports.%import_ref.6 [symbolic] -// CHECK:STDOUT: %.6: type = interface_type @ImplicitAs, @ImplicitAs(%T) [symbolic] +// CHECK:STDOUT: %.3: type = assoc_entity_type %ImplicitAs.type.2, %Convert.type.1 [symbolic] +// CHECK:STDOUT: %.4: %.3 = assoc_entity element0, imports.%import_ref.6 [symbolic] +// CHECK:STDOUT: %ImplicitAs.type.3: type = interface_type @ImplicitAs, @ImplicitAs(%T) [symbolic] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert, @ImplicitAs(%T) [symbolic] // CHECK:STDOUT: %Convert.2: %Convert.type.2 = struct_value () [symbolic] -// CHECK:STDOUT: %.7: type = assoc_entity_type %.6, %Convert.type.2 [symbolic] -// CHECK:STDOUT: %.8: %.7 = assoc_entity element0, imports.%import_ref.6 [symbolic] -// CHECK:STDOUT: %.9: %.4 = assoc_entity element0, imports.%import_ref.7 [symbolic] -// CHECK:STDOUT: %.10: type = interface_type @ImplicitAs, @ImplicitAs(i32) [template] +// CHECK:STDOUT: %.5: type = assoc_entity_type %ImplicitAs.type.3, %Convert.type.2 [symbolic] +// CHECK:STDOUT: %.6: %.5 = assoc_entity element0, imports.%import_ref.6 [symbolic] +// CHECK:STDOUT: %.7: %.3 = assoc_entity element0, imports.%import_ref.7 [symbolic] +// CHECK:STDOUT: %ImplicitAs.type.4: type = interface_type @ImplicitAs, @ImplicitAs(i32) [template] // CHECK:STDOUT: %Convert.type.3: type = fn_type @Convert, @ImplicitAs(i32) [template] // CHECK:STDOUT: %Convert.3: %Convert.type.3 = struct_value () [template] -// CHECK:STDOUT: %.11: type = assoc_entity_type %.10, %Convert.type.3 [template] -// CHECK:STDOUT: %.12: %.11 = assoc_entity element0, imports.%import_ref.6 [template] +// CHECK:STDOUT: %.8: type = assoc_entity_type %ImplicitAs.type.4, %Convert.type.3 [template] +// CHECK:STDOUT: %.9: %.8 = assoc_entity element0, imports.%import_ref.6 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -75,9 +75,9 @@ fn F(a: i32) -> i32 { // CHECK:STDOUT: import Core//prelude/types/bool // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref Core//prelude/types, inst+4, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.2: %ImplicitAs.type = import_ref Core//prelude/operators/as, inst+40, loaded [template = constants.%ImplicitAs] +// CHECK:STDOUT: %import_ref.2: %ImplicitAs.type.1 = import_ref Core//prelude/operators/as, inst+40, loaded [template = constants.%ImplicitAs] // CHECK:STDOUT: %import_ref.3 = import_ref Core//prelude/operators/as, inst+45, unloaded -// CHECK:STDOUT: %import_ref.4: @ImplicitAs.%.2 (%.4) = import_ref Core//prelude/operators/as, inst+63, loaded [symbolic = @ImplicitAs.%.3 (constants.%.9)] +// CHECK:STDOUT: %import_ref.4: @ImplicitAs.%.1 (%.3) = import_ref Core//prelude/operators/as, inst+63, loaded [symbolic = @ImplicitAs.%.2 (constants.%.7)] // CHECK:STDOUT: %import_ref.5 = import_ref Core//prelude/operators/as, inst+56, unloaded // CHECK:STDOUT: %import_ref.6 = import_ref Core//prelude/operators/as, inst+56, unloaded // CHECK:STDOUT: %import_ref.7 = import_ref Core//prelude/operators/as, inst+56, unloaded @@ -108,12 +108,12 @@ fn F(a: i32) -> i32 { // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic = %Dest (constants.%Dest)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.1: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic = %.1 (constants.%.3)] -// CHECK:STDOUT: %Self: %.3 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] +// CHECK:STDOUT: %ImplicitAs.type: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.2)] +// CHECK:STDOUT: %Self: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] // CHECK:STDOUT: %Convert.type: type = fn_type @Convert, @ImplicitAs(%Dest) [symbolic = %Convert.type (constants.%Convert.type.1)] // CHECK:STDOUT: %Convert: @ImplicitAs.%Convert.type (%Convert.type.1) = struct_value () [symbolic = %Convert (constants.%Convert.1)] -// CHECK:STDOUT: %.2: type = assoc_entity_type @ImplicitAs.%.1 (%.3), @ImplicitAs.%Convert.type (%Convert.type.1) [symbolic = %.2 (constants.%.4)] -// CHECK:STDOUT: %.3: @ImplicitAs.%.2 (%.4) = assoc_entity element0, imports.%import_ref.6 [symbolic = %.3 (constants.%.5)] +// CHECK:STDOUT: %.1: type = assoc_entity_type @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2), @ImplicitAs.%Convert.type (%Convert.type.1) [symbolic = %.1 (constants.%.3)] +// CHECK:STDOUT: %.2: @ImplicitAs.%.1 (%.3) = assoc_entity element0, imports.%import_ref.6 [symbolic = %.2 (constants.%.4)] // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: !members: @@ -133,23 +133,23 @@ fn F(a: i32) -> i32 { // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0, %.loc13_21.2 [symbolic = constants.%T] // CHECK:STDOUT: %T.ref: type = name_ref T, %T [symbolic = constants.%T] // CHECK:STDOUT: %.loc21_14: i32 = int_literal 5 [template = constants.%.2] -// CHECK:STDOUT: %.loc21_15.1: type = interface_type @ImplicitAs, @ImplicitAs(constants.%T) [symbolic = constants.%.6] -// CHECK:STDOUT: %.loc21_15.2: %.7 = specific_constant imports.%import_ref.4, @ImplicitAs(constants.%T) [symbolic = constants.%.8] -// CHECK:STDOUT: %Convert.ref.loc21: %.7 = name_ref Convert, %.loc21_15.2 [symbolic = constants.%.8] -// CHECK:STDOUT: %.loc21_15.3: %T = converted %.loc21_14, [template = ] +// CHECK:STDOUT: %ImplicitAs.type.loc21: type = interface_type @ImplicitAs, @ImplicitAs(constants.%T) [symbolic = constants.%ImplicitAs.type.3] +// CHECK:STDOUT: %.loc21_15.1: %.5 = specific_constant imports.%import_ref.4, @ImplicitAs(constants.%T) [symbolic = constants.%.6] +// CHECK:STDOUT: %Convert.ref.loc21: %.5 = name_ref Convert, %.loc21_15.1 [symbolic = constants.%.6] +// CHECK:STDOUT: %.loc21_15.2: %T = converted %.loc21_14, [template = ] // CHECK:STDOUT: %x: %T = bind_name x, // CHECK:STDOUT: %x.ref: %T = name_ref x, %x -// CHECK:STDOUT: %.loc28_11.1: type = interface_type @ImplicitAs, @ImplicitAs(i32) [template = constants.%.10] -// CHECK:STDOUT: %.loc28_11.2: %.11 = specific_constant imports.%import_ref.4, @ImplicitAs(i32) [template = constants.%.12] -// CHECK:STDOUT: %Convert.ref.loc28: %.11 = name_ref Convert, %.loc28_11.2 [template = constants.%.12] -// CHECK:STDOUT: %.loc28_11.3: i32 = converted %x.ref, [template = ] +// CHECK:STDOUT: %ImplicitAs.type.loc28: type = interface_type @ImplicitAs, @ImplicitAs(i32) [template = constants.%ImplicitAs.type.4] +// CHECK:STDOUT: %.loc28_11.1: %.8 = specific_constant imports.%import_ref.4, @ImplicitAs(i32) [template = constants.%.9] +// CHECK:STDOUT: %Convert.ref.loc28: %.8 = name_ref Convert, %.loc28_11.1 [template = constants.%.9] +// CHECK:STDOUT: %.loc28_11.2: i32 = converted %x.ref, [template = ] // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @Convert(constants.%Dest: type, constants.%Self.1: @ImplicitAs.%.1 (%.3)) { +// CHECK:STDOUT: generic fn @Convert(constants.%Dest: type, constants.%Self.1: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2)) { // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic = %Dest (constants.%Dest)] -// CHECK:STDOUT: %.1: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic = %.1 (constants.%.3)] -// CHECK:STDOUT: %Self: %.3 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] +// CHECK:STDOUT: %ImplicitAs.type: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.2)] +// CHECK:STDOUT: %Self: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] // CHECK:STDOUT: // CHECK:STDOUT: fn[%self: @Convert.%Self (%Self.2)]() -> @Convert.%Dest (%Dest); // CHECK:STDOUT: } @@ -168,7 +168,7 @@ fn F(a: i32) -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: specific @Convert(constants.%Dest, constants.%Self.1) { // CHECK:STDOUT: %Dest => constants.%Dest -// CHECK:STDOUT: %.1 => constants.%.3 +// CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.2 // CHECK:STDOUT: %Self => constants.%Self.1 // CHECK:STDOUT: } // CHECK:STDOUT: @@ -176,23 +176,23 @@ fn F(a: i32) -> i32 { // CHECK:STDOUT: %Dest => constants.%T // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.1 => constants.%.6 +// CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.3 // CHECK:STDOUT: %Self => constants.%Self.2 // CHECK:STDOUT: %Convert.type => constants.%Convert.type.2 // CHECK:STDOUT: %Convert => constants.%Convert.2 -// CHECK:STDOUT: %.2 => constants.%.7 -// CHECK:STDOUT: %.3 => constants.%.8 +// CHECK:STDOUT: %.1 => constants.%.5 +// CHECK:STDOUT: %.2 => constants.%.6 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @ImplicitAs(i32) { // CHECK:STDOUT: %Dest => i32 // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.1 => constants.%.10 +// CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.4 // CHECK:STDOUT: %Self => constants.%Self.2 // CHECK:STDOUT: %Convert.type => constants.%Convert.type.3 // CHECK:STDOUT: %Convert => constants.%Convert.3 -// CHECK:STDOUT: %.2 => constants.%.11 -// CHECK:STDOUT: %.3 => constants.%.12 +// CHECK:STDOUT: %.1 => constants.%.8 +// CHECK:STDOUT: %.2 => constants.%.9 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/operators/builtin/fail_type_mismatch.carbon b/toolchain/check/testdata/operators/builtin/fail_type_mismatch.carbon index a9eae01f612d2..fbeecc8d715a7 100644 --- a/toolchain/check/testdata/operators/builtin/fail_type_mismatch.carbon +++ b/toolchain/check/testdata/operators/builtin/fail_type_mismatch.carbon @@ -27,22 +27,22 @@ fn Main() { // CHECK:STDOUT: %Bool.type: type = fn_type @Bool [template] // CHECK:STDOUT: %Bool: %Bool.type = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 12 [template] -// CHECK:STDOUT: %ImplicitAs.type: type = generic_interface_type @ImplicitAs [template] -// CHECK:STDOUT: %ImplicitAs: %ImplicitAs.type = struct_value () [template] +// CHECK:STDOUT: %ImplicitAs.type.1: type = generic_interface_type @ImplicitAs [template] +// CHECK:STDOUT: %ImplicitAs: %ImplicitAs.type.1 = struct_value () [template] // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic] -// CHECK:STDOUT: %.3: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic] -// CHECK:STDOUT: %Self.1: @ImplicitAs.%.1 (%.3) = bind_symbolic_name Self, 1 [symbolic] -// CHECK:STDOUT: %Self.2: %.3 = bind_symbolic_name Self, 1 [symbolic] +// CHECK:STDOUT: %ImplicitAs.type.2: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic] +// CHECK:STDOUT: %Self.1: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2) = bind_symbolic_name Self, 1 [symbolic] +// CHECK:STDOUT: %Self.2: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: %Convert.type.1: type = fn_type @Convert, @ImplicitAs(%Dest) [symbolic] // CHECK:STDOUT: %Convert.1: %Convert.type.1 = struct_value () [symbolic] -// CHECK:STDOUT: %.4: type = assoc_entity_type %.3, %Convert.type.1 [symbolic] -// CHECK:STDOUT: %.5: %.4 = assoc_entity element0, imports.%import_ref.6 [symbolic] -// CHECK:STDOUT: %.6: type = interface_type @ImplicitAs, @ImplicitAs(bool) [template] +// CHECK:STDOUT: %.3: type = assoc_entity_type %ImplicitAs.type.2, %Convert.type.1 [symbolic] +// CHECK:STDOUT: %.4: %.3 = assoc_entity element0, imports.%import_ref.6 [symbolic] +// CHECK:STDOUT: %ImplicitAs.type.3: type = interface_type @ImplicitAs, @ImplicitAs(bool) [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert, @ImplicitAs(bool) [template] // CHECK:STDOUT: %Convert.2: %Convert.type.2 = struct_value () [template] -// CHECK:STDOUT: %.7: type = assoc_entity_type %.6, %Convert.type.2 [template] -// CHECK:STDOUT: %.8: %.7 = assoc_entity element0, imports.%import_ref.6 [template] -// CHECK:STDOUT: %.9: %.4 = assoc_entity element0, imports.%import_ref.7 [symbolic] +// CHECK:STDOUT: %.5: type = assoc_entity_type %ImplicitAs.type.3, %Convert.type.2 [template] +// CHECK:STDOUT: %.6: %.5 = assoc_entity element0, imports.%import_ref.6 [template] +// CHECK:STDOUT: %.7: %.3 = assoc_entity element0, imports.%import_ref.7 [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -59,9 +59,9 @@ fn Main() { // CHECK:STDOUT: import Core//prelude/types/bool // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.1: %Bool.type = import_ref Core//prelude/types/bool, inst+2, loaded [template = constants.%Bool] -// CHECK:STDOUT: %import_ref.2: %ImplicitAs.type = import_ref Core//prelude/operators/as, inst+40, loaded [template = constants.%ImplicitAs] +// CHECK:STDOUT: %import_ref.2: %ImplicitAs.type.1 = import_ref Core//prelude/operators/as, inst+40, loaded [template = constants.%ImplicitAs] // CHECK:STDOUT: %import_ref.3 = import_ref Core//prelude/operators/as, inst+45, unloaded -// CHECK:STDOUT: %import_ref.4: @ImplicitAs.%.2 (%.4) = import_ref Core//prelude/operators/as, inst+63, loaded [symbolic = @ImplicitAs.%.3 (constants.%.9)] +// CHECK:STDOUT: %import_ref.4: @ImplicitAs.%.1 (%.3) = import_ref Core//prelude/operators/as, inst+63, loaded [symbolic = @ImplicitAs.%.2 (constants.%.7)] // CHECK:STDOUT: %import_ref.5 = import_ref Core//prelude/operators/as, inst+56, unloaded // CHECK:STDOUT: %import_ref.6 = import_ref Core//prelude/operators/as, inst+56, unloaded // CHECK:STDOUT: %import_ref.7 = import_ref Core//prelude/operators/as, inst+56, unloaded @@ -80,12 +80,12 @@ fn Main() { // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic = %Dest (constants.%Dest)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.1: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic = %.1 (constants.%.3)] -// CHECK:STDOUT: %Self: %.3 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] +// CHECK:STDOUT: %ImplicitAs.type: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.2)] +// CHECK:STDOUT: %Self: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] // CHECK:STDOUT: %Convert.type: type = fn_type @Convert, @ImplicitAs(%Dest) [symbolic = %Convert.type (constants.%Convert.type.1)] // CHECK:STDOUT: %Convert: @ImplicitAs.%Convert.type (%Convert.type.1) = struct_value () [symbolic = %Convert (constants.%Convert.1)] -// CHECK:STDOUT: %.2: type = assoc_entity_type @ImplicitAs.%.1 (%.3), @ImplicitAs.%Convert.type (%Convert.type.1) [symbolic = %.2 (constants.%.4)] -// CHECK:STDOUT: %.3: @ImplicitAs.%.2 (%.4) = assoc_entity element0, imports.%import_ref.6 [symbolic = %.3 (constants.%.5)] +// CHECK:STDOUT: %.1: type = assoc_entity_type @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2), @ImplicitAs.%Convert.type (%Convert.type.1) [symbolic = %.1 (constants.%.3)] +// CHECK:STDOUT: %.2: @ImplicitAs.%.1 (%.3) = assoc_entity element0, imports.%import_ref.6 [symbolic = %.2 (constants.%.4)] // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: !members: @@ -103,21 +103,21 @@ fn Main() { // CHECK:STDOUT: %x.var: ref bool = var x // CHECK:STDOUT: %x: ref bool = bind_name x, %x.var // CHECK:STDOUT: %.loc18_21: i32 = int_literal 12 [template = constants.%.2] -// CHECK:STDOUT: %.loc18_17.1: type = interface_type @ImplicitAs, @ImplicitAs(bool) [template = constants.%.6] -// CHECK:STDOUT: %.loc18_17.2: %.7 = specific_constant imports.%import_ref.4, @ImplicitAs(bool) [template = constants.%.8] -// CHECK:STDOUT: %Convert.ref: %.7 = name_ref Convert, %.loc18_17.2 [template = constants.%.8] -// CHECK:STDOUT: %.loc18_17.3: bool = converted %.loc18_21, [template = ] -// CHECK:STDOUT: %.loc18_17.4: = not [template = ] +// CHECK:STDOUT: %ImplicitAs.type: type = interface_type @ImplicitAs, @ImplicitAs(bool) [template = constants.%ImplicitAs.type.3] +// CHECK:STDOUT: %.loc18_17.1: %.5 = specific_constant imports.%import_ref.4, @ImplicitAs(bool) [template = constants.%.6] +// CHECK:STDOUT: %Convert.ref: %.5 = name_ref Convert, %.loc18_17.1 [template = constants.%.6] +// CHECK:STDOUT: %.loc18_17.2: bool = converted %.loc18_21, [template = ] +// CHECK:STDOUT: %.loc18_17.3: = not [template = ] // CHECK:STDOUT: assign %x.var, // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Bool() -> type = "bool.make_type"; // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @Convert(constants.%Dest: type, constants.%Self.1: @ImplicitAs.%.1 (%.3)) { +// CHECK:STDOUT: generic fn @Convert(constants.%Dest: type, constants.%Self.1: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2)) { // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic = %Dest (constants.%Dest)] -// CHECK:STDOUT: %.1: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic = %.1 (constants.%.3)] -// CHECK:STDOUT: %Self: %.3 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] +// CHECK:STDOUT: %ImplicitAs.type: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.2)] +// CHECK:STDOUT: %Self: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] // CHECK:STDOUT: // CHECK:STDOUT: fn[%self: @Convert.%Self (%Self.2)]() -> @Convert.%Dest (%Dest); // CHECK:STDOUT: } @@ -136,7 +136,7 @@ fn Main() { // CHECK:STDOUT: // CHECK:STDOUT: specific @Convert(constants.%Dest, constants.%Self.1) { // CHECK:STDOUT: %Dest => constants.%Dest -// CHECK:STDOUT: %.1 => constants.%.3 +// CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.2 // CHECK:STDOUT: %Self => constants.%Self.1 // CHECK:STDOUT: } // CHECK:STDOUT: @@ -144,11 +144,11 @@ fn Main() { // CHECK:STDOUT: %Dest => bool // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.1 => constants.%.6 +// CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.3 // CHECK:STDOUT: %Self => constants.%Self.2 // CHECK:STDOUT: %Convert.type => constants.%Convert.type.2 // CHECK:STDOUT: %Convert => constants.%Convert.2 -// CHECK:STDOUT: %.2 => constants.%.7 -// CHECK:STDOUT: %.3 => constants.%.8 +// CHECK:STDOUT: %.1 => constants.%.5 +// CHECK:STDOUT: %.2 => constants.%.6 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/operators/builtin/fail_type_mismatch_assignment.carbon b/toolchain/check/testdata/operators/builtin/fail_type_mismatch_assignment.carbon index f66e7c26b76e2..bbf9858596be2 100644 --- a/toolchain/check/testdata/operators/builtin/fail_type_mismatch_assignment.carbon +++ b/toolchain/check/testdata/operators/builtin/fail_type_mismatch_assignment.carbon @@ -29,22 +29,22 @@ fn Main() { // CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 3 [template] // CHECK:STDOUT: %.3: f64 = float_literal 5.6000000000000005 [template] -// CHECK:STDOUT: %ImplicitAs.type: type = generic_interface_type @ImplicitAs [template] -// CHECK:STDOUT: %ImplicitAs: %ImplicitAs.type = struct_value () [template] +// CHECK:STDOUT: %ImplicitAs.type.1: type = generic_interface_type @ImplicitAs [template] +// CHECK:STDOUT: %ImplicitAs: %ImplicitAs.type.1 = struct_value () [template] // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic] -// CHECK:STDOUT: %.4: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic] -// CHECK:STDOUT: %Self.1: @ImplicitAs.%.1 (%.4) = bind_symbolic_name Self, 1 [symbolic] -// CHECK:STDOUT: %Self.2: %.4 = bind_symbolic_name Self, 1 [symbolic] +// CHECK:STDOUT: %ImplicitAs.type.2: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic] +// CHECK:STDOUT: %Self.1: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2) = bind_symbolic_name Self, 1 [symbolic] +// CHECK:STDOUT: %Self.2: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: %Convert.type.1: type = fn_type @Convert, @ImplicitAs(%Dest) [symbolic] // CHECK:STDOUT: %Convert.1: %Convert.type.1 = struct_value () [symbolic] -// CHECK:STDOUT: %.5: type = assoc_entity_type %.4, %Convert.type.1 [symbolic] -// CHECK:STDOUT: %.6: %.5 = assoc_entity element0, imports.%import_ref.6 [symbolic] -// CHECK:STDOUT: %.7: type = interface_type @ImplicitAs, @ImplicitAs(i32) [template] +// CHECK:STDOUT: %.4: type = assoc_entity_type %ImplicitAs.type.2, %Convert.type.1 [symbolic] +// CHECK:STDOUT: %.5: %.4 = assoc_entity element0, imports.%import_ref.6 [symbolic] +// CHECK:STDOUT: %ImplicitAs.type.3: type = interface_type @ImplicitAs, @ImplicitAs(i32) [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert, @ImplicitAs(i32) [template] // CHECK:STDOUT: %Convert.2: %Convert.type.2 = struct_value () [template] -// CHECK:STDOUT: %.8: type = assoc_entity_type %.7, %Convert.type.2 [template] -// CHECK:STDOUT: %.9: %.8 = assoc_entity element0, imports.%import_ref.6 [template] -// CHECK:STDOUT: %.10: %.5 = assoc_entity element0, imports.%import_ref.7 [symbolic] +// CHECK:STDOUT: %.6: type = assoc_entity_type %ImplicitAs.type.3, %Convert.type.2 [template] +// CHECK:STDOUT: %.7: %.6 = assoc_entity element0, imports.%import_ref.6 [template] +// CHECK:STDOUT: %.8: %.4 = assoc_entity element0, imports.%import_ref.7 [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -61,9 +61,9 @@ fn Main() { // CHECK:STDOUT: import Core//prelude/types/bool // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref Core//prelude/types, inst+4, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.2: %ImplicitAs.type = import_ref Core//prelude/operators/as, inst+40, loaded [template = constants.%ImplicitAs] +// CHECK:STDOUT: %import_ref.2: %ImplicitAs.type.1 = import_ref Core//prelude/operators/as, inst+40, loaded [template = constants.%ImplicitAs] // CHECK:STDOUT: %import_ref.3 = import_ref Core//prelude/operators/as, inst+45, unloaded -// CHECK:STDOUT: %import_ref.4: @ImplicitAs.%.2 (%.5) = import_ref Core//prelude/operators/as, inst+63, loaded [symbolic = @ImplicitAs.%.3 (constants.%.10)] +// CHECK:STDOUT: %import_ref.4: @ImplicitAs.%.1 (%.4) = import_ref Core//prelude/operators/as, inst+63, loaded [symbolic = @ImplicitAs.%.2 (constants.%.8)] // CHECK:STDOUT: %import_ref.5 = import_ref Core//prelude/operators/as, inst+56, unloaded // CHECK:STDOUT: %import_ref.6 = import_ref Core//prelude/operators/as, inst+56, unloaded // CHECK:STDOUT: %import_ref.7 = import_ref Core//prelude/operators/as, inst+56, unloaded @@ -82,12 +82,12 @@ fn Main() { // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic = %Dest (constants.%Dest)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.1: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic = %.1 (constants.%.4)] -// CHECK:STDOUT: %Self: %.4 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] +// CHECK:STDOUT: %ImplicitAs.type: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.2)] +// CHECK:STDOUT: %Self: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] // CHECK:STDOUT: %Convert.type: type = fn_type @Convert, @ImplicitAs(%Dest) [symbolic = %Convert.type (constants.%Convert.type.1)] // CHECK:STDOUT: %Convert: @ImplicitAs.%Convert.type (%Convert.type.1) = struct_value () [symbolic = %Convert (constants.%Convert.1)] -// CHECK:STDOUT: %.2: type = assoc_entity_type @ImplicitAs.%.1 (%.4), @ImplicitAs.%Convert.type (%Convert.type.1) [symbolic = %.2 (constants.%.5)] -// CHECK:STDOUT: %.3: @ImplicitAs.%.2 (%.5) = assoc_entity element0, imports.%import_ref.6 [symbolic = %.3 (constants.%.6)] +// CHECK:STDOUT: %.1: type = assoc_entity_type @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2), @ImplicitAs.%Convert.type (%Convert.type.1) [symbolic = %.1 (constants.%.4)] +// CHECK:STDOUT: %.2: @ImplicitAs.%.1 (%.4) = assoc_entity element0, imports.%import_ref.6 [symbolic = %.2 (constants.%.5)] // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: !members: @@ -108,20 +108,20 @@ fn Main() { // CHECK:STDOUT: assign %a.var, %.loc12_16 // CHECK:STDOUT: %a.ref: ref i32 = name_ref a, %a // CHECK:STDOUT: %.loc19_7: f64 = float_literal 5.6000000000000005 [template = constants.%.3] -// CHECK:STDOUT: %.loc19_5.1: type = interface_type @ImplicitAs, @ImplicitAs(i32) [template = constants.%.7] -// CHECK:STDOUT: %.loc19_5.2: %.8 = specific_constant imports.%import_ref.4, @ImplicitAs(i32) [template = constants.%.9] -// CHECK:STDOUT: %Convert.ref: %.8 = name_ref Convert, %.loc19_5.2 [template = constants.%.9] -// CHECK:STDOUT: %.loc19_5.3: i32 = converted %.loc19_7, [template = ] +// CHECK:STDOUT: %ImplicitAs.type: type = interface_type @ImplicitAs, @ImplicitAs(i32) [template = constants.%ImplicitAs.type.3] +// CHECK:STDOUT: %.loc19_5.1: %.6 = specific_constant imports.%import_ref.4, @ImplicitAs(i32) [template = constants.%.7] +// CHECK:STDOUT: %Convert.ref: %.6 = name_ref Convert, %.loc19_5.1 [template = constants.%.7] +// CHECK:STDOUT: %.loc19_5.2: i32 = converted %.loc19_7, [template = ] // CHECK:STDOUT: assign %a.ref, // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32"; // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @Convert(constants.%Dest: type, constants.%Self.1: @ImplicitAs.%.1 (%.4)) { +// CHECK:STDOUT: generic fn @Convert(constants.%Dest: type, constants.%Self.1: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2)) { // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic = %Dest (constants.%Dest)] -// CHECK:STDOUT: %.1: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic = %.1 (constants.%.4)] -// CHECK:STDOUT: %Self: %.4 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] +// CHECK:STDOUT: %ImplicitAs.type: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.2)] +// CHECK:STDOUT: %Self: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] // CHECK:STDOUT: // CHECK:STDOUT: fn[%self: @Convert.%Self (%Self.2)]() -> @Convert.%Dest (%Dest); // CHECK:STDOUT: } @@ -140,7 +140,7 @@ fn Main() { // CHECK:STDOUT: // CHECK:STDOUT: specific @Convert(constants.%Dest, constants.%Self.1) { // CHECK:STDOUT: %Dest => constants.%Dest -// CHECK:STDOUT: %.1 => constants.%.4 +// CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.2 // CHECK:STDOUT: %Self => constants.%Self.1 // CHECK:STDOUT: } // CHECK:STDOUT: @@ -148,11 +148,11 @@ fn Main() { // CHECK:STDOUT: %Dest => i32 // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.1 => constants.%.7 +// CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.3 // CHECK:STDOUT: %Self => constants.%Self.2 // CHECK:STDOUT: %Convert.type => constants.%Convert.type.2 // CHECK:STDOUT: %Convert => constants.%Convert.2 -// CHECK:STDOUT: %.2 => constants.%.8 -// CHECK:STDOUT: %.3 => constants.%.9 +// CHECK:STDOUT: %.1 => constants.%.6 +// CHECK:STDOUT: %.2 => constants.%.7 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/operators/builtin/fail_type_mismatch_once.carbon b/toolchain/check/testdata/operators/builtin/fail_type_mismatch_once.carbon index df373a702fa67..dae32aea361de 100644 --- a/toolchain/check/testdata/operators/builtin/fail_type_mismatch_once.carbon +++ b/toolchain/check/testdata/operators/builtin/fail_type_mismatch_once.carbon @@ -31,12 +31,12 @@ fn Main() -> i32 { // CHECK:STDOUT: %Main: %Main.type = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 12 [template] // CHECK:STDOUT: %.3: f64 = float_literal 3.4000000000000004 [template] -// CHECK:STDOUT: %.4: type = interface_type @Add [template] -// CHECK:STDOUT: %Self: %.4 = bind_symbolic_name Self, 0 [symbolic] +// CHECK:STDOUT: %Add.type: type = interface_type @Add [template] +// CHECK:STDOUT: %Self: %Add.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %Op.type: type = fn_type @Op [template] // CHECK:STDOUT: %Op: %Op.type = struct_value () [template] -// CHECK:STDOUT: %.5: type = assoc_entity_type %.4, %Op.type [template] -// CHECK:STDOUT: %.6: %.5 = assoc_entity element0, imports.%import_ref.6 [template] +// CHECK:STDOUT: %.4: type = assoc_entity_type %Add.type, %Op.type [template] +// CHECK:STDOUT: %.5: %.4 = assoc_entity element0, imports.%import_ref.6 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -53,9 +53,9 @@ fn Main() -> i32 { // CHECK:STDOUT: import Core//prelude/types/bool // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref Core//prelude/types, inst+4, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.2: type = import_ref Core//prelude/operators/arithmetic, inst+1, loaded [template = constants.%.4] +// CHECK:STDOUT: %import_ref.2: type = import_ref Core//prelude/operators/arithmetic, inst+1, loaded [template = constants.%Add.type] // CHECK:STDOUT: %import_ref.3 = import_ref Core//prelude/operators/arithmetic, inst+3, unloaded -// CHECK:STDOUT: %import_ref.4: %.5 = import_ref Core//prelude/operators/arithmetic, inst+27, loaded [template = constants.%.6] +// CHECK:STDOUT: %import_ref.4: %.4 = import_ref Core//prelude/operators/arithmetic, inst+27, loaded [template = constants.%.5] // CHECK:STDOUT: %import_ref.5 = import_ref Core//prelude/operators/arithmetic, inst+21, unloaded // CHECK:STDOUT: %import_ref.6 = import_ref Core//prelude/operators/arithmetic, inst+21, unloaded // CHECK:STDOUT: } @@ -87,14 +87,14 @@ fn Main() -> i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %.loc21_10: i32 = int_literal 12 [template = constants.%.2] // CHECK:STDOUT: %.loc21_15: f64 = float_literal 3.4000000000000004 [template = constants.%.3] -// CHECK:STDOUT: %Op.ref.loc21_13: %.5 = name_ref Op, imports.%import_ref.4 [template = constants.%.6] +// CHECK:STDOUT: %Op.ref.loc21_13: %.4 = name_ref Op, imports.%import_ref.4 [template = constants.%.5] // CHECK:STDOUT: %.loc21_21: i32 = int_literal 12 [template = constants.%.2] -// CHECK:STDOUT: %Op.ref.loc21_19: %.5 = name_ref Op, imports.%import_ref.4 [template = constants.%.6] +// CHECK:STDOUT: %Op.ref.loc21_19: %.4 = name_ref Op, imports.%import_ref.4 [template = constants.%.5] // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @Op(constants.%Self: %.4) { -// CHECK:STDOUT: %Self: %.4 = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self)] +// CHECK:STDOUT: generic fn @Op(constants.%Self: %Add.type) { +// CHECK:STDOUT: %Self: %Add.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self)] // CHECK:STDOUT: // CHECK:STDOUT: fn[%self: @Op.%Self (%Self)](%other: @Op.%Self (%Self)) -> @Op.%Self (%Self); // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/operators/builtin/fail_unimplemented_op.carbon b/toolchain/check/testdata/operators/builtin/fail_unimplemented_op.carbon index 29311da212c5a..f06a98519af9a 100644 --- a/toolchain/check/testdata/operators/builtin/fail_unimplemented_op.carbon +++ b/toolchain/check/testdata/operators/builtin/fail_unimplemented_op.carbon @@ -25,12 +25,12 @@ fn Main() -> i32 { // CHECK:STDOUT: %Main: %Main.type = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 12 [template] // CHECK:STDOUT: %.3: i32 = int_literal 34 [template] -// CHECK:STDOUT: %.4: type = interface_type @Add [template] -// CHECK:STDOUT: %Self: %.4 = bind_symbolic_name Self, 0 [symbolic] +// CHECK:STDOUT: %Add.type: type = interface_type @Add [template] +// CHECK:STDOUT: %Self: %Add.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %Op.type: type = fn_type @Op [template] // CHECK:STDOUT: %Op: %Op.type = struct_value () [template] -// CHECK:STDOUT: %.5: type = assoc_entity_type %.4, %Op.type [template] -// CHECK:STDOUT: %.6: %.5 = assoc_entity element0, imports.%import_ref.6 [template] +// CHECK:STDOUT: %.4: type = assoc_entity_type %Add.type, %Op.type [template] +// CHECK:STDOUT: %.5: %.4 = assoc_entity element0, imports.%import_ref.6 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -47,9 +47,9 @@ fn Main() -> i32 { // CHECK:STDOUT: import Core//prelude/types/bool // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref Core//prelude/types, inst+4, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.2: type = import_ref Core//prelude/operators/arithmetic, inst+1, loaded [template = constants.%.4] +// CHECK:STDOUT: %import_ref.2: type = import_ref Core//prelude/operators/arithmetic, inst+1, loaded [template = constants.%Add.type] // CHECK:STDOUT: %import_ref.3 = import_ref Core//prelude/operators/arithmetic, inst+3, unloaded -// CHECK:STDOUT: %import_ref.4: %.5 = import_ref Core//prelude/operators/arithmetic, inst+27, loaded [template = constants.%.6] +// CHECK:STDOUT: %import_ref.4: %.4 = import_ref Core//prelude/operators/arithmetic, inst+27, loaded [template = constants.%.5] // CHECK:STDOUT: %import_ref.5 = import_ref Core//prelude/operators/arithmetic, inst+21, unloaded // CHECK:STDOUT: %import_ref.6 = import_ref Core//prelude/operators/arithmetic, inst+21, unloaded // CHECK:STDOUT: } @@ -81,12 +81,12 @@ fn Main() -> i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %.loc15_10: i32 = int_literal 12 [template = constants.%.2] // CHECK:STDOUT: %.loc15_15: i32 = int_literal 34 [template = constants.%.3] -// CHECK:STDOUT: %Op.ref: %.5 = name_ref Op, imports.%import_ref.4 [template = constants.%.6] +// CHECK:STDOUT: %Op.ref: %.4 = name_ref Op, imports.%import_ref.4 [template = constants.%.5] // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @Op(constants.%Self: %.4) { -// CHECK:STDOUT: %Self: %.4 = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self)] +// CHECK:STDOUT: generic fn @Op(constants.%Self: %Add.type) { +// CHECK:STDOUT: %Self: %Add.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self)] // CHECK:STDOUT: // CHECK:STDOUT: fn[%self: @Op.%Self (%Self)](%other: @Op.%Self (%Self)) -> @Op.%Self (%Self); // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/operators/overloaded/add.carbon b/toolchain/check/testdata/operators/overloaded/add.carbon index 9f99c3120c878..b23e58cdb4a13 100644 --- a/toolchain/check/testdata/operators/overloaded/add.carbon +++ b/toolchain/check/testdata/operators/overloaded/add.carbon @@ -37,33 +37,33 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %.1: type = struct_type {} [template] // CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] -// CHECK:STDOUT: %.3: type = interface_type @Add [template] -// CHECK:STDOUT: %Self.1: %.3 = bind_symbolic_name Self, 0 [symbolic] +// CHECK:STDOUT: %Add.type: type = interface_type @Add [template] +// CHECK:STDOUT: %Self.1: %Add.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %Op.type.1: type = fn_type @Op.1 [template] -// CHECK:STDOUT: %.4: type = tuple_type () [template] +// CHECK:STDOUT: %.3: type = tuple_type () [template] // CHECK:STDOUT: %Op.1: %Op.type.1 = struct_value () [template] // CHECK:STDOUT: %Op.type.2: type = fn_type @Op.2 [template] // CHECK:STDOUT: %Op.2: %Op.type.2 = struct_value () [template] -// CHECK:STDOUT: %.5: = interface_witness (%Op.1) [template] -// CHECK:STDOUT: %.6: type = ptr_type %.1 [template] +// CHECK:STDOUT: %.4: = interface_witness (%Op.1) [template] +// CHECK:STDOUT: %.5: type = ptr_type %.1 [template] // CHECK:STDOUT: %struct: %C = struct_value () [template] -// CHECK:STDOUT: %.7: type = interface_type @AddAssign [template] -// CHECK:STDOUT: %Self.2: %.7 = bind_symbolic_name Self, 0 [symbolic] -// CHECK:STDOUT: %.8: type = ptr_type %C [template] +// CHECK:STDOUT: %AddAssign.type: type = interface_type @AddAssign [template] +// CHECK:STDOUT: %Self.2: %AddAssign.type = bind_symbolic_name Self, 0 [symbolic] +// CHECK:STDOUT: %.6: type = ptr_type %C [template] // CHECK:STDOUT: %Op.type.3: type = fn_type @Op.3 [template] // CHECK:STDOUT: %Op.3: %Op.type.3 = struct_value () [template] // CHECK:STDOUT: %Op.type.4: type = fn_type @Op.4 [template] // CHECK:STDOUT: %Op.4: %Op.type.4 = struct_value () [template] -// CHECK:STDOUT: %.9: type = ptr_type %Self.2 [symbolic] -// CHECK:STDOUT: %.10: = interface_witness (%Op.3) [template] +// CHECK:STDOUT: %.7: type = ptr_type %Self.2 [symbolic] +// CHECK:STDOUT: %.8: = interface_witness (%Op.3) [template] // CHECK:STDOUT: %TestOp.type: type = fn_type @TestOp [template] // CHECK:STDOUT: %TestOp: %TestOp.type = struct_value () [template] -// CHECK:STDOUT: %.11: type = assoc_entity_type %.3, %Op.type.2 [template] -// CHECK:STDOUT: %.12: %.11 = assoc_entity element0, imports.%import_ref.9 [template] +// CHECK:STDOUT: %.9: type = assoc_entity_type %Add.type, %Op.type.2 [template] +// CHECK:STDOUT: %.10: %.9 = assoc_entity element0, imports.%import_ref.9 [template] // CHECK:STDOUT: %TestAssign.type: type = fn_type @TestAssign [template] // CHECK:STDOUT: %TestAssign: %TestAssign.type = struct_value () [template] -// CHECK:STDOUT: %.13: type = assoc_entity_type %.7, %Op.type.4 [template] -// CHECK:STDOUT: %.14: %.13 = assoc_entity element0, imports.%import_ref.10 [template] +// CHECK:STDOUT: %.11: type = assoc_entity_type %AddAssign.type, %Op.type.4 [template] +// CHECK:STDOUT: %.12: %.11 = assoc_entity element0, imports.%import_ref.10 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -79,13 +79,13 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: import Core//prelude/operators/comparison // CHECK:STDOUT: import Core//prelude/types/bool // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.1: type = import_ref Core//prelude/operators/arithmetic, inst+1, loaded [template = constants.%.3] +// CHECK:STDOUT: %import_ref.1: type = import_ref Core//prelude/operators/arithmetic, inst+1, loaded [template = constants.%Add.type] // CHECK:STDOUT: %import_ref.2 = import_ref Core//prelude/operators/arithmetic, inst+3, unloaded -// CHECK:STDOUT: %import_ref.3: %.11 = import_ref Core//prelude/operators/arithmetic, inst+27, loaded [template = constants.%.12] +// CHECK:STDOUT: %import_ref.3: %.9 = import_ref Core//prelude/operators/arithmetic, inst+27, loaded [template = constants.%.10] // CHECK:STDOUT: %import_ref.4: %Op.type.2 = import_ref Core//prelude/operators/arithmetic, inst+21, loaded [template = constants.%Op.2] -// CHECK:STDOUT: %import_ref.5: type = import_ref Core//prelude/operators/arithmetic, inst+29, loaded [template = constants.%.7] +// CHECK:STDOUT: %import_ref.5: type = import_ref Core//prelude/operators/arithmetic, inst+29, loaded [template = constants.%AddAssign.type] // CHECK:STDOUT: %import_ref.6 = import_ref Core//prelude/operators/arithmetic, inst+31, unloaded -// CHECK:STDOUT: %import_ref.7: %.13 = import_ref Core//prelude/operators/arithmetic, inst+54, loaded [template = constants.%.14] +// CHECK:STDOUT: %import_ref.7: %.11 = import_ref Core//prelude/operators/arithmetic, inst+54, loaded [template = constants.%.12] // CHECK:STDOUT: %import_ref.8: %Op.type.4 = import_ref Core//prelude/operators/arithmetic, inst+48, loaded [template = constants.%Op.4] // CHECK:STDOUT: %import_ref.9 = import_ref Core//prelude/operators/arithmetic, inst+21, unloaded // CHECK:STDOUT: %import_ref.10 = import_ref Core//prelude/operators/arithmetic, inst+48, unloaded @@ -103,12 +103,12 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: impl_decl @impl.1 [template] {} { // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %Core.ref: = name_ref Core, imports.%Core [template = imports.%Core] -// CHECK:STDOUT: %Add.ref: type = name_ref Add, imports.%import_ref.1 [template = constants.%.3] +// CHECK:STDOUT: %Add.ref: type = name_ref Add, imports.%import_ref.1 [template = constants.%Add.type] // CHECK:STDOUT: } // CHECK:STDOUT: impl_decl @impl.2 [template] {} { // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %Core.ref: = name_ref Core, imports.%Core [template = imports.%Core] -// CHECK:STDOUT: %AddAssign.ref: type = name_ref AddAssign, imports.%import_ref.5 [template = constants.%.7] +// CHECK:STDOUT: %AddAssign.ref: type = name_ref AddAssign, imports.%import_ref.5 [template = constants.%AddAssign.type] // CHECK:STDOUT: } // CHECK:STDOUT: %TestOp.decl: %TestOp.type = fn_decl @TestOp [template = constants.%TestOp] { // CHECK:STDOUT: %a.patt: %C = binding_pattern a @@ -124,13 +124,13 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %return: ref %C = var // CHECK:STDOUT: } // CHECK:STDOUT: %TestAssign.decl: %TestAssign.type = fn_decl @TestAssign [template = constants.%TestAssign] { -// CHECK:STDOUT: %a.patt: %.8 = binding_pattern a +// CHECK:STDOUT: %a.patt: %.6 = binding_pattern a // CHECK:STDOUT: %b.patt: %C = binding_pattern b // CHECK:STDOUT: } { // CHECK:STDOUT: %C.ref.loc30_18: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %.loc30: type = ptr_type %C [template = constants.%.8] -// CHECK:STDOUT: %a.param: %.8 = param a, runtime_param0 -// CHECK:STDOUT: %a: %.8 = bind_name a, %a.param +// CHECK:STDOUT: %.loc30: type = ptr_type %C [template = constants.%.6] +// CHECK:STDOUT: %a.param: %.6 = param a, runtime_param0 +// CHECK:STDOUT: %a: %.6 = bind_name a, %a.param // CHECK:STDOUT: %C.ref.loc30_25: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %b.param: %C = param b, runtime_param1 // CHECK:STDOUT: %b: %C = bind_name b, %b.param @@ -165,7 +165,7 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %C.ref.loc18_31: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %return: ref %C = var // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc17: = interface_witness (%Op.decl) [template = constants.%.5] +// CHECK:STDOUT: %.loc17: = interface_witness (%Op.decl) [template = constants.%.4] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Op = %Op.decl @@ -174,19 +174,19 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.2: %C.ref as %AddAssign.ref { // CHECK:STDOUT: %Op.decl: %Op.type.3 = fn_decl @Op.3 [template = constants.%Op.3] { -// CHECK:STDOUT: %self.patt: %.8 = binding_pattern self +// CHECK:STDOUT: %self.patt: %.6 = binding_pattern self // CHECK:STDOUT: %other.patt: %C = binding_pattern other // CHECK:STDOUT: } { // CHECK:STDOUT: %C.ref.loc23_20: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %.loc23_21: type = ptr_type %C [template = constants.%.8] -// CHECK:STDOUT: %self.param: %.8 = param self, runtime_param0 -// CHECK:STDOUT: %self: %.8 = bind_name self, %self.param -// CHECK:STDOUT: %.loc23_9: %.8 = addr_pattern %self +// CHECK:STDOUT: %.loc23_21: type = ptr_type %C [template = constants.%.6] +// CHECK:STDOUT: %self.param: %.6 = param self, runtime_param0 +// CHECK:STDOUT: %self: %.6 = bind_name self, %self.param +// CHECK:STDOUT: %.loc23_9: %.6 = addr_pattern %self // CHECK:STDOUT: %C.ref.loc23_31: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %other.param: %C = param other, runtime_param1 // CHECK:STDOUT: %other: %C = bind_name other, %other.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc22: = interface_witness (%Op.decl) [template = constants.%.10] +// CHECK:STDOUT: %.loc22: = interface_witness (%Op.decl) [template = constants.%.8] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Op = %Op.decl @@ -208,46 +208,46 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: return %.loc19_14 to %return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @Op.2(constants.%Self.1: %.3) { -// CHECK:STDOUT: %Self: %.3 = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self.1)] +// CHECK:STDOUT: generic fn @Op.2(constants.%Self.1: %Add.type) { +// CHECK:STDOUT: %Self: %Add.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self.1)] // CHECK:STDOUT: // CHECK:STDOUT: fn[%self: @Op.2.%Self (%Self.1)](%other: @Op.2.%Self (%Self.1)) -> @Op.2.%Self (%Self.1); // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Op.3[addr %self: %.8](%other: %C) { +// CHECK:STDOUT: fn @Op.3[addr %self: %.6](%other: %C) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @Op.4(constants.%Self.2: %.7) { -// CHECK:STDOUT: %Self: %.7 = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self.2)] -// CHECK:STDOUT: %.2: type = ptr_type @Op.4.%Self (%Self.2) [symbolic = %.2 (constants.%.9)] +// CHECK:STDOUT: generic fn @Op.4(constants.%Self.2: %AddAssign.type) { +// CHECK:STDOUT: %Self: %AddAssign.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self.2)] +// CHECK:STDOUT: %.2: type = ptr_type @Op.4.%Self (%Self.2) [symbolic = %.2 (constants.%.7)] // CHECK:STDOUT: -// CHECK:STDOUT: fn[addr %self: @Op.4.%.2 (%.9)](%other: @Op.4.%Self (%Self.2)); +// CHECK:STDOUT: fn[addr %self: @Op.4.%.2 (%.7)](%other: @Op.4.%Self (%Self.2)); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @TestOp(%a: %C, %b: %C) -> %return: %C { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: %C = name_ref a, %a // CHECK:STDOUT: %b.ref: %C = name_ref b, %b -// CHECK:STDOUT: %Op.ref: %.11 = name_ref Op, imports.%import_ref.3 [template = constants.%.12] -// CHECK:STDOUT: %.loc27_12.1: %Op.type.2 = interface_witness_access constants.%.5, element0 [template = constants.%Op.1] +// CHECK:STDOUT: %Op.ref: %.9 = name_ref Op, imports.%import_ref.3 [template = constants.%.10] +// CHECK:STDOUT: %.loc27_12.1: %Op.type.2 = interface_witness_access constants.%.4, element0 [template = constants.%Op.1] // CHECK:STDOUT: %.loc27_12.2: = bound_method %a.ref, %.loc27_12.1 // CHECK:STDOUT: %.loc26: ref %C = splice_block %return {} // CHECK:STDOUT: %Op.call: init %C = call %.loc27_12.2(%a.ref, %b.ref) to %.loc26 // CHECK:STDOUT: return %Op.call to %return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @TestAssign(%a: %.8, %b: %C) { +// CHECK:STDOUT: fn @TestAssign(%a: %.6, %b: %C) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %a.ref: %.8 = name_ref a, %a +// CHECK:STDOUT: %a.ref: %.6 = name_ref a, %a // CHECK:STDOUT: %.loc31_3.1: ref %C = deref %a.ref // CHECK:STDOUT: %b.ref: %C = name_ref b, %b -// CHECK:STDOUT: %Op.ref: %.13 = name_ref Op, imports.%import_ref.7 [template = constants.%.14] -// CHECK:STDOUT: %.loc31_6.1: %Op.type.4 = interface_witness_access constants.%.10, element0 [template = constants.%Op.3] +// CHECK:STDOUT: %Op.ref: %.11 = name_ref Op, imports.%import_ref.7 [template = constants.%.12] +// CHECK:STDOUT: %.loc31_6.1: %Op.type.4 = interface_witness_access constants.%.8, element0 [template = constants.%Op.3] // CHECK:STDOUT: %.loc31_6.2: = bound_method %.loc31_3.1, %.loc31_6.1 -// CHECK:STDOUT: %.loc31_3.2: %.8 = addr_of %.loc31_3.1 -// CHECK:STDOUT: %Op.call: init %.4 = call %.loc31_6.2(%.loc31_3.2, %b.ref) +// CHECK:STDOUT: %.loc31_3.2: %.6 = addr_of %.loc31_3.1 +// CHECK:STDOUT: %Op.call: init %.3 = call %.loc31_6.2(%.loc31_3.2, %b.ref) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -261,11 +261,11 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: // CHECK:STDOUT: specific @Op.4(constants.%Self.2) { // CHECK:STDOUT: %Self => constants.%Self.2 -// CHECK:STDOUT: %.2 => constants.%.9 +// CHECK:STDOUT: %.2 => constants.%.7 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Op.4(constants.%C) { // CHECK:STDOUT: %Self => constants.%C -// CHECK:STDOUT: %.2 => constants.%.8 +// CHECK:STDOUT: %.2 => constants.%.6 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/operators/overloaded/bit_and.carbon b/toolchain/check/testdata/operators/overloaded/bit_and.carbon index 0bb305a31ab4f..1fccea0d815fc 100644 --- a/toolchain/check/testdata/operators/overloaded/bit_and.carbon +++ b/toolchain/check/testdata/operators/overloaded/bit_and.carbon @@ -37,33 +37,33 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %.1: type = struct_type {} [template] // CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] -// CHECK:STDOUT: %.3: type = interface_type @BitAnd [template] -// CHECK:STDOUT: %Self.1: %.3 = bind_symbolic_name Self, 0 [symbolic] +// CHECK:STDOUT: %BitAnd.type: type = interface_type @BitAnd [template] +// CHECK:STDOUT: %Self.1: %BitAnd.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %Op.type.1: type = fn_type @Op.1 [template] -// CHECK:STDOUT: %.4: type = tuple_type () [template] +// CHECK:STDOUT: %.3: type = tuple_type () [template] // CHECK:STDOUT: %Op.1: %Op.type.1 = struct_value () [template] // CHECK:STDOUT: %Op.type.2: type = fn_type @Op.2 [template] // CHECK:STDOUT: %Op.2: %Op.type.2 = struct_value () [template] -// CHECK:STDOUT: %.5: = interface_witness (%Op.1) [template] -// CHECK:STDOUT: %.6: type = ptr_type %.1 [template] +// CHECK:STDOUT: %.4: = interface_witness (%Op.1) [template] +// CHECK:STDOUT: %.5: type = ptr_type %.1 [template] // CHECK:STDOUT: %struct: %C = struct_value () [template] -// CHECK:STDOUT: %.7: type = interface_type @BitAndAssign [template] -// CHECK:STDOUT: %Self.2: %.7 = bind_symbolic_name Self, 0 [symbolic] -// CHECK:STDOUT: %.8: type = ptr_type %C [template] +// CHECK:STDOUT: %BitAndAssign.type: type = interface_type @BitAndAssign [template] +// CHECK:STDOUT: %Self.2: %BitAndAssign.type = bind_symbolic_name Self, 0 [symbolic] +// CHECK:STDOUT: %.6: type = ptr_type %C [template] // CHECK:STDOUT: %Op.type.3: type = fn_type @Op.3 [template] // CHECK:STDOUT: %Op.3: %Op.type.3 = struct_value () [template] // CHECK:STDOUT: %Op.type.4: type = fn_type @Op.4 [template] // CHECK:STDOUT: %Op.4: %Op.type.4 = struct_value () [template] -// CHECK:STDOUT: %.9: type = ptr_type %Self.2 [symbolic] -// CHECK:STDOUT: %.10: = interface_witness (%Op.3) [template] +// CHECK:STDOUT: %.7: type = ptr_type %Self.2 [symbolic] +// CHECK:STDOUT: %.8: = interface_witness (%Op.3) [template] // CHECK:STDOUT: %TestOp.type: type = fn_type @TestOp [template] // CHECK:STDOUT: %TestOp: %TestOp.type = struct_value () [template] -// CHECK:STDOUT: %.11: type = assoc_entity_type %.3, %Op.type.2 [template] -// CHECK:STDOUT: %.12: %.11 = assoc_entity element0, imports.%import_ref.9 [template] +// CHECK:STDOUT: %.9: type = assoc_entity_type %BitAnd.type, %Op.type.2 [template] +// CHECK:STDOUT: %.10: %.9 = assoc_entity element0, imports.%import_ref.9 [template] // CHECK:STDOUT: %TestAssign.type: type = fn_type @TestAssign [template] // CHECK:STDOUT: %TestAssign: %TestAssign.type = struct_value () [template] -// CHECK:STDOUT: %.13: type = assoc_entity_type %.7, %Op.type.4 [template] -// CHECK:STDOUT: %.14: %.13 = assoc_entity element0, imports.%import_ref.10 [template] +// CHECK:STDOUT: %.11: type = assoc_entity_type %BitAndAssign.type, %Op.type.4 [template] +// CHECK:STDOUT: %.12: %.11 = assoc_entity element0, imports.%import_ref.10 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -79,13 +79,13 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: import Core//prelude/operators/comparison // CHECK:STDOUT: import Core//prelude/types/bool // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.1: type = import_ref Core//prelude/operators/bitwise, inst+23, loaded [template = constants.%.3] +// CHECK:STDOUT: %import_ref.1: type = import_ref Core//prelude/operators/bitwise, inst+23, loaded [template = constants.%BitAnd.type] // CHECK:STDOUT: %import_ref.2 = import_ref Core//prelude/operators/bitwise, inst+25, unloaded -// CHECK:STDOUT: %import_ref.3: %.11 = import_ref Core//prelude/operators/bitwise, inst+48, loaded [template = constants.%.12] +// CHECK:STDOUT: %import_ref.3: %.9 = import_ref Core//prelude/operators/bitwise, inst+48, loaded [template = constants.%.10] // CHECK:STDOUT: %import_ref.4: %Op.type.2 = import_ref Core//prelude/operators/bitwise, inst+43, loaded [template = constants.%Op.2] -// CHECK:STDOUT: %import_ref.5: type = import_ref Core//prelude/operators/bitwise, inst+50, loaded [template = constants.%.7] +// CHECK:STDOUT: %import_ref.5: type = import_ref Core//prelude/operators/bitwise, inst+50, loaded [template = constants.%BitAndAssign.type] // CHECK:STDOUT: %import_ref.6 = import_ref Core//prelude/operators/bitwise, inst+52, unloaded -// CHECK:STDOUT: %import_ref.7: %.13 = import_ref Core//prelude/operators/bitwise, inst+75, loaded [template = constants.%.14] +// CHECK:STDOUT: %import_ref.7: %.11 = import_ref Core//prelude/operators/bitwise, inst+75, loaded [template = constants.%.12] // CHECK:STDOUT: %import_ref.8: %Op.type.4 = import_ref Core//prelude/operators/bitwise, inst+69, loaded [template = constants.%Op.4] // CHECK:STDOUT: %import_ref.9 = import_ref Core//prelude/operators/bitwise, inst+43, unloaded // CHECK:STDOUT: %import_ref.10 = import_ref Core//prelude/operators/bitwise, inst+69, unloaded @@ -103,12 +103,12 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: impl_decl @impl.1 [template] {} { // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %Core.ref: = name_ref Core, imports.%Core [template = imports.%Core] -// CHECK:STDOUT: %BitAnd.ref: type = name_ref BitAnd, imports.%import_ref.1 [template = constants.%.3] +// CHECK:STDOUT: %BitAnd.ref: type = name_ref BitAnd, imports.%import_ref.1 [template = constants.%BitAnd.type] // CHECK:STDOUT: } // CHECK:STDOUT: impl_decl @impl.2 [template] {} { // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %Core.ref: = name_ref Core, imports.%Core [template = imports.%Core] -// CHECK:STDOUT: %BitAndAssign.ref: type = name_ref BitAndAssign, imports.%import_ref.5 [template = constants.%.7] +// CHECK:STDOUT: %BitAndAssign.ref: type = name_ref BitAndAssign, imports.%import_ref.5 [template = constants.%BitAndAssign.type] // CHECK:STDOUT: } // CHECK:STDOUT: %TestOp.decl: %TestOp.type = fn_decl @TestOp [template = constants.%TestOp] { // CHECK:STDOUT: %a.patt: %C = binding_pattern a @@ -124,13 +124,13 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %return: ref %C = var // CHECK:STDOUT: } // CHECK:STDOUT: %TestAssign.decl: %TestAssign.type = fn_decl @TestAssign [template = constants.%TestAssign] { -// CHECK:STDOUT: %a.patt: %.8 = binding_pattern a +// CHECK:STDOUT: %a.patt: %.6 = binding_pattern a // CHECK:STDOUT: %b.patt: %C = binding_pattern b // CHECK:STDOUT: } { // CHECK:STDOUT: %C.ref.loc30_18: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %.loc30: type = ptr_type %C [template = constants.%.8] -// CHECK:STDOUT: %a.param: %.8 = param a, runtime_param0 -// CHECK:STDOUT: %a: %.8 = bind_name a, %a.param +// CHECK:STDOUT: %.loc30: type = ptr_type %C [template = constants.%.6] +// CHECK:STDOUT: %a.param: %.6 = param a, runtime_param0 +// CHECK:STDOUT: %a: %.6 = bind_name a, %a.param // CHECK:STDOUT: %C.ref.loc30_25: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %b.param: %C = param b, runtime_param1 // CHECK:STDOUT: %b: %C = bind_name b, %b.param @@ -165,7 +165,7 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %C.ref.loc18_31: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %return: ref %C = var // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc17: = interface_witness (%Op.decl) [template = constants.%.5] +// CHECK:STDOUT: %.loc17: = interface_witness (%Op.decl) [template = constants.%.4] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Op = %Op.decl @@ -174,19 +174,19 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.2: %C.ref as %BitAndAssign.ref { // CHECK:STDOUT: %Op.decl: %Op.type.3 = fn_decl @Op.3 [template = constants.%Op.3] { -// CHECK:STDOUT: %self.patt: %.8 = binding_pattern self +// CHECK:STDOUT: %self.patt: %.6 = binding_pattern self // CHECK:STDOUT: %other.patt: %C = binding_pattern other // CHECK:STDOUT: } { // CHECK:STDOUT: %C.ref.loc23_20: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %.loc23_21: type = ptr_type %C [template = constants.%.8] -// CHECK:STDOUT: %self.param: %.8 = param self, runtime_param0 -// CHECK:STDOUT: %self: %.8 = bind_name self, %self.param -// CHECK:STDOUT: %.loc23_9: %.8 = addr_pattern %self +// CHECK:STDOUT: %.loc23_21: type = ptr_type %C [template = constants.%.6] +// CHECK:STDOUT: %self.param: %.6 = param self, runtime_param0 +// CHECK:STDOUT: %self: %.6 = bind_name self, %self.param +// CHECK:STDOUT: %.loc23_9: %.6 = addr_pattern %self // CHECK:STDOUT: %C.ref.loc23_31: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %other.param: %C = param other, runtime_param1 // CHECK:STDOUT: %other: %C = bind_name other, %other.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc22: = interface_witness (%Op.decl) [template = constants.%.10] +// CHECK:STDOUT: %.loc22: = interface_witness (%Op.decl) [template = constants.%.8] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Op = %Op.decl @@ -208,46 +208,46 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: return %.loc19_14 to %return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @Op.2(constants.%Self.1: %.3) { -// CHECK:STDOUT: %Self: %.3 = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self.1)] +// CHECK:STDOUT: generic fn @Op.2(constants.%Self.1: %BitAnd.type) { +// CHECK:STDOUT: %Self: %BitAnd.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self.1)] // CHECK:STDOUT: // CHECK:STDOUT: fn[%self: @Op.2.%Self (%Self.1)](%other: @Op.2.%Self (%Self.1)) -> @Op.2.%Self (%Self.1); // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Op.3[addr %self: %.8](%other: %C) { +// CHECK:STDOUT: fn @Op.3[addr %self: %.6](%other: %C) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @Op.4(constants.%Self.2: %.7) { -// CHECK:STDOUT: %Self: %.7 = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self.2)] -// CHECK:STDOUT: %.2: type = ptr_type @Op.4.%Self (%Self.2) [symbolic = %.2 (constants.%.9)] +// CHECK:STDOUT: generic fn @Op.4(constants.%Self.2: %BitAndAssign.type) { +// CHECK:STDOUT: %Self: %BitAndAssign.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self.2)] +// CHECK:STDOUT: %.2: type = ptr_type @Op.4.%Self (%Self.2) [symbolic = %.2 (constants.%.7)] // CHECK:STDOUT: -// CHECK:STDOUT: fn[addr %self: @Op.4.%.2 (%.9)](%other: @Op.4.%Self (%Self.2)); +// CHECK:STDOUT: fn[addr %self: @Op.4.%.2 (%.7)](%other: @Op.4.%Self (%Self.2)); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @TestOp(%a: %C, %b: %C) -> %return: %C { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: %C = name_ref a, %a // CHECK:STDOUT: %b.ref: %C = name_ref b, %b -// CHECK:STDOUT: %Op.ref: %.11 = name_ref Op, imports.%import_ref.3 [template = constants.%.12] -// CHECK:STDOUT: %.loc27_12.1: %Op.type.2 = interface_witness_access constants.%.5, element0 [template = constants.%Op.1] +// CHECK:STDOUT: %Op.ref: %.9 = name_ref Op, imports.%import_ref.3 [template = constants.%.10] +// CHECK:STDOUT: %.loc27_12.1: %Op.type.2 = interface_witness_access constants.%.4, element0 [template = constants.%Op.1] // CHECK:STDOUT: %.loc27_12.2: = bound_method %a.ref, %.loc27_12.1 // CHECK:STDOUT: %.loc26: ref %C = splice_block %return {} // CHECK:STDOUT: %Op.call: init %C = call %.loc27_12.2(%a.ref, %b.ref) to %.loc26 // CHECK:STDOUT: return %Op.call to %return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @TestAssign(%a: %.8, %b: %C) { +// CHECK:STDOUT: fn @TestAssign(%a: %.6, %b: %C) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %a.ref: %.8 = name_ref a, %a +// CHECK:STDOUT: %a.ref: %.6 = name_ref a, %a // CHECK:STDOUT: %.loc31_3.1: ref %C = deref %a.ref // CHECK:STDOUT: %b.ref: %C = name_ref b, %b -// CHECK:STDOUT: %Op.ref: %.13 = name_ref Op, imports.%import_ref.7 [template = constants.%.14] -// CHECK:STDOUT: %.loc31_6.1: %Op.type.4 = interface_witness_access constants.%.10, element0 [template = constants.%Op.3] +// CHECK:STDOUT: %Op.ref: %.11 = name_ref Op, imports.%import_ref.7 [template = constants.%.12] +// CHECK:STDOUT: %.loc31_6.1: %Op.type.4 = interface_witness_access constants.%.8, element0 [template = constants.%Op.3] // CHECK:STDOUT: %.loc31_6.2: = bound_method %.loc31_3.1, %.loc31_6.1 -// CHECK:STDOUT: %.loc31_3.2: %.8 = addr_of %.loc31_3.1 -// CHECK:STDOUT: %Op.call: init %.4 = call %.loc31_6.2(%.loc31_3.2, %b.ref) +// CHECK:STDOUT: %.loc31_3.2: %.6 = addr_of %.loc31_3.1 +// CHECK:STDOUT: %Op.call: init %.3 = call %.loc31_6.2(%.loc31_3.2, %b.ref) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -261,11 +261,11 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: // CHECK:STDOUT: specific @Op.4(constants.%Self.2) { // CHECK:STDOUT: %Self => constants.%Self.2 -// CHECK:STDOUT: %.2 => constants.%.9 +// CHECK:STDOUT: %.2 => constants.%.7 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Op.4(constants.%C) { // CHECK:STDOUT: %Self => constants.%C -// CHECK:STDOUT: %.2 => constants.%.8 +// CHECK:STDOUT: %.2 => constants.%.6 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/operators/overloaded/bit_complement.carbon b/toolchain/check/testdata/operators/overloaded/bit_complement.carbon index 3ea8c98a5e545..5271770c1d5e5 100644 --- a/toolchain/check/testdata/operators/overloaded/bit_complement.carbon +++ b/toolchain/check/testdata/operators/overloaded/bit_complement.carbon @@ -30,20 +30,20 @@ fn TestOp(a: C) -> C { // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %.1: type = struct_type {} [template] // CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] -// CHECK:STDOUT: %.3: type = interface_type @BitComplement [template] -// CHECK:STDOUT: %Self: %.3 = bind_symbolic_name Self, 0 [symbolic] +// CHECK:STDOUT: %BitComplement.type: type = interface_type @BitComplement [template] +// CHECK:STDOUT: %Self: %BitComplement.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %Op.type.1: type = fn_type @Op.1 [template] -// CHECK:STDOUT: %.4: type = tuple_type () [template] +// CHECK:STDOUT: %.3: type = tuple_type () [template] // CHECK:STDOUT: %Op.1: %Op.type.1 = struct_value () [template] // CHECK:STDOUT: %Op.type.2: type = fn_type @Op.2 [template] // CHECK:STDOUT: %Op.2: %Op.type.2 = struct_value () [template] -// CHECK:STDOUT: %.5: = interface_witness (%Op.1) [template] -// CHECK:STDOUT: %.6: type = ptr_type %.1 [template] +// CHECK:STDOUT: %.4: = interface_witness (%Op.1) [template] +// CHECK:STDOUT: %.5: type = ptr_type %.1 [template] // CHECK:STDOUT: %struct: %C = struct_value () [template] // CHECK:STDOUT: %TestOp.type: type = fn_type @TestOp [template] // CHECK:STDOUT: %TestOp: %TestOp.type = struct_value () [template] -// CHECK:STDOUT: %.7: type = assoc_entity_type %.3, %Op.type.2 [template] -// CHECK:STDOUT: %.8: %.7 = assoc_entity element0, imports.%import_ref.5 [template] +// CHECK:STDOUT: %.6: type = assoc_entity_type %BitComplement.type, %Op.type.2 [template] +// CHECK:STDOUT: %.7: %.6 = assoc_entity element0, imports.%import_ref.5 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -58,9 +58,9 @@ fn TestOp(a: C) -> C { // CHECK:STDOUT: import Core//prelude/operators/comparison // CHECK:STDOUT: import Core//prelude/types/bool // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.1: type = import_ref Core//prelude/operators/bitwise, inst+1, loaded [template = constants.%.3] +// CHECK:STDOUT: %import_ref.1: type = import_ref Core//prelude/operators/bitwise, inst+1, loaded [template = constants.%BitComplement.type] // CHECK:STDOUT: %import_ref.2 = import_ref Core//prelude/operators/bitwise, inst+3, unloaded -// CHECK:STDOUT: %import_ref.3: %.7 = import_ref Core//prelude/operators/bitwise, inst+21, loaded [template = constants.%.8] +// CHECK:STDOUT: %import_ref.3: %.6 = import_ref Core//prelude/operators/bitwise, inst+21, loaded [template = constants.%.7] // CHECK:STDOUT: %import_ref.4: %Op.type.2 = import_ref Core//prelude/operators/bitwise, inst+15, loaded [template = constants.%Op.2] // CHECK:STDOUT: %import_ref.5 = import_ref Core//prelude/operators/bitwise, inst+15, unloaded // CHECK:STDOUT: } @@ -76,7 +76,7 @@ fn TestOp(a: C) -> C { // CHECK:STDOUT: impl_decl @impl [template] {} { // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %Core.ref: = name_ref Core, imports.%Core [template = imports.%Core] -// CHECK:STDOUT: %BitComplement.ref: type = name_ref BitComplement, imports.%import_ref.1 [template = constants.%.3] +// CHECK:STDOUT: %BitComplement.ref: type = name_ref BitComplement, imports.%import_ref.1 [template = constants.%BitComplement.type] // CHECK:STDOUT: } // CHECK:STDOUT: %TestOp.decl: %TestOp.type = fn_decl @TestOp [template = constants.%TestOp] { // CHECK:STDOUT: %a.patt: %C = binding_pattern a @@ -106,7 +106,7 @@ fn TestOp(a: C) -> C { // CHECK:STDOUT: %C.ref.loc18_23: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %return: ref %C = var // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc17: = interface_witness (%Op.decl) [template = constants.%.5] +// CHECK:STDOUT: %.loc17: = interface_witness (%Op.decl) [template = constants.%.4] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Op = %Op.decl @@ -128,8 +128,8 @@ fn TestOp(a: C) -> C { // CHECK:STDOUT: return %.loc19_14 to %return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @Op.2(constants.%Self: %.3) { -// CHECK:STDOUT: %Self: %.3 = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self)] +// CHECK:STDOUT: generic fn @Op.2(constants.%Self: %BitComplement.type) { +// CHECK:STDOUT: %Self: %BitComplement.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self)] // CHECK:STDOUT: // CHECK:STDOUT: fn[%self: @Op.2.%Self (%Self)]() -> @Op.2.%Self (%Self); // CHECK:STDOUT: } @@ -137,8 +137,8 @@ fn TestOp(a: C) -> C { // CHECK:STDOUT: fn @TestOp(%a: %C) -> %return: %C { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: %C = name_ref a, %a -// CHECK:STDOUT: %Op.ref: %.7 = name_ref Op, imports.%import_ref.3 [template = constants.%.8] -// CHECK:STDOUT: %.loc24_10.1: %Op.type.2 = interface_witness_access constants.%.5, element0 [template = constants.%Op.1] +// CHECK:STDOUT: %Op.ref: %.6 = name_ref Op, imports.%import_ref.3 [template = constants.%.7] +// CHECK:STDOUT: %.loc24_10.1: %Op.type.2 = interface_witness_access constants.%.4, element0 [template = constants.%Op.1] // CHECK:STDOUT: %.loc24_10.2: = bound_method %a.ref, %.loc24_10.1 // CHECK:STDOUT: %.loc23: ref %C = splice_block %return {} // CHECK:STDOUT: %Op.call: init %C = call %.loc24_10.2(%a.ref) to %.loc23 diff --git a/toolchain/check/testdata/operators/overloaded/bit_or.carbon b/toolchain/check/testdata/operators/overloaded/bit_or.carbon index 878a879cd390b..6528cb13d5bdf 100644 --- a/toolchain/check/testdata/operators/overloaded/bit_or.carbon +++ b/toolchain/check/testdata/operators/overloaded/bit_or.carbon @@ -37,33 +37,33 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %.1: type = struct_type {} [template] // CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] -// CHECK:STDOUT: %.3: type = interface_type @BitOr [template] -// CHECK:STDOUT: %Self.1: %.3 = bind_symbolic_name Self, 0 [symbolic] +// CHECK:STDOUT: %BitOr.type: type = interface_type @BitOr [template] +// CHECK:STDOUT: %Self.1: %BitOr.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %Op.type.1: type = fn_type @Op.1 [template] -// CHECK:STDOUT: %.4: type = tuple_type () [template] +// CHECK:STDOUT: %.3: type = tuple_type () [template] // CHECK:STDOUT: %Op.1: %Op.type.1 = struct_value () [template] // CHECK:STDOUT: %Op.type.2: type = fn_type @Op.2 [template] // CHECK:STDOUT: %Op.2: %Op.type.2 = struct_value () [template] -// CHECK:STDOUT: %.5: = interface_witness (%Op.1) [template] -// CHECK:STDOUT: %.6: type = ptr_type %.1 [template] +// CHECK:STDOUT: %.4: = interface_witness (%Op.1) [template] +// CHECK:STDOUT: %.5: type = ptr_type %.1 [template] // CHECK:STDOUT: %struct: %C = struct_value () [template] -// CHECK:STDOUT: %.7: type = interface_type @BitOrAssign [template] -// CHECK:STDOUT: %Self.2: %.7 = bind_symbolic_name Self, 0 [symbolic] -// CHECK:STDOUT: %.8: type = ptr_type %C [template] +// CHECK:STDOUT: %BitOrAssign.type: type = interface_type @BitOrAssign [template] +// CHECK:STDOUT: %Self.2: %BitOrAssign.type = bind_symbolic_name Self, 0 [symbolic] +// CHECK:STDOUT: %.6: type = ptr_type %C [template] // CHECK:STDOUT: %Op.type.3: type = fn_type @Op.3 [template] // CHECK:STDOUT: %Op.3: %Op.type.3 = struct_value () [template] // CHECK:STDOUT: %Op.type.4: type = fn_type @Op.4 [template] // CHECK:STDOUT: %Op.4: %Op.type.4 = struct_value () [template] -// CHECK:STDOUT: %.9: type = ptr_type %Self.2 [symbolic] -// CHECK:STDOUT: %.10: = interface_witness (%Op.3) [template] +// CHECK:STDOUT: %.7: type = ptr_type %Self.2 [symbolic] +// CHECK:STDOUT: %.8: = interface_witness (%Op.3) [template] // CHECK:STDOUT: %TestOp.type: type = fn_type @TestOp [template] // CHECK:STDOUT: %TestOp: %TestOp.type = struct_value () [template] -// CHECK:STDOUT: %.11: type = assoc_entity_type %.3, %Op.type.2 [template] -// CHECK:STDOUT: %.12: %.11 = assoc_entity element0, imports.%import_ref.9 [template] +// CHECK:STDOUT: %.9: type = assoc_entity_type %BitOr.type, %Op.type.2 [template] +// CHECK:STDOUT: %.10: %.9 = assoc_entity element0, imports.%import_ref.9 [template] // CHECK:STDOUT: %TestAssign.type: type = fn_type @TestAssign [template] // CHECK:STDOUT: %TestAssign: %TestAssign.type = struct_value () [template] -// CHECK:STDOUT: %.13: type = assoc_entity_type %.7, %Op.type.4 [template] -// CHECK:STDOUT: %.14: %.13 = assoc_entity element0, imports.%import_ref.10 [template] +// CHECK:STDOUT: %.11: type = assoc_entity_type %BitOrAssign.type, %Op.type.4 [template] +// CHECK:STDOUT: %.12: %.11 = assoc_entity element0, imports.%import_ref.10 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -79,13 +79,13 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: import Core//prelude/operators/comparison // CHECK:STDOUT: import Core//prelude/types/bool // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.1: type = import_ref Core//prelude/operators/bitwise, inst+77, loaded [template = constants.%.3] +// CHECK:STDOUT: %import_ref.1: type = import_ref Core//prelude/operators/bitwise, inst+77, loaded [template = constants.%BitOr.type] // CHECK:STDOUT: %import_ref.2 = import_ref Core//prelude/operators/bitwise, inst+79, unloaded -// CHECK:STDOUT: %import_ref.3: %.11 = import_ref Core//prelude/operators/bitwise, inst+102, loaded [template = constants.%.12] +// CHECK:STDOUT: %import_ref.3: %.9 = import_ref Core//prelude/operators/bitwise, inst+102, loaded [template = constants.%.10] // CHECK:STDOUT: %import_ref.4: %Op.type.2 = import_ref Core//prelude/operators/bitwise, inst+97, loaded [template = constants.%Op.2] -// CHECK:STDOUT: %import_ref.5: type = import_ref Core//prelude/operators/bitwise, inst+104, loaded [template = constants.%.7] +// CHECK:STDOUT: %import_ref.5: type = import_ref Core//prelude/operators/bitwise, inst+104, loaded [template = constants.%BitOrAssign.type] // CHECK:STDOUT: %import_ref.6 = import_ref Core//prelude/operators/bitwise, inst+106, unloaded -// CHECK:STDOUT: %import_ref.7: %.13 = import_ref Core//prelude/operators/bitwise, inst+129, loaded [template = constants.%.14] +// CHECK:STDOUT: %import_ref.7: %.11 = import_ref Core//prelude/operators/bitwise, inst+129, loaded [template = constants.%.12] // CHECK:STDOUT: %import_ref.8: %Op.type.4 = import_ref Core//prelude/operators/bitwise, inst+123, loaded [template = constants.%Op.4] // CHECK:STDOUT: %import_ref.9 = import_ref Core//prelude/operators/bitwise, inst+97, unloaded // CHECK:STDOUT: %import_ref.10 = import_ref Core//prelude/operators/bitwise, inst+123, unloaded @@ -103,12 +103,12 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: impl_decl @impl.1 [template] {} { // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %Core.ref: = name_ref Core, imports.%Core [template = imports.%Core] -// CHECK:STDOUT: %BitOr.ref: type = name_ref BitOr, imports.%import_ref.1 [template = constants.%.3] +// CHECK:STDOUT: %BitOr.ref: type = name_ref BitOr, imports.%import_ref.1 [template = constants.%BitOr.type] // CHECK:STDOUT: } // CHECK:STDOUT: impl_decl @impl.2 [template] {} { // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %Core.ref: = name_ref Core, imports.%Core [template = imports.%Core] -// CHECK:STDOUT: %BitOrAssign.ref: type = name_ref BitOrAssign, imports.%import_ref.5 [template = constants.%.7] +// CHECK:STDOUT: %BitOrAssign.ref: type = name_ref BitOrAssign, imports.%import_ref.5 [template = constants.%BitOrAssign.type] // CHECK:STDOUT: } // CHECK:STDOUT: %TestOp.decl: %TestOp.type = fn_decl @TestOp [template = constants.%TestOp] { // CHECK:STDOUT: %a.patt: %C = binding_pattern a @@ -124,13 +124,13 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %return: ref %C = var // CHECK:STDOUT: } // CHECK:STDOUT: %TestAssign.decl: %TestAssign.type = fn_decl @TestAssign [template = constants.%TestAssign] { -// CHECK:STDOUT: %a.patt: %.8 = binding_pattern a +// CHECK:STDOUT: %a.patt: %.6 = binding_pattern a // CHECK:STDOUT: %b.patt: %C = binding_pattern b // CHECK:STDOUT: } { // CHECK:STDOUT: %C.ref.loc30_18: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %.loc30: type = ptr_type %C [template = constants.%.8] -// CHECK:STDOUT: %a.param: %.8 = param a, runtime_param0 -// CHECK:STDOUT: %a: %.8 = bind_name a, %a.param +// CHECK:STDOUT: %.loc30: type = ptr_type %C [template = constants.%.6] +// CHECK:STDOUT: %a.param: %.6 = param a, runtime_param0 +// CHECK:STDOUT: %a: %.6 = bind_name a, %a.param // CHECK:STDOUT: %C.ref.loc30_25: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %b.param: %C = param b, runtime_param1 // CHECK:STDOUT: %b: %C = bind_name b, %b.param @@ -165,7 +165,7 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %C.ref.loc18_31: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %return: ref %C = var // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc17: = interface_witness (%Op.decl) [template = constants.%.5] +// CHECK:STDOUT: %.loc17: = interface_witness (%Op.decl) [template = constants.%.4] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Op = %Op.decl @@ -174,19 +174,19 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.2: %C.ref as %BitOrAssign.ref { // CHECK:STDOUT: %Op.decl: %Op.type.3 = fn_decl @Op.3 [template = constants.%Op.3] { -// CHECK:STDOUT: %self.patt: %.8 = binding_pattern self +// CHECK:STDOUT: %self.patt: %.6 = binding_pattern self // CHECK:STDOUT: %other.patt: %C = binding_pattern other // CHECK:STDOUT: } { // CHECK:STDOUT: %C.ref.loc23_20: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %.loc23_21: type = ptr_type %C [template = constants.%.8] -// CHECK:STDOUT: %self.param: %.8 = param self, runtime_param0 -// CHECK:STDOUT: %self: %.8 = bind_name self, %self.param -// CHECK:STDOUT: %.loc23_9: %.8 = addr_pattern %self +// CHECK:STDOUT: %.loc23_21: type = ptr_type %C [template = constants.%.6] +// CHECK:STDOUT: %self.param: %.6 = param self, runtime_param0 +// CHECK:STDOUT: %self: %.6 = bind_name self, %self.param +// CHECK:STDOUT: %.loc23_9: %.6 = addr_pattern %self // CHECK:STDOUT: %C.ref.loc23_31: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %other.param: %C = param other, runtime_param1 // CHECK:STDOUT: %other: %C = bind_name other, %other.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc22: = interface_witness (%Op.decl) [template = constants.%.10] +// CHECK:STDOUT: %.loc22: = interface_witness (%Op.decl) [template = constants.%.8] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Op = %Op.decl @@ -208,46 +208,46 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: return %.loc19_14 to %return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @Op.2(constants.%Self.1: %.3) { -// CHECK:STDOUT: %Self: %.3 = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self.1)] +// CHECK:STDOUT: generic fn @Op.2(constants.%Self.1: %BitOr.type) { +// CHECK:STDOUT: %Self: %BitOr.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self.1)] // CHECK:STDOUT: // CHECK:STDOUT: fn[%self: @Op.2.%Self (%Self.1)](%other: @Op.2.%Self (%Self.1)) -> @Op.2.%Self (%Self.1); // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Op.3[addr %self: %.8](%other: %C) { +// CHECK:STDOUT: fn @Op.3[addr %self: %.6](%other: %C) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @Op.4(constants.%Self.2: %.7) { -// CHECK:STDOUT: %Self: %.7 = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self.2)] -// CHECK:STDOUT: %.2: type = ptr_type @Op.4.%Self (%Self.2) [symbolic = %.2 (constants.%.9)] +// CHECK:STDOUT: generic fn @Op.4(constants.%Self.2: %BitOrAssign.type) { +// CHECK:STDOUT: %Self: %BitOrAssign.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self.2)] +// CHECK:STDOUT: %.2: type = ptr_type @Op.4.%Self (%Self.2) [symbolic = %.2 (constants.%.7)] // CHECK:STDOUT: -// CHECK:STDOUT: fn[addr %self: @Op.4.%.2 (%.9)](%other: @Op.4.%Self (%Self.2)); +// CHECK:STDOUT: fn[addr %self: @Op.4.%.2 (%.7)](%other: @Op.4.%Self (%Self.2)); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @TestOp(%a: %C, %b: %C) -> %return: %C { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: %C = name_ref a, %a // CHECK:STDOUT: %b.ref: %C = name_ref b, %b -// CHECK:STDOUT: %Op.ref: %.11 = name_ref Op, imports.%import_ref.3 [template = constants.%.12] -// CHECK:STDOUT: %.loc27_12.1: %Op.type.2 = interface_witness_access constants.%.5, element0 [template = constants.%Op.1] +// CHECK:STDOUT: %Op.ref: %.9 = name_ref Op, imports.%import_ref.3 [template = constants.%.10] +// CHECK:STDOUT: %.loc27_12.1: %Op.type.2 = interface_witness_access constants.%.4, element0 [template = constants.%Op.1] // CHECK:STDOUT: %.loc27_12.2: = bound_method %a.ref, %.loc27_12.1 // CHECK:STDOUT: %.loc26: ref %C = splice_block %return {} // CHECK:STDOUT: %Op.call: init %C = call %.loc27_12.2(%a.ref, %b.ref) to %.loc26 // CHECK:STDOUT: return %Op.call to %return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @TestAssign(%a: %.8, %b: %C) { +// CHECK:STDOUT: fn @TestAssign(%a: %.6, %b: %C) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %a.ref: %.8 = name_ref a, %a +// CHECK:STDOUT: %a.ref: %.6 = name_ref a, %a // CHECK:STDOUT: %.loc31_3.1: ref %C = deref %a.ref // CHECK:STDOUT: %b.ref: %C = name_ref b, %b -// CHECK:STDOUT: %Op.ref: %.13 = name_ref Op, imports.%import_ref.7 [template = constants.%.14] -// CHECK:STDOUT: %.loc31_6.1: %Op.type.4 = interface_witness_access constants.%.10, element0 [template = constants.%Op.3] +// CHECK:STDOUT: %Op.ref: %.11 = name_ref Op, imports.%import_ref.7 [template = constants.%.12] +// CHECK:STDOUT: %.loc31_6.1: %Op.type.4 = interface_witness_access constants.%.8, element0 [template = constants.%Op.3] // CHECK:STDOUT: %.loc31_6.2: = bound_method %.loc31_3.1, %.loc31_6.1 -// CHECK:STDOUT: %.loc31_3.2: %.8 = addr_of %.loc31_3.1 -// CHECK:STDOUT: %Op.call: init %.4 = call %.loc31_6.2(%.loc31_3.2, %b.ref) +// CHECK:STDOUT: %.loc31_3.2: %.6 = addr_of %.loc31_3.1 +// CHECK:STDOUT: %Op.call: init %.3 = call %.loc31_6.2(%.loc31_3.2, %b.ref) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -261,11 +261,11 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: // CHECK:STDOUT: specific @Op.4(constants.%Self.2) { // CHECK:STDOUT: %Self => constants.%Self.2 -// CHECK:STDOUT: %.2 => constants.%.9 +// CHECK:STDOUT: %.2 => constants.%.7 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Op.4(constants.%C) { // CHECK:STDOUT: %Self => constants.%C -// CHECK:STDOUT: %.2 => constants.%.8 +// CHECK:STDOUT: %.2 => constants.%.6 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/operators/overloaded/bit_xor.carbon b/toolchain/check/testdata/operators/overloaded/bit_xor.carbon index 0d23b9df4ce75..14d5d5673af76 100644 --- a/toolchain/check/testdata/operators/overloaded/bit_xor.carbon +++ b/toolchain/check/testdata/operators/overloaded/bit_xor.carbon @@ -37,33 +37,33 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %.1: type = struct_type {} [template] // CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] -// CHECK:STDOUT: %.3: type = interface_type @BitXor [template] -// CHECK:STDOUT: %Self.1: %.3 = bind_symbolic_name Self, 0 [symbolic] +// CHECK:STDOUT: %BitXor.type: type = interface_type @BitXor [template] +// CHECK:STDOUT: %Self.1: %BitXor.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %Op.type.1: type = fn_type @Op.1 [template] -// CHECK:STDOUT: %.4: type = tuple_type () [template] +// CHECK:STDOUT: %.3: type = tuple_type () [template] // CHECK:STDOUT: %Op.1: %Op.type.1 = struct_value () [template] // CHECK:STDOUT: %Op.type.2: type = fn_type @Op.2 [template] // CHECK:STDOUT: %Op.2: %Op.type.2 = struct_value () [template] -// CHECK:STDOUT: %.5: = interface_witness (%Op.1) [template] -// CHECK:STDOUT: %.6: type = ptr_type %.1 [template] +// CHECK:STDOUT: %.4: = interface_witness (%Op.1) [template] +// CHECK:STDOUT: %.5: type = ptr_type %.1 [template] // CHECK:STDOUT: %struct: %C = struct_value () [template] -// CHECK:STDOUT: %.7: type = interface_type @BitXorAssign [template] -// CHECK:STDOUT: %Self.2: %.7 = bind_symbolic_name Self, 0 [symbolic] -// CHECK:STDOUT: %.8: type = ptr_type %C [template] +// CHECK:STDOUT: %BitXorAssign.type: type = interface_type @BitXorAssign [template] +// CHECK:STDOUT: %Self.2: %BitXorAssign.type = bind_symbolic_name Self, 0 [symbolic] +// CHECK:STDOUT: %.6: type = ptr_type %C [template] // CHECK:STDOUT: %Op.type.3: type = fn_type @Op.3 [template] // CHECK:STDOUT: %Op.3: %Op.type.3 = struct_value () [template] // CHECK:STDOUT: %Op.type.4: type = fn_type @Op.4 [template] // CHECK:STDOUT: %Op.4: %Op.type.4 = struct_value () [template] -// CHECK:STDOUT: %.9: type = ptr_type %Self.2 [symbolic] -// CHECK:STDOUT: %.10: = interface_witness (%Op.3) [template] +// CHECK:STDOUT: %.7: type = ptr_type %Self.2 [symbolic] +// CHECK:STDOUT: %.8: = interface_witness (%Op.3) [template] // CHECK:STDOUT: %TestOp.type: type = fn_type @TestOp [template] // CHECK:STDOUT: %TestOp: %TestOp.type = struct_value () [template] -// CHECK:STDOUT: %.11: type = assoc_entity_type %.3, %Op.type.2 [template] -// CHECK:STDOUT: %.12: %.11 = assoc_entity element0, imports.%import_ref.9 [template] +// CHECK:STDOUT: %.9: type = assoc_entity_type %BitXor.type, %Op.type.2 [template] +// CHECK:STDOUT: %.10: %.9 = assoc_entity element0, imports.%import_ref.9 [template] // CHECK:STDOUT: %TestAssign.type: type = fn_type @TestAssign [template] // CHECK:STDOUT: %TestAssign: %TestAssign.type = struct_value () [template] -// CHECK:STDOUT: %.13: type = assoc_entity_type %.7, %Op.type.4 [template] -// CHECK:STDOUT: %.14: %.13 = assoc_entity element0, imports.%import_ref.10 [template] +// CHECK:STDOUT: %.11: type = assoc_entity_type %BitXorAssign.type, %Op.type.4 [template] +// CHECK:STDOUT: %.12: %.11 = assoc_entity element0, imports.%import_ref.10 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -79,13 +79,13 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: import Core//prelude/operators/comparison // CHECK:STDOUT: import Core//prelude/types/bool // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.1: type = import_ref Core//prelude/operators/bitwise, inst+131, loaded [template = constants.%.3] +// CHECK:STDOUT: %import_ref.1: type = import_ref Core//prelude/operators/bitwise, inst+131, loaded [template = constants.%BitXor.type] // CHECK:STDOUT: %import_ref.2 = import_ref Core//prelude/operators/bitwise, inst+133, unloaded -// CHECK:STDOUT: %import_ref.3: %.11 = import_ref Core//prelude/operators/bitwise, inst+156, loaded [template = constants.%.12] +// CHECK:STDOUT: %import_ref.3: %.9 = import_ref Core//prelude/operators/bitwise, inst+156, loaded [template = constants.%.10] // CHECK:STDOUT: %import_ref.4: %Op.type.2 = import_ref Core//prelude/operators/bitwise, inst+151, loaded [template = constants.%Op.2] -// CHECK:STDOUT: %import_ref.5: type = import_ref Core//prelude/operators/bitwise, inst+158, loaded [template = constants.%.7] +// CHECK:STDOUT: %import_ref.5: type = import_ref Core//prelude/operators/bitwise, inst+158, loaded [template = constants.%BitXorAssign.type] // CHECK:STDOUT: %import_ref.6 = import_ref Core//prelude/operators/bitwise, inst+160, unloaded -// CHECK:STDOUT: %import_ref.7: %.13 = import_ref Core//prelude/operators/bitwise, inst+183, loaded [template = constants.%.14] +// CHECK:STDOUT: %import_ref.7: %.11 = import_ref Core//prelude/operators/bitwise, inst+183, loaded [template = constants.%.12] // CHECK:STDOUT: %import_ref.8: %Op.type.4 = import_ref Core//prelude/operators/bitwise, inst+177, loaded [template = constants.%Op.4] // CHECK:STDOUT: %import_ref.9 = import_ref Core//prelude/operators/bitwise, inst+151, unloaded // CHECK:STDOUT: %import_ref.10 = import_ref Core//prelude/operators/bitwise, inst+177, unloaded @@ -103,12 +103,12 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: impl_decl @impl.1 [template] {} { // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %Core.ref: = name_ref Core, imports.%Core [template = imports.%Core] -// CHECK:STDOUT: %BitXor.ref: type = name_ref BitXor, imports.%import_ref.1 [template = constants.%.3] +// CHECK:STDOUT: %BitXor.ref: type = name_ref BitXor, imports.%import_ref.1 [template = constants.%BitXor.type] // CHECK:STDOUT: } // CHECK:STDOUT: impl_decl @impl.2 [template] {} { // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %Core.ref: = name_ref Core, imports.%Core [template = imports.%Core] -// CHECK:STDOUT: %BitXorAssign.ref: type = name_ref BitXorAssign, imports.%import_ref.5 [template = constants.%.7] +// CHECK:STDOUT: %BitXorAssign.ref: type = name_ref BitXorAssign, imports.%import_ref.5 [template = constants.%BitXorAssign.type] // CHECK:STDOUT: } // CHECK:STDOUT: %TestOp.decl: %TestOp.type = fn_decl @TestOp [template = constants.%TestOp] { // CHECK:STDOUT: %a.patt: %C = binding_pattern a @@ -124,13 +124,13 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %return: ref %C = var // CHECK:STDOUT: } // CHECK:STDOUT: %TestAssign.decl: %TestAssign.type = fn_decl @TestAssign [template = constants.%TestAssign] { -// CHECK:STDOUT: %a.patt: %.8 = binding_pattern a +// CHECK:STDOUT: %a.patt: %.6 = binding_pattern a // CHECK:STDOUT: %b.patt: %C = binding_pattern b // CHECK:STDOUT: } { // CHECK:STDOUT: %C.ref.loc30_18: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %.loc30: type = ptr_type %C [template = constants.%.8] -// CHECK:STDOUT: %a.param: %.8 = param a, runtime_param0 -// CHECK:STDOUT: %a: %.8 = bind_name a, %a.param +// CHECK:STDOUT: %.loc30: type = ptr_type %C [template = constants.%.6] +// CHECK:STDOUT: %a.param: %.6 = param a, runtime_param0 +// CHECK:STDOUT: %a: %.6 = bind_name a, %a.param // CHECK:STDOUT: %C.ref.loc30_25: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %b.param: %C = param b, runtime_param1 // CHECK:STDOUT: %b: %C = bind_name b, %b.param @@ -165,7 +165,7 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %C.ref.loc18_31: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %return: ref %C = var // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc17: = interface_witness (%Op.decl) [template = constants.%.5] +// CHECK:STDOUT: %.loc17: = interface_witness (%Op.decl) [template = constants.%.4] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Op = %Op.decl @@ -174,19 +174,19 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.2: %C.ref as %BitXorAssign.ref { // CHECK:STDOUT: %Op.decl: %Op.type.3 = fn_decl @Op.3 [template = constants.%Op.3] { -// CHECK:STDOUT: %self.patt: %.8 = binding_pattern self +// CHECK:STDOUT: %self.patt: %.6 = binding_pattern self // CHECK:STDOUT: %other.patt: %C = binding_pattern other // CHECK:STDOUT: } { // CHECK:STDOUT: %C.ref.loc23_20: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %.loc23_21: type = ptr_type %C [template = constants.%.8] -// CHECK:STDOUT: %self.param: %.8 = param self, runtime_param0 -// CHECK:STDOUT: %self: %.8 = bind_name self, %self.param -// CHECK:STDOUT: %.loc23_9: %.8 = addr_pattern %self +// CHECK:STDOUT: %.loc23_21: type = ptr_type %C [template = constants.%.6] +// CHECK:STDOUT: %self.param: %.6 = param self, runtime_param0 +// CHECK:STDOUT: %self: %.6 = bind_name self, %self.param +// CHECK:STDOUT: %.loc23_9: %.6 = addr_pattern %self // CHECK:STDOUT: %C.ref.loc23_31: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %other.param: %C = param other, runtime_param1 // CHECK:STDOUT: %other: %C = bind_name other, %other.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc22: = interface_witness (%Op.decl) [template = constants.%.10] +// CHECK:STDOUT: %.loc22: = interface_witness (%Op.decl) [template = constants.%.8] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Op = %Op.decl @@ -208,46 +208,46 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: return %.loc19_14 to %return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @Op.2(constants.%Self.1: %.3) { -// CHECK:STDOUT: %Self: %.3 = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self.1)] +// CHECK:STDOUT: generic fn @Op.2(constants.%Self.1: %BitXor.type) { +// CHECK:STDOUT: %Self: %BitXor.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self.1)] // CHECK:STDOUT: // CHECK:STDOUT: fn[%self: @Op.2.%Self (%Self.1)](%other: @Op.2.%Self (%Self.1)) -> @Op.2.%Self (%Self.1); // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Op.3[addr %self: %.8](%other: %C) { +// CHECK:STDOUT: fn @Op.3[addr %self: %.6](%other: %C) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @Op.4(constants.%Self.2: %.7) { -// CHECK:STDOUT: %Self: %.7 = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self.2)] -// CHECK:STDOUT: %.2: type = ptr_type @Op.4.%Self (%Self.2) [symbolic = %.2 (constants.%.9)] +// CHECK:STDOUT: generic fn @Op.4(constants.%Self.2: %BitXorAssign.type) { +// CHECK:STDOUT: %Self: %BitXorAssign.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self.2)] +// CHECK:STDOUT: %.2: type = ptr_type @Op.4.%Self (%Self.2) [symbolic = %.2 (constants.%.7)] // CHECK:STDOUT: -// CHECK:STDOUT: fn[addr %self: @Op.4.%.2 (%.9)](%other: @Op.4.%Self (%Self.2)); +// CHECK:STDOUT: fn[addr %self: @Op.4.%.2 (%.7)](%other: @Op.4.%Self (%Self.2)); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @TestOp(%a: %C, %b: %C) -> %return: %C { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: %C = name_ref a, %a // CHECK:STDOUT: %b.ref: %C = name_ref b, %b -// CHECK:STDOUT: %Op.ref: %.11 = name_ref Op, imports.%import_ref.3 [template = constants.%.12] -// CHECK:STDOUT: %.loc27_12.1: %Op.type.2 = interface_witness_access constants.%.5, element0 [template = constants.%Op.1] +// CHECK:STDOUT: %Op.ref: %.9 = name_ref Op, imports.%import_ref.3 [template = constants.%.10] +// CHECK:STDOUT: %.loc27_12.1: %Op.type.2 = interface_witness_access constants.%.4, element0 [template = constants.%Op.1] // CHECK:STDOUT: %.loc27_12.2: = bound_method %a.ref, %.loc27_12.1 // CHECK:STDOUT: %.loc26: ref %C = splice_block %return {} // CHECK:STDOUT: %Op.call: init %C = call %.loc27_12.2(%a.ref, %b.ref) to %.loc26 // CHECK:STDOUT: return %Op.call to %return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @TestAssign(%a: %.8, %b: %C) { +// CHECK:STDOUT: fn @TestAssign(%a: %.6, %b: %C) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %a.ref: %.8 = name_ref a, %a +// CHECK:STDOUT: %a.ref: %.6 = name_ref a, %a // CHECK:STDOUT: %.loc31_3.1: ref %C = deref %a.ref // CHECK:STDOUT: %b.ref: %C = name_ref b, %b -// CHECK:STDOUT: %Op.ref: %.13 = name_ref Op, imports.%import_ref.7 [template = constants.%.14] -// CHECK:STDOUT: %.loc31_6.1: %Op.type.4 = interface_witness_access constants.%.10, element0 [template = constants.%Op.3] +// CHECK:STDOUT: %Op.ref: %.11 = name_ref Op, imports.%import_ref.7 [template = constants.%.12] +// CHECK:STDOUT: %.loc31_6.1: %Op.type.4 = interface_witness_access constants.%.8, element0 [template = constants.%Op.3] // CHECK:STDOUT: %.loc31_6.2: = bound_method %.loc31_3.1, %.loc31_6.1 -// CHECK:STDOUT: %.loc31_3.2: %.8 = addr_of %.loc31_3.1 -// CHECK:STDOUT: %Op.call: init %.4 = call %.loc31_6.2(%.loc31_3.2, %b.ref) +// CHECK:STDOUT: %.loc31_3.2: %.6 = addr_of %.loc31_3.1 +// CHECK:STDOUT: %Op.call: init %.3 = call %.loc31_6.2(%.loc31_3.2, %b.ref) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -261,11 +261,11 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: // CHECK:STDOUT: specific @Op.4(constants.%Self.2) { // CHECK:STDOUT: %Self => constants.%Self.2 -// CHECK:STDOUT: %.2 => constants.%.9 +// CHECK:STDOUT: %.2 => constants.%.7 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Op.4(constants.%C) { // CHECK:STDOUT: %Self => constants.%C -// CHECK:STDOUT: %.2 => constants.%.8 +// CHECK:STDOUT: %.2 => constants.%.6 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/operators/overloaded/dec.carbon b/toolchain/check/testdata/operators/overloaded/dec.carbon index 5cfba9f626934..0dd66e1e600c0 100644 --- a/toolchain/check/testdata/operators/overloaded/dec.carbon +++ b/toolchain/check/testdata/operators/overloaded/dec.carbon @@ -29,22 +29,22 @@ fn TestOp() { // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %.1: type = struct_type {} [template] // CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] -// CHECK:STDOUT: %.3: type = interface_type @Dec [template] -// CHECK:STDOUT: %Self: %.3 = bind_symbolic_name Self, 0 [symbolic] -// CHECK:STDOUT: %.4: type = ptr_type %C [template] +// CHECK:STDOUT: %Dec.type: type = interface_type @Dec [template] +// CHECK:STDOUT: %Self: %Dec.type = bind_symbolic_name Self, 0 [symbolic] +// CHECK:STDOUT: %.3: type = ptr_type %C [template] // CHECK:STDOUT: %Op.type.1: type = fn_type @Op.1 [template] -// CHECK:STDOUT: %.5: type = tuple_type () [template] +// CHECK:STDOUT: %.4: type = tuple_type () [template] // CHECK:STDOUT: %Op.1: %Op.type.1 = struct_value () [template] // CHECK:STDOUT: %Op.type.2: type = fn_type @Op.2 [template] // CHECK:STDOUT: %Op.2: %Op.type.2 = struct_value () [template] -// CHECK:STDOUT: %.6: type = ptr_type %Self [symbolic] -// CHECK:STDOUT: %.7: = interface_witness (%Op.1) [template] +// CHECK:STDOUT: %.5: type = ptr_type %Self [symbolic] +// CHECK:STDOUT: %.6: = interface_witness (%Op.1) [template] // CHECK:STDOUT: %TestOp.type: type = fn_type @TestOp [template] // CHECK:STDOUT: %TestOp: %TestOp.type = struct_value () [template] -// CHECK:STDOUT: %.8: type = ptr_type %.1 [template] +// CHECK:STDOUT: %.7: type = ptr_type %.1 [template] // CHECK:STDOUT: %struct: %C = struct_value () [template] -// CHECK:STDOUT: %.9: type = assoc_entity_type %.3, %Op.type.2 [template] -// CHECK:STDOUT: %.10: %.9 = assoc_entity element0, imports.%import_ref.5 [template] +// CHECK:STDOUT: %.8: type = assoc_entity_type %Dec.type, %Op.type.2 [template] +// CHECK:STDOUT: %.9: %.8 = assoc_entity element0, imports.%import_ref.5 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -59,9 +59,9 @@ fn TestOp() { // CHECK:STDOUT: import Core//prelude/operators/comparison // CHECK:STDOUT: import Core//prelude/types/bool // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.1: type = import_ref Core//prelude/operators/arithmetic, inst+152, loaded [template = constants.%.3] +// CHECK:STDOUT: %import_ref.1: type = import_ref Core//prelude/operators/arithmetic, inst+152, loaded [template = constants.%Dec.type] // CHECK:STDOUT: %import_ref.2 = import_ref Core//prelude/operators/arithmetic, inst+154, unloaded -// CHECK:STDOUT: %import_ref.3: %.9 = import_ref Core//prelude/operators/arithmetic, inst+171, loaded [template = constants.%.10] +// CHECK:STDOUT: %import_ref.3: %.8 = import_ref Core//prelude/operators/arithmetic, inst+171, loaded [template = constants.%.9] // CHECK:STDOUT: %import_ref.4: %Op.type.2 = import_ref Core//prelude/operators/arithmetic, inst+165, loaded [template = constants.%Op.2] // CHECK:STDOUT: %import_ref.5 = import_ref Core//prelude/operators/arithmetic, inst+165, unloaded // CHECK:STDOUT: } @@ -77,7 +77,7 @@ fn TestOp() { // CHECK:STDOUT: impl_decl @impl [template] {} { // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %Core.ref: = name_ref Core, imports.%Core [template = imports.%Core] -// CHECK:STDOUT: %Dec.ref: type = name_ref Dec, imports.%import_ref.1 [template = constants.%.3] +// CHECK:STDOUT: %Dec.ref: type = name_ref Dec, imports.%import_ref.1 [template = constants.%Dec.type] // CHECK:STDOUT: } // CHECK:STDOUT: %TestOp.decl: %TestOp.type = fn_decl @TestOp [template = constants.%TestOp] {} {} // CHECK:STDOUT: } @@ -91,15 +91,15 @@ fn TestOp() { // CHECK:STDOUT: // CHECK:STDOUT: impl @impl: %C.ref as %Dec.ref { // CHECK:STDOUT: %Op.decl: %Op.type.1 = fn_decl @Op.1 [template = constants.%Op.1] { -// CHECK:STDOUT: %self.patt: %.4 = binding_pattern self +// CHECK:STDOUT: %self.patt: %.3 = binding_pattern self // CHECK:STDOUT: } { // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %.loc18_21: type = ptr_type %C [template = constants.%.4] -// CHECK:STDOUT: %self.param: %.4 = param self, runtime_param0 -// CHECK:STDOUT: %self: %.4 = bind_name self, %self.param -// CHECK:STDOUT: %.loc18_9: %.4 = addr_pattern %self +// CHECK:STDOUT: %.loc18_21: type = ptr_type %C [template = constants.%.3] +// CHECK:STDOUT: %self.param: %.3 = param self, runtime_param0 +// CHECK:STDOUT: %self: %.3 = bind_name self, %self.param +// CHECK:STDOUT: %.loc18_9: %.3 = addr_pattern %self // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc17: = interface_witness (%Op.decl) [template = constants.%.7] +// CHECK:STDOUT: %.loc17: = interface_witness (%Op.decl) [template = constants.%.6] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Op = %Op.decl @@ -113,13 +113,13 @@ fn TestOp() { // CHECK:STDOUT: .Self = constants.%C // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Op.1[addr %self: %.4](); +// CHECK:STDOUT: fn @Op.1[addr %self: %.3](); // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @Op.2(constants.%Self: %.3) { -// CHECK:STDOUT: %Self: %.3 = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self)] -// CHECK:STDOUT: %.2: type = ptr_type @Op.2.%Self (%Self) [symbolic = %.2 (constants.%.6)] +// CHECK:STDOUT: generic fn @Op.2(constants.%Self: %Dec.type) { +// CHECK:STDOUT: %Self: %Dec.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self)] +// CHECK:STDOUT: %.2: type = ptr_type @Op.2.%Self (%Self) [symbolic = %.2 (constants.%.5)] // CHECK:STDOUT: -// CHECK:STDOUT: fn[addr %self: @Op.2.%.2 (%.6)](); +// CHECK:STDOUT: fn[addr %self: @Op.2.%.2 (%.5)](); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @TestOp() { @@ -132,21 +132,21 @@ fn TestOp() { // CHECK:STDOUT: %.loc22_16: init %C = converted %.loc22_15.1, %.loc22_15.2 [template = constants.%struct] // CHECK:STDOUT: assign %c.var, %.loc22_16 // CHECK:STDOUT: %c.ref: ref %C = name_ref c, %c -// CHECK:STDOUT: %Op.ref: %.9 = name_ref Op, imports.%import_ref.3 [template = constants.%.10] -// CHECK:STDOUT: %.loc23_3.1: %Op.type.2 = interface_witness_access constants.%.7, element0 [template = constants.%Op.1] +// CHECK:STDOUT: %Op.ref: %.8 = name_ref Op, imports.%import_ref.3 [template = constants.%.9] +// CHECK:STDOUT: %.loc23_3.1: %Op.type.2 = interface_witness_access constants.%.6, element0 [template = constants.%Op.1] // CHECK:STDOUT: %.loc23_3.2: = bound_method %c.ref, %.loc23_3.1 -// CHECK:STDOUT: %.loc23_5: %.4 = addr_of %c.ref -// CHECK:STDOUT: %Op.call: init %.5 = call %.loc23_3.2(%.loc23_5) +// CHECK:STDOUT: %.loc23_5: %.3 = addr_of %c.ref +// CHECK:STDOUT: %Op.call: init %.4 = call %.loc23_3.2(%.loc23_5) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Op.2(constants.%Self) { // CHECK:STDOUT: %Self => constants.%Self -// CHECK:STDOUT: %.2 => constants.%.6 +// CHECK:STDOUT: %.2 => constants.%.5 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Op.2(constants.%C) { // CHECK:STDOUT: %Self => constants.%C -// CHECK:STDOUT: %.2 => constants.%.4 +// CHECK:STDOUT: %.2 => constants.%.3 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/operators/overloaded/div.carbon b/toolchain/check/testdata/operators/overloaded/div.carbon index 4a5735840c58e..47d1c042281d2 100644 --- a/toolchain/check/testdata/operators/overloaded/div.carbon +++ b/toolchain/check/testdata/operators/overloaded/div.carbon @@ -37,33 +37,33 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %.1: type = struct_type {} [template] // CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] -// CHECK:STDOUT: %.3: type = interface_type @Div [template] -// CHECK:STDOUT: %Self.1: %.3 = bind_symbolic_name Self, 0 [symbolic] +// CHECK:STDOUT: %Div.type: type = interface_type @Div [template] +// CHECK:STDOUT: %Self.1: %Div.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %Op.type.1: type = fn_type @Op.1 [template] -// CHECK:STDOUT: %.4: type = tuple_type () [template] +// CHECK:STDOUT: %.3: type = tuple_type () [template] // CHECK:STDOUT: %Op.1: %Op.type.1 = struct_value () [template] // CHECK:STDOUT: %Op.type.2: type = fn_type @Op.2 [template] // CHECK:STDOUT: %Op.2: %Op.type.2 = struct_value () [template] -// CHECK:STDOUT: %.5: = interface_witness (%Op.1) [template] -// CHECK:STDOUT: %.6: type = ptr_type %.1 [template] +// CHECK:STDOUT: %.4: = interface_witness (%Op.1) [template] +// CHECK:STDOUT: %.5: type = ptr_type %.1 [template] // CHECK:STDOUT: %struct: %C = struct_value () [template] -// CHECK:STDOUT: %.7: type = interface_type @DivAssign [template] -// CHECK:STDOUT: %Self.2: %.7 = bind_symbolic_name Self, 0 [symbolic] -// CHECK:STDOUT: %.8: type = ptr_type %C [template] +// CHECK:STDOUT: %DivAssign.type: type = interface_type @DivAssign [template] +// CHECK:STDOUT: %Self.2: %DivAssign.type = bind_symbolic_name Self, 0 [symbolic] +// CHECK:STDOUT: %.6: type = ptr_type %C [template] // CHECK:STDOUT: %Op.type.3: type = fn_type @Op.3 [template] // CHECK:STDOUT: %Op.3: %Op.type.3 = struct_value () [template] // CHECK:STDOUT: %Op.type.4: type = fn_type @Op.4 [template] // CHECK:STDOUT: %Op.4: %Op.type.4 = struct_value () [template] -// CHECK:STDOUT: %.9: type = ptr_type %Self.2 [symbolic] -// CHECK:STDOUT: %.10: = interface_witness (%Op.3) [template] +// CHECK:STDOUT: %.7: type = ptr_type %Self.2 [symbolic] +// CHECK:STDOUT: %.8: = interface_witness (%Op.3) [template] // CHECK:STDOUT: %TestOp.type: type = fn_type @TestOp [template] // CHECK:STDOUT: %TestOp: %TestOp.type = struct_value () [template] -// CHECK:STDOUT: %.11: type = assoc_entity_type %.3, %Op.type.2 [template] -// CHECK:STDOUT: %.12: %.11 = assoc_entity element0, imports.%import_ref.9 [template] +// CHECK:STDOUT: %.9: type = assoc_entity_type %Div.type, %Op.type.2 [template] +// CHECK:STDOUT: %.10: %.9 = assoc_entity element0, imports.%import_ref.9 [template] // CHECK:STDOUT: %TestAssign.type: type = fn_type @TestAssign [template] // CHECK:STDOUT: %TestAssign: %TestAssign.type = struct_value () [template] -// CHECK:STDOUT: %.13: type = assoc_entity_type %.7, %Op.type.4 [template] -// CHECK:STDOUT: %.14: %.13 = assoc_entity element0, imports.%import_ref.10 [template] +// CHECK:STDOUT: %.11: type = assoc_entity_type %DivAssign.type, %Op.type.4 [template] +// CHECK:STDOUT: %.12: %.11 = assoc_entity element0, imports.%import_ref.10 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -79,13 +79,13 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: import Core//prelude/operators/comparison // CHECK:STDOUT: import Core//prelude/types/bool // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.1: type = import_ref Core//prelude/operators/arithmetic, inst+227, loaded [template = constants.%.3] +// CHECK:STDOUT: %import_ref.1: type = import_ref Core//prelude/operators/arithmetic, inst+227, loaded [template = constants.%Div.type] // CHECK:STDOUT: %import_ref.2 = import_ref Core//prelude/operators/arithmetic, inst+229, unloaded -// CHECK:STDOUT: %import_ref.3: %.11 = import_ref Core//prelude/operators/arithmetic, inst+252, loaded [template = constants.%.12] +// CHECK:STDOUT: %import_ref.3: %.9 = import_ref Core//prelude/operators/arithmetic, inst+252, loaded [template = constants.%.10] // CHECK:STDOUT: %import_ref.4: %Op.type.2 = import_ref Core//prelude/operators/arithmetic, inst+247, loaded [template = constants.%Op.2] -// CHECK:STDOUT: %import_ref.5: type = import_ref Core//prelude/operators/arithmetic, inst+254, loaded [template = constants.%.7] +// CHECK:STDOUT: %import_ref.5: type = import_ref Core//prelude/operators/arithmetic, inst+254, loaded [template = constants.%DivAssign.type] // CHECK:STDOUT: %import_ref.6 = import_ref Core//prelude/operators/arithmetic, inst+256, unloaded -// CHECK:STDOUT: %import_ref.7: %.13 = import_ref Core//prelude/operators/arithmetic, inst+279, loaded [template = constants.%.14] +// CHECK:STDOUT: %import_ref.7: %.11 = import_ref Core//prelude/operators/arithmetic, inst+279, loaded [template = constants.%.12] // CHECK:STDOUT: %import_ref.8: %Op.type.4 = import_ref Core//prelude/operators/arithmetic, inst+273, loaded [template = constants.%Op.4] // CHECK:STDOUT: %import_ref.9 = import_ref Core//prelude/operators/arithmetic, inst+247, unloaded // CHECK:STDOUT: %import_ref.10 = import_ref Core//prelude/operators/arithmetic, inst+273, unloaded @@ -103,12 +103,12 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: impl_decl @impl.1 [template] {} { // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %Core.ref: = name_ref Core, imports.%Core [template = imports.%Core] -// CHECK:STDOUT: %Div.ref: type = name_ref Div, imports.%import_ref.1 [template = constants.%.3] +// CHECK:STDOUT: %Div.ref: type = name_ref Div, imports.%import_ref.1 [template = constants.%Div.type] // CHECK:STDOUT: } // CHECK:STDOUT: impl_decl @impl.2 [template] {} { // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %Core.ref: = name_ref Core, imports.%Core [template = imports.%Core] -// CHECK:STDOUT: %DivAssign.ref: type = name_ref DivAssign, imports.%import_ref.5 [template = constants.%.7] +// CHECK:STDOUT: %DivAssign.ref: type = name_ref DivAssign, imports.%import_ref.5 [template = constants.%DivAssign.type] // CHECK:STDOUT: } // CHECK:STDOUT: %TestOp.decl: %TestOp.type = fn_decl @TestOp [template = constants.%TestOp] { // CHECK:STDOUT: %a.patt: %C = binding_pattern a @@ -124,13 +124,13 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %return: ref %C = var // CHECK:STDOUT: } // CHECK:STDOUT: %TestAssign.decl: %TestAssign.type = fn_decl @TestAssign [template = constants.%TestAssign] { -// CHECK:STDOUT: %a.patt: %.8 = binding_pattern a +// CHECK:STDOUT: %a.patt: %.6 = binding_pattern a // CHECK:STDOUT: %b.patt: %C = binding_pattern b // CHECK:STDOUT: } { // CHECK:STDOUT: %C.ref.loc30_18: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %.loc30: type = ptr_type %C [template = constants.%.8] -// CHECK:STDOUT: %a.param: %.8 = param a, runtime_param0 -// CHECK:STDOUT: %a: %.8 = bind_name a, %a.param +// CHECK:STDOUT: %.loc30: type = ptr_type %C [template = constants.%.6] +// CHECK:STDOUT: %a.param: %.6 = param a, runtime_param0 +// CHECK:STDOUT: %a: %.6 = bind_name a, %a.param // CHECK:STDOUT: %C.ref.loc30_25: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %b.param: %C = param b, runtime_param1 // CHECK:STDOUT: %b: %C = bind_name b, %b.param @@ -165,7 +165,7 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %C.ref.loc18_31: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %return: ref %C = var // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc17: = interface_witness (%Op.decl) [template = constants.%.5] +// CHECK:STDOUT: %.loc17: = interface_witness (%Op.decl) [template = constants.%.4] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Op = %Op.decl @@ -174,19 +174,19 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.2: %C.ref as %DivAssign.ref { // CHECK:STDOUT: %Op.decl: %Op.type.3 = fn_decl @Op.3 [template = constants.%Op.3] { -// CHECK:STDOUT: %self.patt: %.8 = binding_pattern self +// CHECK:STDOUT: %self.patt: %.6 = binding_pattern self // CHECK:STDOUT: %other.patt: %C = binding_pattern other // CHECK:STDOUT: } { // CHECK:STDOUT: %C.ref.loc23_20: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %.loc23_21: type = ptr_type %C [template = constants.%.8] -// CHECK:STDOUT: %self.param: %.8 = param self, runtime_param0 -// CHECK:STDOUT: %self: %.8 = bind_name self, %self.param -// CHECK:STDOUT: %.loc23_9: %.8 = addr_pattern %self +// CHECK:STDOUT: %.loc23_21: type = ptr_type %C [template = constants.%.6] +// CHECK:STDOUT: %self.param: %.6 = param self, runtime_param0 +// CHECK:STDOUT: %self: %.6 = bind_name self, %self.param +// CHECK:STDOUT: %.loc23_9: %.6 = addr_pattern %self // CHECK:STDOUT: %C.ref.loc23_31: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %other.param: %C = param other, runtime_param1 // CHECK:STDOUT: %other: %C = bind_name other, %other.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc22: = interface_witness (%Op.decl) [template = constants.%.10] +// CHECK:STDOUT: %.loc22: = interface_witness (%Op.decl) [template = constants.%.8] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Op = %Op.decl @@ -208,46 +208,46 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: return %.loc19_14 to %return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @Op.2(constants.%Self.1: %.3) { -// CHECK:STDOUT: %Self: %.3 = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self.1)] +// CHECK:STDOUT: generic fn @Op.2(constants.%Self.1: %Div.type) { +// CHECK:STDOUT: %Self: %Div.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self.1)] // CHECK:STDOUT: // CHECK:STDOUT: fn[%self: @Op.2.%Self (%Self.1)](%other: @Op.2.%Self (%Self.1)) -> @Op.2.%Self (%Self.1); // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Op.3[addr %self: %.8](%other: %C) { +// CHECK:STDOUT: fn @Op.3[addr %self: %.6](%other: %C) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @Op.4(constants.%Self.2: %.7) { -// CHECK:STDOUT: %Self: %.7 = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self.2)] -// CHECK:STDOUT: %.2: type = ptr_type @Op.4.%Self (%Self.2) [symbolic = %.2 (constants.%.9)] +// CHECK:STDOUT: generic fn @Op.4(constants.%Self.2: %DivAssign.type) { +// CHECK:STDOUT: %Self: %DivAssign.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self.2)] +// CHECK:STDOUT: %.2: type = ptr_type @Op.4.%Self (%Self.2) [symbolic = %.2 (constants.%.7)] // CHECK:STDOUT: -// CHECK:STDOUT: fn[addr %self: @Op.4.%.2 (%.9)](%other: @Op.4.%Self (%Self.2)); +// CHECK:STDOUT: fn[addr %self: @Op.4.%.2 (%.7)](%other: @Op.4.%Self (%Self.2)); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @TestOp(%a: %C, %b: %C) -> %return: %C { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: %C = name_ref a, %a // CHECK:STDOUT: %b.ref: %C = name_ref b, %b -// CHECK:STDOUT: %Op.ref: %.11 = name_ref Op, imports.%import_ref.3 [template = constants.%.12] -// CHECK:STDOUT: %.loc27_12.1: %Op.type.2 = interface_witness_access constants.%.5, element0 [template = constants.%Op.1] +// CHECK:STDOUT: %Op.ref: %.9 = name_ref Op, imports.%import_ref.3 [template = constants.%.10] +// CHECK:STDOUT: %.loc27_12.1: %Op.type.2 = interface_witness_access constants.%.4, element0 [template = constants.%Op.1] // CHECK:STDOUT: %.loc27_12.2: = bound_method %a.ref, %.loc27_12.1 // CHECK:STDOUT: %.loc26: ref %C = splice_block %return {} // CHECK:STDOUT: %Op.call: init %C = call %.loc27_12.2(%a.ref, %b.ref) to %.loc26 // CHECK:STDOUT: return %Op.call to %return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @TestAssign(%a: %.8, %b: %C) { +// CHECK:STDOUT: fn @TestAssign(%a: %.6, %b: %C) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %a.ref: %.8 = name_ref a, %a +// CHECK:STDOUT: %a.ref: %.6 = name_ref a, %a // CHECK:STDOUT: %.loc31_3.1: ref %C = deref %a.ref // CHECK:STDOUT: %b.ref: %C = name_ref b, %b -// CHECK:STDOUT: %Op.ref: %.13 = name_ref Op, imports.%import_ref.7 [template = constants.%.14] -// CHECK:STDOUT: %.loc31_6.1: %Op.type.4 = interface_witness_access constants.%.10, element0 [template = constants.%Op.3] +// CHECK:STDOUT: %Op.ref: %.11 = name_ref Op, imports.%import_ref.7 [template = constants.%.12] +// CHECK:STDOUT: %.loc31_6.1: %Op.type.4 = interface_witness_access constants.%.8, element0 [template = constants.%Op.3] // CHECK:STDOUT: %.loc31_6.2: = bound_method %.loc31_3.1, %.loc31_6.1 -// CHECK:STDOUT: %.loc31_3.2: %.8 = addr_of %.loc31_3.1 -// CHECK:STDOUT: %Op.call: init %.4 = call %.loc31_6.2(%.loc31_3.2, %b.ref) +// CHECK:STDOUT: %.loc31_3.2: %.6 = addr_of %.loc31_3.1 +// CHECK:STDOUT: %Op.call: init %.3 = call %.loc31_6.2(%.loc31_3.2, %b.ref) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -261,11 +261,11 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: // CHECK:STDOUT: specific @Op.4(constants.%Self.2) { // CHECK:STDOUT: %Self => constants.%Self.2 -// CHECK:STDOUT: %.2 => constants.%.9 +// CHECK:STDOUT: %.2 => constants.%.7 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Op.4(constants.%C) { // CHECK:STDOUT: %Self => constants.%C -// CHECK:STDOUT: %.2 => constants.%.8 +// CHECK:STDOUT: %.2 => constants.%.6 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/operators/overloaded/eq.carbon b/toolchain/check/testdata/operators/overloaded/eq.carbon index 44463b9046983..7ba9500392c7f 100644 --- a/toolchain/check/testdata/operators/overloaded/eq.carbon +++ b/toolchain/check/testdata/operators/overloaded/eq.carbon @@ -88,10 +88,10 @@ fn TestLhsBad(a: D, b: C) -> bool { // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %.1: type = struct_type {} [template] // CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] -// CHECK:STDOUT: %.3: type = interface_type @Eq [template] -// CHECK:STDOUT: %Self: %.3 = bind_symbolic_name Self, 0 [symbolic] +// CHECK:STDOUT: %Eq.type: type = interface_type @Eq [template] +// CHECK:STDOUT: %Self: %Eq.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %Bool.type: type = fn_type @Bool [template] -// CHECK:STDOUT: %.4: type = tuple_type () [template] +// CHECK:STDOUT: %.3: type = tuple_type () [template] // CHECK:STDOUT: %Bool: %Bool.type = struct_value () [template] // CHECK:STDOUT: %Equal.type.1: type = fn_type @Equal.1 [template] // CHECK:STDOUT: %Equal.1: %Equal.type.1 = struct_value () [template] @@ -101,16 +101,16 @@ fn TestLhsBad(a: D, b: C) -> bool { // CHECK:STDOUT: %Equal.2: %Equal.type.2 = struct_value () [template] // CHECK:STDOUT: %NotEqual.type.2: type = fn_type @NotEqual.2 [template] // CHECK:STDOUT: %NotEqual.2: %NotEqual.type.2 = struct_value () [template] -// CHECK:STDOUT: %.5: = interface_witness (%Equal.1, %NotEqual.1) [template] +// CHECK:STDOUT: %.4: = interface_witness (%Equal.1, %NotEqual.1) [template] // CHECK:STDOUT: %TestEqual.type: type = fn_type @TestEqual [template] // CHECK:STDOUT: %TestEqual: %TestEqual.type = struct_value () [template] -// CHECK:STDOUT: %.6: type = ptr_type %.1 [template] -// CHECK:STDOUT: %.7: type = assoc_entity_type %.3, %Equal.type.2 [template] -// CHECK:STDOUT: %.8: %.7 = assoc_entity element0, imports.%import_ref.8 [template] +// CHECK:STDOUT: %.5: type = ptr_type %.1 [template] +// CHECK:STDOUT: %.6: type = assoc_entity_type %Eq.type, %Equal.type.2 [template] +// CHECK:STDOUT: %.7: %.6 = assoc_entity element0, imports.%import_ref.8 [template] // CHECK:STDOUT: %TestNotEqual.type: type = fn_type @TestNotEqual [template] // CHECK:STDOUT: %TestNotEqual: %TestNotEqual.type = struct_value () [template] -// CHECK:STDOUT: %.9: type = assoc_entity_type %.3, %NotEqual.type.2 [template] -// CHECK:STDOUT: %.10: %.9 = assoc_entity element1, imports.%import_ref.9 [template] +// CHECK:STDOUT: %.8: type = assoc_entity_type %Eq.type, %NotEqual.type.2 [template] +// CHECK:STDOUT: %.9: %.8 = assoc_entity element1, imports.%import_ref.9 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -126,10 +126,10 @@ fn TestLhsBad(a: D, b: C) -> bool { // CHECK:STDOUT: import Core//prelude/operators/comparison // CHECK:STDOUT: import Core//prelude/types/bool // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.1: type = import_ref Core//prelude/operators/comparison, inst+3, loaded [template = constants.%.3] +// CHECK:STDOUT: %import_ref.1: type = import_ref Core//prelude/operators/comparison, inst+3, loaded [template = constants.%Eq.type] // CHECK:STDOUT: %import_ref.2 = import_ref Core//prelude/operators/comparison, inst+5, unloaded -// CHECK:STDOUT: %import_ref.3: %.7 = import_ref Core//prelude/operators/comparison, inst+33, loaded [template = constants.%.8] -// CHECK:STDOUT: %import_ref.4: %.9 = import_ref Core//prelude/operators/comparison, inst+56, loaded [template = constants.%.10] +// CHECK:STDOUT: %import_ref.3: %.6 = import_ref Core//prelude/operators/comparison, inst+33, loaded [template = constants.%.7] +// CHECK:STDOUT: %import_ref.4: %.8 = import_ref Core//prelude/operators/comparison, inst+56, loaded [template = constants.%.9] // CHECK:STDOUT: %import_ref.5: %Equal.type.2 = import_ref Core//prelude/operators/comparison, inst+28, loaded [template = constants.%Equal.2] // CHECK:STDOUT: %import_ref.6: %NotEqual.type.2 = import_ref Core//prelude/operators/comparison, inst+51, loaded [template = constants.%NotEqual.2] // CHECK:STDOUT: %import_ref.7: %Bool.type = import_ref Core//prelude/types/bool, inst+2, loaded [template = constants.%Bool] @@ -149,7 +149,7 @@ fn TestLhsBad(a: D, b: C) -> bool { // CHECK:STDOUT: impl_decl @impl [template] {} { // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %Core.ref: = name_ref Core, imports.%Core [template = imports.%Core] -// CHECK:STDOUT: %Eq.ref: type = name_ref Eq, imports.%import_ref.1 [template = constants.%.3] +// CHECK:STDOUT: %Eq.ref: type = name_ref Eq, imports.%import_ref.1 [template = constants.%Eq.type] // CHECK:STDOUT: } // CHECK:STDOUT: %TestEqual.decl: %TestEqual.type = fn_decl @TestEqual [template = constants.%TestEqual] { // CHECK:STDOUT: %a.patt: %C = binding_pattern a @@ -222,7 +222,7 @@ fn TestLhsBad(a: D, b: C) -> bool { // CHECK:STDOUT: %.loc8_37.2: type = converted %bool.make_type, %.loc8_37.1 [template = bool] // CHECK:STDOUT: %return: ref bool = var // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc6: = interface_witness (%Equal.decl, %NotEqual.decl) [template = constants.%.5] +// CHECK:STDOUT: %.loc6: = interface_witness (%Equal.decl, %NotEqual.decl) [template = constants.%.4] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Equal = %Equal.decl @@ -243,14 +243,14 @@ fn TestLhsBad(a: D, b: C) -> bool { // CHECK:STDOUT: // CHECK:STDOUT: fn @NotEqual.1[%self: %C](%other: %C) -> bool; // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @Equal.2(constants.%Self: %.3) { -// CHECK:STDOUT: %Self: %.3 = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self)] +// CHECK:STDOUT: generic fn @Equal.2(constants.%Self: %Eq.type) { +// CHECK:STDOUT: %Self: %Eq.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self)] // CHECK:STDOUT: // CHECK:STDOUT: fn[%self: @Equal.2.%Self (%Self)](%other: @Equal.2.%Self (%Self)) -> bool; // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @NotEqual.2(constants.%Self: %.3) { -// CHECK:STDOUT: %Self: %.3 = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self)] +// CHECK:STDOUT: generic fn @NotEqual.2(constants.%Self: %Eq.type) { +// CHECK:STDOUT: %Self: %Eq.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self)] // CHECK:STDOUT: // CHECK:STDOUT: fn[%self: @NotEqual.2.%Self (%Self)](%other: @NotEqual.2.%Self (%Self)) -> bool; // CHECK:STDOUT: } @@ -259,8 +259,8 @@ fn TestLhsBad(a: D, b: C) -> bool { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: %C = name_ref a, %a // CHECK:STDOUT: %b.ref: %C = name_ref b, %b -// CHECK:STDOUT: %Equal.ref: %.7 = name_ref Equal, imports.%import_ref.3 [template = constants.%.8] -// CHECK:STDOUT: %.loc12_12.1: %Equal.type.2 = interface_witness_access constants.%.5, element0 [template = constants.%Equal.1] +// CHECK:STDOUT: %Equal.ref: %.6 = name_ref Equal, imports.%import_ref.3 [template = constants.%.7] +// CHECK:STDOUT: %.loc12_12.1: %Equal.type.2 = interface_witness_access constants.%.4, element0 [template = constants.%Equal.1] // CHECK:STDOUT: %.loc12_12.2: = bound_method %a.ref, %.loc12_12.1 // CHECK:STDOUT: %Equal.call: init bool = call %.loc12_12.2(%a.ref, %b.ref) // CHECK:STDOUT: %.loc12_16.1: bool = value_of_initializer %Equal.call @@ -272,8 +272,8 @@ fn TestLhsBad(a: D, b: C) -> bool { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: %C = name_ref a, %a // CHECK:STDOUT: %b.ref: %C = name_ref b, %b -// CHECK:STDOUT: %NotEqual.ref: %.9 = name_ref NotEqual, imports.%import_ref.4 [template = constants.%.10] -// CHECK:STDOUT: %.loc16_12.1: %NotEqual.type.2 = interface_witness_access constants.%.5, element1 [template = constants.%NotEqual.1] +// CHECK:STDOUT: %NotEqual.ref: %.8 = name_ref NotEqual, imports.%import_ref.4 [template = constants.%.9] +// CHECK:STDOUT: %.loc16_12.1: %NotEqual.type.2 = interface_witness_access constants.%.4, element1 [template = constants.%NotEqual.1] // CHECK:STDOUT: %.loc16_12.2: = bound_method %a.ref, %.loc16_12.1 // CHECK:STDOUT: %NotEqual.call: init bool = call %.loc16_12.2(%a.ref, %b.ref) // CHECK:STDOUT: %.loc16_16.1: bool = value_of_initializer %NotEqual.call @@ -309,18 +309,18 @@ fn TestLhsBad(a: D, b: C) -> bool { // CHECK:STDOUT: %TestEqual.type: type = fn_type @TestEqual [template] // CHECK:STDOUT: %TestEqual: %TestEqual.type = struct_value () [template] // CHECK:STDOUT: %.4: type = ptr_type %.1 [template] -// CHECK:STDOUT: %.5: type = interface_type @Eq [template] -// CHECK:STDOUT: %Self: %.5 = bind_symbolic_name Self, 0 [symbolic] +// CHECK:STDOUT: %Eq.type: type = interface_type @Eq [template] +// CHECK:STDOUT: %Self: %Eq.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %Equal.type: type = fn_type @Equal [template] // CHECK:STDOUT: %Equal: %Equal.type = struct_value () [template] -// CHECK:STDOUT: %.6: type = assoc_entity_type %.5, %Equal.type [template] -// CHECK:STDOUT: %.7: %.6 = assoc_entity element0, imports.%import_ref.8 [template] +// CHECK:STDOUT: %.5: type = assoc_entity_type %Eq.type, %Equal.type [template] +// CHECK:STDOUT: %.6: %.5 = assoc_entity element0, imports.%import_ref.8 [template] // CHECK:STDOUT: %TestNotEqual.type: type = fn_type @TestNotEqual [template] // CHECK:STDOUT: %TestNotEqual: %TestNotEqual.type = struct_value () [template] // CHECK:STDOUT: %NotEqual.type: type = fn_type @NotEqual [template] // CHECK:STDOUT: %NotEqual: %NotEqual.type = struct_value () [template] -// CHECK:STDOUT: %.8: type = assoc_entity_type %.5, %NotEqual.type [template] -// CHECK:STDOUT: %.9: %.8 = assoc_entity element1, imports.%import_ref.9 [template] +// CHECK:STDOUT: %.7: type = assoc_entity_type %Eq.type, %NotEqual.type [template] +// CHECK:STDOUT: %.8: %.7 = assoc_entity element1, imports.%import_ref.9 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -337,10 +337,10 @@ fn TestLhsBad(a: D, b: C) -> bool { // CHECK:STDOUT: import Core//prelude/types/bool // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.1: %Bool.type = import_ref Core//prelude/types/bool, inst+2, loaded [template = constants.%Bool] -// CHECK:STDOUT: %import_ref.2: type = import_ref Core//prelude/operators/comparison, inst+3, loaded [template = constants.%.5] +// CHECK:STDOUT: %import_ref.2: type = import_ref Core//prelude/operators/comparison, inst+3, loaded [template = constants.%Eq.type] // CHECK:STDOUT: %import_ref.3 = import_ref Core//prelude/operators/comparison, inst+5, unloaded -// CHECK:STDOUT: %import_ref.4: %.6 = import_ref Core//prelude/operators/comparison, inst+33, loaded [template = constants.%.7] -// CHECK:STDOUT: %import_ref.5: %.8 = import_ref Core//prelude/operators/comparison, inst+56, loaded [template = constants.%.9] +// CHECK:STDOUT: %import_ref.4: %.5 = import_ref Core//prelude/operators/comparison, inst+33, loaded [template = constants.%.6] +// CHECK:STDOUT: %import_ref.5: %.7 = import_ref Core//prelude/operators/comparison, inst+56, loaded [template = constants.%.8] // CHECK:STDOUT: %import_ref.6 = import_ref Core//prelude/operators/comparison, inst+28, unloaded // CHECK:STDOUT: %import_ref.7 = import_ref Core//prelude/operators/comparison, inst+51, unloaded // CHECK:STDOUT: %import_ref.8 = import_ref Core//prelude/operators/comparison, inst+28, unloaded @@ -409,12 +409,12 @@ fn TestLhsBad(a: D, b: C) -> bool { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: %D = name_ref a, %a // CHECK:STDOUT: %b.ref: %D = name_ref b, %b -// CHECK:STDOUT: %Equal.ref: %.6 = name_ref Equal, imports.%import_ref.4 [template = constants.%.7] +// CHECK:STDOUT: %Equal.ref: %.5 = name_ref Equal, imports.%import_ref.4 [template = constants.%.6] // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @Equal(constants.%Self: %.5) { -// CHECK:STDOUT: %Self: %.5 = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self)] +// CHECK:STDOUT: generic fn @Equal(constants.%Self: %Eq.type) { +// CHECK:STDOUT: %Self: %Eq.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self)] // CHECK:STDOUT: // CHECK:STDOUT: fn[%self: @Equal.%Self (%Self)](%other: @Equal.%Self (%Self)) -> bool; // CHECK:STDOUT: } @@ -423,12 +423,12 @@ fn TestLhsBad(a: D, b: C) -> bool { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: %D = name_ref a, %a // CHECK:STDOUT: %b.ref: %D = name_ref b, %b -// CHECK:STDOUT: %NotEqual.ref: %.8 = name_ref NotEqual, imports.%import_ref.5 [template = constants.%.9] +// CHECK:STDOUT: %NotEqual.ref: %.7 = name_ref NotEqual, imports.%import_ref.5 [template = constants.%.8] // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @NotEqual(constants.%Self: %.5) { -// CHECK:STDOUT: %Self: %.5 = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self)] +// CHECK:STDOUT: generic fn @NotEqual(constants.%Self: %Eq.type) { +// CHECK:STDOUT: %Self: %Eq.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self)] // CHECK:STDOUT: // CHECK:STDOUT: fn[%self: @NotEqual.%Self (%Self)](%other: @NotEqual.%Self (%Self)) -> bool; // CHECK:STDOUT: } @@ -448,10 +448,10 @@ fn TestLhsBad(a: D, b: C) -> bool { // CHECK:STDOUT: %.1: type = struct_type {} [template] // CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] // CHECK:STDOUT: %D: type = class_type @D [template] -// CHECK:STDOUT: %.3: type = interface_type @Eq [template] -// CHECK:STDOUT: %Self.1: %.3 = bind_symbolic_name Self, 0 [symbolic] +// CHECK:STDOUT: %Eq.type: type = interface_type @Eq [template] +// CHECK:STDOUT: %Self.1: %Eq.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %Bool.type: type = fn_type @Bool [template] -// CHECK:STDOUT: %.4: type = tuple_type () [template] +// CHECK:STDOUT: %.3: type = tuple_type () [template] // CHECK:STDOUT: %Bool: %Bool.type = struct_value () [template] // CHECK:STDOUT: %Equal.type.1: type = fn_type @Equal.1 [template] // CHECK:STDOUT: %Equal.1: %Equal.type.1 = struct_value () [template] @@ -461,32 +461,32 @@ fn TestLhsBad(a: D, b: C) -> bool { // CHECK:STDOUT: %Equal.2: %Equal.type.2 = struct_value () [template] // CHECK:STDOUT: %NotEqual.type.2: type = fn_type @NotEqual.2 [template] // CHECK:STDOUT: %NotEqual.2: %NotEqual.type.2 = struct_value () [template] -// CHECK:STDOUT: %.5: = interface_witness (%Equal.1, %NotEqual.1) [template] +// CHECK:STDOUT: %.4: = interface_witness (%Equal.1, %NotEqual.1) [template] // CHECK:STDOUT: %TestRhsBad.type: type = fn_type @TestRhsBad [template] // CHECK:STDOUT: %TestRhsBad: %TestRhsBad.type = struct_value () [template] -// CHECK:STDOUT: %.6: type = ptr_type %.1 [template] -// CHECK:STDOUT: %.7: type = assoc_entity_type %.3, %Equal.type.2 [template] -// CHECK:STDOUT: %.8: %.7 = assoc_entity element0, imports.%import_ref.8 [template] -// CHECK:STDOUT: %ImplicitAs.type: type = generic_interface_type @ImplicitAs [template] -// CHECK:STDOUT: %ImplicitAs: %ImplicitAs.type = struct_value () [template] +// CHECK:STDOUT: %.5: type = ptr_type %.1 [template] +// CHECK:STDOUT: %.6: type = assoc_entity_type %Eq.type, %Equal.type.2 [template] +// CHECK:STDOUT: %.7: %.6 = assoc_entity element0, imports.%import_ref.8 [template] +// CHECK:STDOUT: %ImplicitAs.type.1: type = generic_interface_type @ImplicitAs [template] +// CHECK:STDOUT: %ImplicitAs: %ImplicitAs.type.1 = struct_value () [template] // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic] -// CHECK:STDOUT: %.9: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic] -// CHECK:STDOUT: %Self.2: @ImplicitAs.%.1 (%.9) = bind_symbolic_name Self, 1 [symbolic] -// CHECK:STDOUT: %Self.3: %.9 = bind_symbolic_name Self, 1 [symbolic] +// CHECK:STDOUT: %ImplicitAs.type.2: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic] +// CHECK:STDOUT: %Self.2: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2) = bind_symbolic_name Self, 1 [symbolic] +// CHECK:STDOUT: %Self.3: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: %Convert.type.1: type = fn_type @Convert, @ImplicitAs(%Dest) [symbolic] // CHECK:STDOUT: %Convert.1: %Convert.type.1 = struct_value () [symbolic] -// CHECK:STDOUT: %.10: type = assoc_entity_type %.9, %Convert.type.1 [symbolic] -// CHECK:STDOUT: %.11: %.10 = assoc_entity element0, imports.%import_ref.13 [symbolic] -// CHECK:STDOUT: %.12: type = interface_type @ImplicitAs, @ImplicitAs(%C) [template] +// CHECK:STDOUT: %.8: type = assoc_entity_type %ImplicitAs.type.2, %Convert.type.1 [symbolic] +// CHECK:STDOUT: %.9: %.8 = assoc_entity element0, imports.%import_ref.13 [symbolic] +// CHECK:STDOUT: %ImplicitAs.type.3: type = interface_type @ImplicitAs, @ImplicitAs(%C) [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert, @ImplicitAs(%C) [template] // CHECK:STDOUT: %Convert.2: %Convert.type.2 = struct_value () [template] -// CHECK:STDOUT: %.13: type = assoc_entity_type %.12, %Convert.type.2 [template] -// CHECK:STDOUT: %.14: %.13 = assoc_entity element0, imports.%import_ref.13 [template] -// CHECK:STDOUT: %.15: %.10 = assoc_entity element0, imports.%import_ref.14 [symbolic] +// CHECK:STDOUT: %.10: type = assoc_entity_type %ImplicitAs.type.3, %Convert.type.2 [template] +// CHECK:STDOUT: %.11: %.10 = assoc_entity element0, imports.%import_ref.13 [template] +// CHECK:STDOUT: %.12: %.8 = assoc_entity element0, imports.%import_ref.14 [symbolic] // CHECK:STDOUT: %TestLhsBad.type: type = fn_type @TestLhsBad [template] // CHECK:STDOUT: %TestLhsBad: %TestLhsBad.type = struct_value () [template] -// CHECK:STDOUT: %.16: type = assoc_entity_type %.3, %NotEqual.type.2 [template] -// CHECK:STDOUT: %.17: %.16 = assoc_entity element1, imports.%import_ref.15 [template] +// CHECK:STDOUT: %.13: type = assoc_entity_type %Eq.type, %NotEqual.type.2 [template] +// CHECK:STDOUT: %.14: %.13 = assoc_entity element1, imports.%import_ref.15 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -503,17 +503,17 @@ fn TestLhsBad(a: D, b: C) -> bool { // CHECK:STDOUT: import Core//prelude/operators/comparison // CHECK:STDOUT: import Core//prelude/types/bool // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.1: type = import_ref Core//prelude/operators/comparison, inst+3, loaded [template = constants.%.3] +// CHECK:STDOUT: %import_ref.1: type = import_ref Core//prelude/operators/comparison, inst+3, loaded [template = constants.%Eq.type] // CHECK:STDOUT: %import_ref.2 = import_ref Core//prelude/operators/comparison, inst+5, unloaded -// CHECK:STDOUT: %import_ref.3: %.7 = import_ref Core//prelude/operators/comparison, inst+33, loaded [template = constants.%.8] -// CHECK:STDOUT: %import_ref.4: %.16 = import_ref Core//prelude/operators/comparison, inst+56, loaded [template = constants.%.17] +// CHECK:STDOUT: %import_ref.3: %.6 = import_ref Core//prelude/operators/comparison, inst+33, loaded [template = constants.%.7] +// CHECK:STDOUT: %import_ref.4: %.13 = import_ref Core//prelude/operators/comparison, inst+56, loaded [template = constants.%.14] // CHECK:STDOUT: %import_ref.5: %Equal.type.2 = import_ref Core//prelude/operators/comparison, inst+28, loaded [template = constants.%Equal.2] // CHECK:STDOUT: %import_ref.6: %NotEqual.type.2 = import_ref Core//prelude/operators/comparison, inst+51, loaded [template = constants.%NotEqual.2] // CHECK:STDOUT: %import_ref.7: %Bool.type = import_ref Core//prelude/types/bool, inst+2, loaded [template = constants.%Bool] // CHECK:STDOUT: %import_ref.8 = import_ref Core//prelude/operators/comparison, inst+28, unloaded -// CHECK:STDOUT: %import_ref.9: %ImplicitAs.type = import_ref Core//prelude/operators/as, inst+40, loaded [template = constants.%ImplicitAs] +// CHECK:STDOUT: %import_ref.9: %ImplicitAs.type.1 = import_ref Core//prelude/operators/as, inst+40, loaded [template = constants.%ImplicitAs] // CHECK:STDOUT: %import_ref.10 = import_ref Core//prelude/operators/as, inst+45, unloaded -// CHECK:STDOUT: %import_ref.11: @ImplicitAs.%.2 (%.10) = import_ref Core//prelude/operators/as, inst+63, loaded [symbolic = @ImplicitAs.%.3 (constants.%.15)] +// CHECK:STDOUT: %import_ref.11: @ImplicitAs.%.1 (%.8) = import_ref Core//prelude/operators/as, inst+63, loaded [symbolic = @ImplicitAs.%.2 (constants.%.12)] // CHECK:STDOUT: %import_ref.12 = import_ref Core//prelude/operators/as, inst+56, unloaded // CHECK:STDOUT: %import_ref.13 = import_ref Core//prelude/operators/as, inst+56, unloaded // CHECK:STDOUT: %import_ref.14 = import_ref Core//prelude/operators/as, inst+56, unloaded @@ -534,7 +534,7 @@ fn TestLhsBad(a: D, b: C) -> bool { // CHECK:STDOUT: impl_decl @impl [template] {} { // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %Core.ref: = name_ref Core, imports.%Core [template = imports.%Core] -// CHECK:STDOUT: %Eq.ref: type = name_ref Eq, imports.%import_ref.1 [template = constants.%.3] +// CHECK:STDOUT: %Eq.ref: type = name_ref Eq, imports.%import_ref.1 [template = constants.%Eq.type] // CHECK:STDOUT: } // CHECK:STDOUT: %TestRhsBad.decl: %TestRhsBad.type = fn_decl @TestRhsBad [template = constants.%TestRhsBad] { // CHECK:STDOUT: %a.patt: %C = binding_pattern a @@ -580,12 +580,12 @@ fn TestLhsBad(a: D, b: C) -> bool { // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic = %Dest (constants.%Dest)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.1: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic = %.1 (constants.%.9)] -// CHECK:STDOUT: %Self: %.9 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.3)] +// CHECK:STDOUT: %ImplicitAs.type: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.2)] +// CHECK:STDOUT: %Self: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.3)] // CHECK:STDOUT: %Convert.type: type = fn_type @Convert, @ImplicitAs(%Dest) [symbolic = %Convert.type (constants.%Convert.type.1)] // CHECK:STDOUT: %Convert: @ImplicitAs.%Convert.type (%Convert.type.1) = struct_value () [symbolic = %Convert (constants.%Convert.1)] -// CHECK:STDOUT: %.2: type = assoc_entity_type @ImplicitAs.%.1 (%.9), @ImplicitAs.%Convert.type (%Convert.type.1) [symbolic = %.2 (constants.%.10)] -// CHECK:STDOUT: %.3: @ImplicitAs.%.2 (%.10) = assoc_entity element0, imports.%import_ref.13 [symbolic = %.3 (constants.%.11)] +// CHECK:STDOUT: %.1: type = assoc_entity_type @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2), @ImplicitAs.%Convert.type (%Convert.type.1) [symbolic = %.1 (constants.%.8)] +// CHECK:STDOUT: %.2: @ImplicitAs.%.1 (%.8) = assoc_entity element0, imports.%import_ref.13 [symbolic = %.2 (constants.%.9)] // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: !members: @@ -626,7 +626,7 @@ fn TestLhsBad(a: D, b: C) -> bool { // CHECK:STDOUT: %.loc9_37.2: type = converted %bool.make_type, %.loc9_37.1 [template = bool] // CHECK:STDOUT: %return: ref bool = var // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc7: = interface_witness (%Equal.decl, %NotEqual.decl) [template = constants.%.5] +// CHECK:STDOUT: %.loc7: = interface_witness (%Equal.decl, %NotEqual.decl) [template = constants.%.4] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Equal = %Equal.decl @@ -654,14 +654,14 @@ fn TestLhsBad(a: D, b: C) -> bool { // CHECK:STDOUT: // CHECK:STDOUT: fn @NotEqual.1[%self: %C](%other: %C) -> bool; // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @Equal.2(constants.%Self.1: %.3) { -// CHECK:STDOUT: %Self: %.3 = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self.1)] +// CHECK:STDOUT: generic fn @Equal.2(constants.%Self.1: %Eq.type) { +// CHECK:STDOUT: %Self: %Eq.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self.1)] // CHECK:STDOUT: // CHECK:STDOUT: fn[%self: @Equal.2.%Self (%Self.1)](%other: @Equal.2.%Self (%Self.1)) -> bool; // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @NotEqual.2(constants.%Self.1: %.3) { -// CHECK:STDOUT: %Self: %.3 = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self.1)] +// CHECK:STDOUT: generic fn @NotEqual.2(constants.%Self.1: %Eq.type) { +// CHECK:STDOUT: %Self: %Eq.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self.1)] // CHECK:STDOUT: // CHECK:STDOUT: fn[%self: @NotEqual.2.%Self (%Self.1)](%other: @NotEqual.2.%Self (%Self.1)) -> bool; // CHECK:STDOUT: } @@ -670,23 +670,23 @@ fn TestLhsBad(a: D, b: C) -> bool { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: %C = name_ref a, %a // CHECK:STDOUT: %b.ref: %D = name_ref b, %b -// CHECK:STDOUT: %Equal.ref: %.7 = name_ref Equal, imports.%import_ref.3 [template = constants.%.8] -// CHECK:STDOUT: %.loc23_12.1: %Equal.type.2 = interface_witness_access constants.%.5, element0 [template = constants.%Equal.1] +// CHECK:STDOUT: %Equal.ref: %.6 = name_ref Equal, imports.%import_ref.3 [template = constants.%.7] +// CHECK:STDOUT: %.loc23_12.1: %Equal.type.2 = interface_witness_access constants.%.4, element0 [template = constants.%Equal.1] // CHECK:STDOUT: %.loc23_12.2: = bound_method %a.ref, %.loc23_12.1 -// CHECK:STDOUT: %.loc23_12.3: type = interface_type @ImplicitAs, @ImplicitAs(constants.%C) [template = constants.%.12] -// CHECK:STDOUT: %.loc23_12.4: %.13 = specific_constant imports.%import_ref.11, @ImplicitAs(constants.%C) [template = constants.%.14] -// CHECK:STDOUT: %Convert.ref: %.13 = name_ref Convert, %.loc23_12.4 [template = constants.%.14] -// CHECK:STDOUT: %.loc23_12.5: %C = converted %b.ref, [template = ] +// CHECK:STDOUT: %ImplicitAs.type: type = interface_type @ImplicitAs, @ImplicitAs(constants.%C) [template = constants.%ImplicitAs.type.3] +// CHECK:STDOUT: %.loc23_12.3: %.10 = specific_constant imports.%import_ref.11, @ImplicitAs(constants.%C) [template = constants.%.11] +// CHECK:STDOUT: %Convert.ref: %.10 = name_ref Convert, %.loc23_12.3 [template = constants.%.11] +// CHECK:STDOUT: %.loc23_12.4: %C = converted %b.ref, [template = ] // CHECK:STDOUT: %Equal.call: init bool = call %.loc23_12.2() [template = ] // CHECK:STDOUT: %.loc23_16.1: bool = value_of_initializer %Equal.call [template = ] // CHECK:STDOUT: %.loc23_16.2: bool = converted %Equal.call, %.loc23_16.1 [template = ] // CHECK:STDOUT: return %.loc23_16.2 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @Convert(constants.%Dest: type, constants.%Self.2: @ImplicitAs.%.1 (%.9)) { +// CHECK:STDOUT: generic fn @Convert(constants.%Dest: type, constants.%Self.2: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2)) { // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic = %Dest (constants.%Dest)] -// CHECK:STDOUT: %.1: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic = %.1 (constants.%.9)] -// CHECK:STDOUT: %Self: %.9 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.3)] +// CHECK:STDOUT: %ImplicitAs.type: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.2)] +// CHECK:STDOUT: %Self: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.3)] // CHECK:STDOUT: // CHECK:STDOUT: fn[%self: @Convert.%Self (%Self.3)]() -> @Convert.%Dest (%Dest); // CHECK:STDOUT: } @@ -695,7 +695,7 @@ fn TestLhsBad(a: D, b: C) -> bool { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: %D = name_ref a, %a // CHECK:STDOUT: %b.ref: %C = name_ref b, %b -// CHECK:STDOUT: %NotEqual.ref: %.16 = name_ref NotEqual, imports.%import_ref.4 [template = constants.%.17] +// CHECK:STDOUT: %NotEqual.ref: %.13 = name_ref NotEqual, imports.%import_ref.4 [template = constants.%.14] // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -729,7 +729,7 @@ fn TestLhsBad(a: D, b: C) -> bool { // CHECK:STDOUT: // CHECK:STDOUT: specific @Convert(constants.%Dest, constants.%Self.2) { // CHECK:STDOUT: %Dest => constants.%Dest -// CHECK:STDOUT: %.1 => constants.%.9 +// CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.2 // CHECK:STDOUT: %Self => constants.%Self.2 // CHECK:STDOUT: } // CHECK:STDOUT: @@ -737,11 +737,11 @@ fn TestLhsBad(a: D, b: C) -> bool { // CHECK:STDOUT: %Dest => constants.%C // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.1 => constants.%.12 +// CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.3 // CHECK:STDOUT: %Self => constants.%Self.3 // CHECK:STDOUT: %Convert.type => constants.%Convert.type.2 // CHECK:STDOUT: %Convert => constants.%Convert.2 -// CHECK:STDOUT: %.2 => constants.%.13 -// CHECK:STDOUT: %.3 => constants.%.14 +// CHECK:STDOUT: %.1 => constants.%.10 +// CHECK:STDOUT: %.2 => constants.%.11 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/operators/overloaded/fail_assign_non_ref.carbon b/toolchain/check/testdata/operators/overloaded/fail_assign_non_ref.carbon index 63cff741295b9..ed3c7d1c65955 100644 --- a/toolchain/check/testdata/operators/overloaded/fail_assign_non_ref.carbon +++ b/toolchain/check/testdata/operators/overloaded/fail_assign_non_ref.carbon @@ -46,33 +46,33 @@ fn TestAddAssignNonRef(a: C, b: C) { // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %.1: type = struct_type {} [template] // CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] -// CHECK:STDOUT: %.3: type = interface_type @Inc [template] -// CHECK:STDOUT: %Self.1: %.3 = bind_symbolic_name Self, 0 [symbolic] -// CHECK:STDOUT: %.4: type = ptr_type %C [template] +// CHECK:STDOUT: %Inc.type: type = interface_type @Inc [template] +// CHECK:STDOUT: %Self.1: %Inc.type = bind_symbolic_name Self, 0 [symbolic] +// CHECK:STDOUT: %.3: type = ptr_type %C [template] // CHECK:STDOUT: %Op.type.1: type = fn_type @Op.1 [template] -// CHECK:STDOUT: %.5: type = tuple_type () [template] +// CHECK:STDOUT: %.4: type = tuple_type () [template] // CHECK:STDOUT: %Op.1: %Op.type.1 = struct_value () [template] // CHECK:STDOUT: %Op.type.2: type = fn_type @Op.2 [template] // CHECK:STDOUT: %Op.2: %Op.type.2 = struct_value () [template] -// CHECK:STDOUT: %.6: type = ptr_type %Self.1 [symbolic] -// CHECK:STDOUT: %.7: = interface_witness (%Op.1) [template] -// CHECK:STDOUT: %.8: type = interface_type @AddAssign [template] -// CHECK:STDOUT: %Self.2: %.8 = bind_symbolic_name Self, 0 [symbolic] +// CHECK:STDOUT: %.5: type = ptr_type %Self.1 [symbolic] +// CHECK:STDOUT: %.6: = interface_witness (%Op.1) [template] +// CHECK:STDOUT: %AddAssign.type: type = interface_type @AddAssign [template] +// CHECK:STDOUT: %Self.2: %AddAssign.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %Op.type.3: type = fn_type @Op.3 [template] // CHECK:STDOUT: %Op.3: %Op.type.3 = struct_value () [template] // CHECK:STDOUT: %Op.type.4: type = fn_type @Op.4 [template] // CHECK:STDOUT: %Op.4: %Op.type.4 = struct_value () [template] -// CHECK:STDOUT: %.9: type = ptr_type %Self.2 [symbolic] -// CHECK:STDOUT: %.10: = interface_witness (%Op.3) [template] +// CHECK:STDOUT: %.7: type = ptr_type %Self.2 [symbolic] +// CHECK:STDOUT: %.8: = interface_witness (%Op.3) [template] // CHECK:STDOUT: %TestIncNonRef.type: type = fn_type @TestIncNonRef [template] // CHECK:STDOUT: %TestIncNonRef: %TestIncNonRef.type = struct_value () [template] -// CHECK:STDOUT: %.11: type = ptr_type %.1 [template] -// CHECK:STDOUT: %.12: type = assoc_entity_type %.3, %Op.type.2 [template] -// CHECK:STDOUT: %.13: %.12 = assoc_entity element0, imports.%import_ref.9 [template] +// CHECK:STDOUT: %.9: type = ptr_type %.1 [template] +// CHECK:STDOUT: %.10: type = assoc_entity_type %Inc.type, %Op.type.2 [template] +// CHECK:STDOUT: %.11: %.10 = assoc_entity element0, imports.%import_ref.9 [template] // CHECK:STDOUT: %TestAddAssignNonRef.type: type = fn_type @TestAddAssignNonRef [template] // CHECK:STDOUT: %TestAddAssignNonRef: %TestAddAssignNonRef.type = struct_value () [template] -// CHECK:STDOUT: %.14: type = assoc_entity_type %.8, %Op.type.4 [template] -// CHECK:STDOUT: %.15: %.14 = assoc_entity element0, imports.%import_ref.10 [template] +// CHECK:STDOUT: %.12: type = assoc_entity_type %AddAssign.type, %Op.type.4 [template] +// CHECK:STDOUT: %.13: %.12 = assoc_entity element0, imports.%import_ref.10 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -88,13 +88,13 @@ fn TestAddAssignNonRef(a: C, b: C) { // CHECK:STDOUT: import Core//prelude/operators/comparison // CHECK:STDOUT: import Core//prelude/types/bool // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.1: type = import_ref Core//prelude/operators/arithmetic, inst+56, loaded [template = constants.%.3] +// CHECK:STDOUT: %import_ref.1: type = import_ref Core//prelude/operators/arithmetic, inst+56, loaded [template = constants.%Inc.type] // CHECK:STDOUT: %import_ref.2 = import_ref Core//prelude/operators/arithmetic, inst+58, unloaded -// CHECK:STDOUT: %import_ref.3: %.12 = import_ref Core//prelude/operators/arithmetic, inst+75, loaded [template = constants.%.13] +// CHECK:STDOUT: %import_ref.3: %.10 = import_ref Core//prelude/operators/arithmetic, inst+75, loaded [template = constants.%.11] // CHECK:STDOUT: %import_ref.4: %Op.type.2 = import_ref Core//prelude/operators/arithmetic, inst+69, loaded [template = constants.%Op.2] -// CHECK:STDOUT: %import_ref.5: type = import_ref Core//prelude/operators/arithmetic, inst+29, loaded [template = constants.%.8] +// CHECK:STDOUT: %import_ref.5: type = import_ref Core//prelude/operators/arithmetic, inst+29, loaded [template = constants.%AddAssign.type] // CHECK:STDOUT: %import_ref.6 = import_ref Core//prelude/operators/arithmetic, inst+31, unloaded -// CHECK:STDOUT: %import_ref.7: %.14 = import_ref Core//prelude/operators/arithmetic, inst+54, loaded [template = constants.%.15] +// CHECK:STDOUT: %import_ref.7: %.12 = import_ref Core//prelude/operators/arithmetic, inst+54, loaded [template = constants.%.13] // CHECK:STDOUT: %import_ref.8: %Op.type.4 = import_ref Core//prelude/operators/arithmetic, inst+48, loaded [template = constants.%Op.4] // CHECK:STDOUT: %import_ref.9 = import_ref Core//prelude/operators/arithmetic, inst+69, unloaded // CHECK:STDOUT: %import_ref.10 = import_ref Core//prelude/operators/arithmetic, inst+48, unloaded @@ -112,12 +112,12 @@ fn TestAddAssignNonRef(a: C, b: C) { // CHECK:STDOUT: impl_decl @impl.1 [template] {} { // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %Core.ref: = name_ref Core, imports.%Core [template = imports.%Core] -// CHECK:STDOUT: %Inc.ref: type = name_ref Inc, imports.%import_ref.1 [template = constants.%.3] +// CHECK:STDOUT: %Inc.ref: type = name_ref Inc, imports.%import_ref.1 [template = constants.%Inc.type] // CHECK:STDOUT: } // CHECK:STDOUT: impl_decl @impl.2 [template] {} { // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %Core.ref: = name_ref Core, imports.%Core [template = imports.%Core] -// CHECK:STDOUT: %AddAssign.ref: type = name_ref AddAssign, imports.%import_ref.5 [template = constants.%.8] +// CHECK:STDOUT: %AddAssign.ref: type = name_ref AddAssign, imports.%import_ref.5 [template = constants.%AddAssign.type] // CHECK:STDOUT: } // CHECK:STDOUT: %TestIncNonRef.decl: %TestIncNonRef.type = fn_decl @TestIncNonRef [template = constants.%TestIncNonRef] { // CHECK:STDOUT: %a.patt: %C = binding_pattern a @@ -155,15 +155,15 @@ fn TestAddAssignNonRef(a: C, b: C) { // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.1: %C.ref as %Inc.ref { // CHECK:STDOUT: %Op.decl: %Op.type.1 = fn_decl @Op.1 [template = constants.%Op.1] { -// CHECK:STDOUT: %self.patt: %.4 = binding_pattern self +// CHECK:STDOUT: %self.patt: %.3 = binding_pattern self // CHECK:STDOUT: } { // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %.loc16_21: type = ptr_type %C [template = constants.%.4] -// CHECK:STDOUT: %self.param: %.4 = param self, runtime_param0 -// CHECK:STDOUT: %self: %.4 = bind_name self, %self.param -// CHECK:STDOUT: %.loc16_9: %.4 = addr_pattern %self +// CHECK:STDOUT: %.loc16_21: type = ptr_type %C [template = constants.%.3] +// CHECK:STDOUT: %self.param: %.3 = param self, runtime_param0 +// CHECK:STDOUT: %self: %.3 = bind_name self, %self.param +// CHECK:STDOUT: %.loc16_9: %.3 = addr_pattern %self // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc15: = interface_witness (%Op.decl) [template = constants.%.7] +// CHECK:STDOUT: %.loc15: = interface_witness (%Op.decl) [template = constants.%.6] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Op = %Op.decl @@ -172,19 +172,19 @@ fn TestAddAssignNonRef(a: C, b: C) { // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.2: %C.ref as %AddAssign.ref { // CHECK:STDOUT: %Op.decl: %Op.type.3 = fn_decl @Op.3 [template = constants.%Op.3] { -// CHECK:STDOUT: %self.patt: %.4 = binding_pattern self +// CHECK:STDOUT: %self.patt: %.3 = binding_pattern self // CHECK:STDOUT: %other.patt: %C = binding_pattern other // CHECK:STDOUT: } { // CHECK:STDOUT: %C.ref.loc19_20: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %.loc19_21: type = ptr_type %C [template = constants.%.4] -// CHECK:STDOUT: %self.param: %.4 = param self, runtime_param0 -// CHECK:STDOUT: %self: %.4 = bind_name self, %self.param -// CHECK:STDOUT: %.loc19_9: %.4 = addr_pattern %self +// CHECK:STDOUT: %.loc19_21: type = ptr_type %C [template = constants.%.3] +// CHECK:STDOUT: %self.param: %.3 = param self, runtime_param0 +// CHECK:STDOUT: %self: %.3 = bind_name self, %self.param +// CHECK:STDOUT: %.loc19_9: %.3 = addr_pattern %self // CHECK:STDOUT: %C.ref.loc19_31: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %other.param: %C = param other, runtime_param1 // CHECK:STDOUT: %other: %C = bind_name other, %other.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc18: = interface_witness (%Op.decl) [template = constants.%.10] +// CHECK:STDOUT: %.loc18: = interface_witness (%Op.decl) [template = constants.%.8] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Op = %Op.decl @@ -198,31 +198,31 @@ fn TestAddAssignNonRef(a: C, b: C) { // CHECK:STDOUT: .Self = constants.%C // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Op.1[addr %self: %.4](); +// CHECK:STDOUT: fn @Op.1[addr %self: %.3](); // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @Op.2(constants.%Self.1: %.3) { -// CHECK:STDOUT: %Self: %.3 = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self.1)] -// CHECK:STDOUT: %.2: type = ptr_type @Op.2.%Self (%Self.1) [symbolic = %.2 (constants.%.6)] +// CHECK:STDOUT: generic fn @Op.2(constants.%Self.1: %Inc.type) { +// CHECK:STDOUT: %Self: %Inc.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self.1)] +// CHECK:STDOUT: %.2: type = ptr_type @Op.2.%Self (%Self.1) [symbolic = %.2 (constants.%.5)] // CHECK:STDOUT: -// CHECK:STDOUT: fn[addr %self: @Op.2.%.2 (%.6)](); +// CHECK:STDOUT: fn[addr %self: @Op.2.%.2 (%.5)](); // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Op.3[addr %self: %.4](%other: %C); +// CHECK:STDOUT: fn @Op.3[addr %self: %.3](%other: %C); // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @Op.4(constants.%Self.2: %.8) { -// CHECK:STDOUT: %Self: %.8 = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self.2)] -// CHECK:STDOUT: %.2: type = ptr_type @Op.4.%Self (%Self.2) [symbolic = %.2 (constants.%.9)] +// CHECK:STDOUT: generic fn @Op.4(constants.%Self.2: %AddAssign.type) { +// CHECK:STDOUT: %Self: %AddAssign.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self.2)] +// CHECK:STDOUT: %.2: type = ptr_type @Op.4.%Self (%Self.2) [symbolic = %.2 (constants.%.7)] // CHECK:STDOUT: -// CHECK:STDOUT: fn[addr %self: @Op.4.%.2 (%.9)](%other: @Op.4.%Self (%Self.2)); +// CHECK:STDOUT: fn[addr %self: @Op.4.%.2 (%.7)](%other: @Op.4.%Self (%Self.2)); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @TestIncNonRef(%a: %C) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: %C = name_ref a, %a -// CHECK:STDOUT: %Op.ref: %.12 = name_ref Op, imports.%import_ref.3 [template = constants.%.13] -// CHECK:STDOUT: %.loc30_3.1: %Op.type.2 = interface_witness_access constants.%.7, element0 [template = constants.%Op.1] +// CHECK:STDOUT: %Op.ref: %.10 = name_ref Op, imports.%import_ref.3 [template = constants.%.11] +// CHECK:STDOUT: %.loc30_3.1: %Op.type.2 = interface_witness_access constants.%.6, element0 [template = constants.%Op.1] // CHECK:STDOUT: %.loc30_3.2: = bound_method %a.ref, %.loc30_3.1 -// CHECK:STDOUT: %Op.call: init %.5 = call %.loc30_3.2() [template = ] +// CHECK:STDOUT: %Op.call: init %.4 = call %.loc30_3.2() [template = ] // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -230,30 +230,30 @@ fn TestAddAssignNonRef(a: C, b: C) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: %C = name_ref a, %a // CHECK:STDOUT: %b.ref: %C = name_ref b, %b -// CHECK:STDOUT: %Op.ref: %.14 = name_ref Op, imports.%import_ref.7 [template = constants.%.15] -// CHECK:STDOUT: %.loc40_5.1: %Op.type.4 = interface_witness_access constants.%.10, element0 [template = constants.%Op.3] +// CHECK:STDOUT: %Op.ref: %.12 = name_ref Op, imports.%import_ref.7 [template = constants.%.13] +// CHECK:STDOUT: %.loc40_5.1: %Op.type.4 = interface_witness_access constants.%.8, element0 [template = constants.%Op.3] // CHECK:STDOUT: %.loc40_5.2: = bound_method %a.ref, %.loc40_5.1 -// CHECK:STDOUT: %Op.call: init %.5 = call %.loc40_5.2() [template = ] +// CHECK:STDOUT: %Op.call: init %.4 = call %.loc40_5.2() [template = ] // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Op.2(constants.%Self.1) { // CHECK:STDOUT: %Self => constants.%Self.1 -// CHECK:STDOUT: %.2 => constants.%.6 +// CHECK:STDOUT: %.2 => constants.%.5 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Op.2(constants.%C) { // CHECK:STDOUT: %Self => constants.%C -// CHECK:STDOUT: %.2 => constants.%.4 +// CHECK:STDOUT: %.2 => constants.%.3 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Op.4(constants.%Self.2) { // CHECK:STDOUT: %Self => constants.%Self.2 -// CHECK:STDOUT: %.2 => constants.%.9 +// CHECK:STDOUT: %.2 => constants.%.7 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Op.4(constants.%C) { // CHECK:STDOUT: %Self => constants.%C -// CHECK:STDOUT: %.2 => constants.%.4 +// CHECK:STDOUT: %.2 => constants.%.3 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/operators/overloaded/fail_no_impl.carbon b/toolchain/check/testdata/operators/overloaded/fail_no_impl.carbon index 9b19d71019e7a..e99da989cc2b2 100644 --- a/toolchain/check/testdata/operators/overloaded/fail_no_impl.carbon +++ b/toolchain/check/testdata/operators/overloaded/fail_no_impl.carbon @@ -51,37 +51,37 @@ fn TestRef(b: C) { // CHECK:STDOUT: %.3: type = tuple_type () [template] // CHECK:STDOUT: %TestUnary: %TestUnary.type = struct_value () [template] // CHECK:STDOUT: %.4: type = ptr_type %.1 [template] -// CHECK:STDOUT: %.5: type = interface_type @Negate [template] -// CHECK:STDOUT: %Self.1: %.5 = bind_symbolic_name Self, 0 [symbolic] +// CHECK:STDOUT: %Negate.type: type = interface_type @Negate [template] +// CHECK:STDOUT: %Self.1: %Negate.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %Op.type.1: type = fn_type @Op.1 [template] // CHECK:STDOUT: %Op.1: %Op.type.1 = struct_value () [template] -// CHECK:STDOUT: %.6: type = assoc_entity_type %.5, %Op.type.1 [template] -// CHECK:STDOUT: %.7: %.6 = assoc_entity element0, imports.%import_ref.5 [template] +// CHECK:STDOUT: %.5: type = assoc_entity_type %Negate.type, %Op.type.1 [template] +// CHECK:STDOUT: %.6: %.5 = assoc_entity element0, imports.%import_ref.5 [template] // CHECK:STDOUT: %TestBinary.type: type = fn_type @TestBinary [template] // CHECK:STDOUT: %TestBinary: %TestBinary.type = struct_value () [template] -// CHECK:STDOUT: %.8: type = interface_type @Add [template] -// CHECK:STDOUT: %Self.2: %.8 = bind_symbolic_name Self, 0 [symbolic] +// CHECK:STDOUT: %Add.type: type = interface_type @Add [template] +// CHECK:STDOUT: %Self.2: %Add.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %Op.type.2: type = fn_type @Op.2 [template] // CHECK:STDOUT: %Op.2: %Op.type.2 = struct_value () [template] -// CHECK:STDOUT: %.9: type = assoc_entity_type %.8, %Op.type.2 [template] -// CHECK:STDOUT: %.10: %.9 = assoc_entity element0, imports.%import_ref.10 [template] +// CHECK:STDOUT: %.7: type = assoc_entity_type %Add.type, %Op.type.2 [template] +// CHECK:STDOUT: %.8: %.7 = assoc_entity element0, imports.%import_ref.10 [template] // CHECK:STDOUT: %TestRef.type: type = fn_type @TestRef [template] // CHECK:STDOUT: %TestRef: %TestRef.type = struct_value () [template] // CHECK:STDOUT: %struct: %C = struct_value () [template] -// CHECK:STDOUT: %.11: type = interface_type @AddAssign [template] -// CHECK:STDOUT: %Self.3: %.11 = bind_symbolic_name Self, 0 [symbolic] +// CHECK:STDOUT: %AddAssign.type: type = interface_type @AddAssign [template] +// CHECK:STDOUT: %Self.3: %AddAssign.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %Op.type.3: type = fn_type @Op.3 [template] // CHECK:STDOUT: %Op.3: %Op.type.3 = struct_value () [template] -// CHECK:STDOUT: %.12: type = ptr_type %Self.3 [symbolic] -// CHECK:STDOUT: %.13: type = assoc_entity_type %.11, %Op.type.3 [template] -// CHECK:STDOUT: %.14: %.13 = assoc_entity element0, imports.%import_ref.15 [template] -// CHECK:STDOUT: %.15: type = interface_type @Inc [template] -// CHECK:STDOUT: %Self.4: %.15 = bind_symbolic_name Self, 0 [symbolic] +// CHECK:STDOUT: %.9: type = ptr_type %Self.3 [symbolic] +// CHECK:STDOUT: %.10: type = assoc_entity_type %AddAssign.type, %Op.type.3 [template] +// CHECK:STDOUT: %.11: %.10 = assoc_entity element0, imports.%import_ref.15 [template] +// CHECK:STDOUT: %Inc.type: type = interface_type @Inc [template] +// CHECK:STDOUT: %Self.4: %Inc.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %Op.type.4: type = fn_type @Op.4 [template] // CHECK:STDOUT: %Op.4: %Op.type.4 = struct_value () [template] -// CHECK:STDOUT: %.16: type = ptr_type %Self.4 [symbolic] -// CHECK:STDOUT: %.17: type = assoc_entity_type %.15, %Op.type.4 [template] -// CHECK:STDOUT: %.18: %.17 = assoc_entity element0, imports.%import_ref.20 [template] +// CHECK:STDOUT: %.12: type = ptr_type %Self.4 [symbolic] +// CHECK:STDOUT: %.13: type = assoc_entity_type %Inc.type, %Op.type.4 [template] +// CHECK:STDOUT: %.14: %.13 = assoc_entity element0, imports.%import_ref.20 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -99,24 +99,24 @@ fn TestRef(b: C) { // CHECK:STDOUT: import Core//prelude/operators/comparison // CHECK:STDOUT: import Core//prelude/types/bool // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.1: type = import_ref Core//prelude/operators/arithmetic, inst+77, loaded [template = constants.%.5] +// CHECK:STDOUT: %import_ref.1: type = import_ref Core//prelude/operators/arithmetic, inst+77, loaded [template = constants.%Negate.type] // CHECK:STDOUT: %import_ref.2 = import_ref Core//prelude/operators/arithmetic, inst+79, unloaded -// CHECK:STDOUT: %import_ref.3: %.6 = import_ref Core//prelude/operators/arithmetic, inst+96, loaded [template = constants.%.7] +// CHECK:STDOUT: %import_ref.3: %.5 = import_ref Core//prelude/operators/arithmetic, inst+96, loaded [template = constants.%.6] // CHECK:STDOUT: %import_ref.4 = import_ref Core//prelude/operators/arithmetic, inst+91, unloaded // CHECK:STDOUT: %import_ref.5 = import_ref Core//prelude/operators/arithmetic, inst+91, unloaded -// CHECK:STDOUT: %import_ref.6: type = import_ref Core//prelude/operators/arithmetic, inst+1, loaded [template = constants.%.8] +// CHECK:STDOUT: %import_ref.6: type = import_ref Core//prelude/operators/arithmetic, inst+1, loaded [template = constants.%Add.type] // CHECK:STDOUT: %import_ref.7 = import_ref Core//prelude/operators/arithmetic, inst+3, unloaded -// CHECK:STDOUT: %import_ref.8: %.9 = import_ref Core//prelude/operators/arithmetic, inst+27, loaded [template = constants.%.10] +// CHECK:STDOUT: %import_ref.8: %.7 = import_ref Core//prelude/operators/arithmetic, inst+27, loaded [template = constants.%.8] // CHECK:STDOUT: %import_ref.9 = import_ref Core//prelude/operators/arithmetic, inst+21, unloaded // CHECK:STDOUT: %import_ref.10 = import_ref Core//prelude/operators/arithmetic, inst+21, unloaded -// CHECK:STDOUT: %import_ref.11: type = import_ref Core//prelude/operators/arithmetic, inst+29, loaded [template = constants.%.11] +// CHECK:STDOUT: %import_ref.11: type = import_ref Core//prelude/operators/arithmetic, inst+29, loaded [template = constants.%AddAssign.type] // CHECK:STDOUT: %import_ref.12 = import_ref Core//prelude/operators/arithmetic, inst+31, unloaded -// CHECK:STDOUT: %import_ref.13: %.13 = import_ref Core//prelude/operators/arithmetic, inst+54, loaded [template = constants.%.14] +// CHECK:STDOUT: %import_ref.13: %.10 = import_ref Core//prelude/operators/arithmetic, inst+54, loaded [template = constants.%.11] // CHECK:STDOUT: %import_ref.14 = import_ref Core//prelude/operators/arithmetic, inst+48, unloaded // CHECK:STDOUT: %import_ref.15 = import_ref Core//prelude/operators/arithmetic, inst+48, unloaded -// CHECK:STDOUT: %import_ref.16: type = import_ref Core//prelude/operators/arithmetic, inst+56, loaded [template = constants.%.15] +// CHECK:STDOUT: %import_ref.16: type = import_ref Core//prelude/operators/arithmetic, inst+56, loaded [template = constants.%Inc.type] // CHECK:STDOUT: %import_ref.17 = import_ref Core//prelude/operators/arithmetic, inst+58, unloaded -// CHECK:STDOUT: %import_ref.18: %.17 = import_ref Core//prelude/operators/arithmetic, inst+75, loaded [template = constants.%.18] +// CHECK:STDOUT: %import_ref.18: %.13 = import_ref Core//prelude/operators/arithmetic, inst+75, loaded [template = constants.%.14] // CHECK:STDOUT: %import_ref.19 = import_ref Core//prelude/operators/arithmetic, inst+69, unloaded // CHECK:STDOUT: %import_ref.20 = import_ref Core//prelude/operators/arithmetic, inst+69, unloaded // CHECK:STDOUT: } @@ -200,12 +200,12 @@ fn TestRef(b: C) { // CHECK:STDOUT: fn @TestUnary(%a: %C) -> %return: %C { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: %C = name_ref a, %a -// CHECK:STDOUT: %Op.ref: %.6 = name_ref Op, imports.%import_ref.3 [template = constants.%.7] +// CHECK:STDOUT: %Op.ref: %.5 = name_ref Op, imports.%import_ref.3 [template = constants.%.6] // CHECK:STDOUT: return to %return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @Op.1(constants.%Self.1: %.5) { -// CHECK:STDOUT: %Self: %.5 = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self.1)] +// CHECK:STDOUT: generic fn @Op.1(constants.%Self.1: %Negate.type) { +// CHECK:STDOUT: %Self: %Negate.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self.1)] // CHECK:STDOUT: // CHECK:STDOUT: fn[%self: @Op.1.%Self (%Self.1)]() -> @Op.1.%Self (%Self.1); // CHECK:STDOUT: } @@ -214,12 +214,12 @@ fn TestRef(b: C) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: %C = name_ref a, %a // CHECK:STDOUT: %b.ref: %C = name_ref b, %b -// CHECK:STDOUT: %Op.ref: %.9 = name_ref Op, imports.%import_ref.8 [template = constants.%.10] +// CHECK:STDOUT: %Op.ref: %.7 = name_ref Op, imports.%import_ref.8 [template = constants.%.8] // CHECK:STDOUT: return to %return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @Op.2(constants.%Self.2: %.8) { -// CHECK:STDOUT: %Self: %.8 = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self.2)] +// CHECK:STDOUT: generic fn @Op.2(constants.%Self.2: %Add.type) { +// CHECK:STDOUT: %Self: %Add.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self.2)] // CHECK:STDOUT: // CHECK:STDOUT: fn[%self: @Op.2.%Self (%Self.2)](%other: @Op.2.%Self (%Self.2)) -> @Op.2.%Self (%Self.2); // CHECK:STDOUT: } @@ -235,24 +235,24 @@ fn TestRef(b: C) { // CHECK:STDOUT: assign %a.var, %.loc32_16 // CHECK:STDOUT: %a.ref.loc37: ref %C = name_ref a, %a // CHECK:STDOUT: %b.ref: %C = name_ref b, %b -// CHECK:STDOUT: %Op.ref.loc37: %.13 = name_ref Op, imports.%import_ref.13 [template = constants.%.14] +// CHECK:STDOUT: %Op.ref.loc37: %.10 = name_ref Op, imports.%import_ref.13 [template = constants.%.11] // CHECK:STDOUT: %a.ref.loc41: ref %C = name_ref a, %a -// CHECK:STDOUT: %Op.ref.loc41: %.17 = name_ref Op, imports.%import_ref.18 [template = constants.%.18] +// CHECK:STDOUT: %Op.ref.loc41: %.13 = name_ref Op, imports.%import_ref.18 [template = constants.%.14] // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @Op.3(constants.%Self.3: %.11) { -// CHECK:STDOUT: %Self: %.11 = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self.3)] -// CHECK:STDOUT: %.2: type = ptr_type @Op.3.%Self (%Self.3) [symbolic = %.2 (constants.%.12)] +// CHECK:STDOUT: generic fn @Op.3(constants.%Self.3: %AddAssign.type) { +// CHECK:STDOUT: %Self: %AddAssign.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self.3)] +// CHECK:STDOUT: %.2: type = ptr_type @Op.3.%Self (%Self.3) [symbolic = %.2 (constants.%.9)] // CHECK:STDOUT: -// CHECK:STDOUT: fn[addr %self: @Op.3.%.2 (%.12)](%other: @Op.3.%Self (%Self.3)); +// CHECK:STDOUT: fn[addr %self: @Op.3.%.2 (%.9)](%other: @Op.3.%Self (%Self.3)); // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @Op.4(constants.%Self.4: %.15) { -// CHECK:STDOUT: %Self: %.15 = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self.4)] -// CHECK:STDOUT: %.2: type = ptr_type @Op.4.%Self (%Self.4) [symbolic = %.2 (constants.%.16)] +// CHECK:STDOUT: generic fn @Op.4(constants.%Self.4: %Inc.type) { +// CHECK:STDOUT: %Self: %Inc.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self.4)] +// CHECK:STDOUT: %.2: type = ptr_type @Op.4.%Self (%Self.4) [symbolic = %.2 (constants.%.12)] // CHECK:STDOUT: -// CHECK:STDOUT: fn[addr %self: @Op.4.%.2 (%.16)](); +// CHECK:STDOUT: fn[addr %self: @Op.4.%.2 (%.12)](); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Op.1(constants.%Self.1) { @@ -265,11 +265,11 @@ fn TestRef(b: C) { // CHECK:STDOUT: // CHECK:STDOUT: specific @Op.3(constants.%Self.3) { // CHECK:STDOUT: %Self => constants.%Self.3 -// CHECK:STDOUT: %.2 => constants.%.12 +// CHECK:STDOUT: %.2 => constants.%.9 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Op.4(constants.%Self.4) { // CHECK:STDOUT: %Self => constants.%Self.4 -// CHECK:STDOUT: %.2 => constants.%.16 +// CHECK:STDOUT: %.2 => constants.%.12 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/operators/overloaded/fail_no_impl_for_arg.carbon b/toolchain/check/testdata/operators/overloaded/fail_no_impl_for_arg.carbon index 36b6ccd3232d0..8da4291adfacc 100644 --- a/toolchain/check/testdata/operators/overloaded/fail_no_impl_for_arg.carbon +++ b/toolchain/check/testdata/operators/overloaded/fail_no_impl_for_arg.carbon @@ -55,49 +55,49 @@ fn TestAssign(b: D) { // CHECK:STDOUT: %.1: type = struct_type {} [template] // CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] // CHECK:STDOUT: %D: type = class_type @D [template] -// CHECK:STDOUT: %.3: type = interface_type @Add [template] -// CHECK:STDOUT: %Self.1: %.3 = bind_symbolic_name Self, 0 [symbolic] +// CHECK:STDOUT: %Add.type: type = interface_type @Add [template] +// CHECK:STDOUT: %Self.1: %Add.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %Op.type.1: type = fn_type @Op.1 [template] -// CHECK:STDOUT: %.4: type = tuple_type () [template] +// CHECK:STDOUT: %.3: type = tuple_type () [template] // CHECK:STDOUT: %Op.1: %Op.type.1 = struct_value () [template] // CHECK:STDOUT: %Op.type.2: type = fn_type @Op.2 [template] // CHECK:STDOUT: %Op.2: %Op.type.2 = struct_value () [template] -// CHECK:STDOUT: %.5: = interface_witness (%Op.1) [template] -// CHECK:STDOUT: %.6: type = interface_type @AddAssign [template] -// CHECK:STDOUT: %Self.2: %.6 = bind_symbolic_name Self, 0 [symbolic] -// CHECK:STDOUT: %.7: type = ptr_type %C [template] +// CHECK:STDOUT: %.4: = interface_witness (%Op.1) [template] +// CHECK:STDOUT: %AddAssign.type: type = interface_type @AddAssign [template] +// CHECK:STDOUT: %Self.2: %AddAssign.type = bind_symbolic_name Self, 0 [symbolic] +// CHECK:STDOUT: %.5: type = ptr_type %C [template] // CHECK:STDOUT: %Op.type.3: type = fn_type @Op.3 [template] // CHECK:STDOUT: %Op.3: %Op.type.3 = struct_value () [template] // CHECK:STDOUT: %Op.type.4: type = fn_type @Op.4 [template] // CHECK:STDOUT: %Op.4: %Op.type.4 = struct_value () [template] -// CHECK:STDOUT: %.8: type = ptr_type %Self.2 [symbolic] -// CHECK:STDOUT: %.9: = interface_witness (%Op.3) [template] +// CHECK:STDOUT: %.6: type = ptr_type %Self.2 [symbolic] +// CHECK:STDOUT: %.7: = interface_witness (%Op.3) [template] // CHECK:STDOUT: %Test.type: type = fn_type @Test [template] // CHECK:STDOUT: %Test: %Test.type = struct_value () [template] -// CHECK:STDOUT: %.10: type = ptr_type %.1 [template] -// CHECK:STDOUT: %.11: type = assoc_entity_type %.3, %Op.type.2 [template] -// CHECK:STDOUT: %.12: %.11 = assoc_entity element0, imports.%import_ref.9 [template] -// CHECK:STDOUT: %ImplicitAs.type: type = generic_interface_type @ImplicitAs [template] -// CHECK:STDOUT: %ImplicitAs: %ImplicitAs.type = struct_value () [template] +// CHECK:STDOUT: %.8: type = ptr_type %.1 [template] +// CHECK:STDOUT: %.9: type = assoc_entity_type %Add.type, %Op.type.2 [template] +// CHECK:STDOUT: %.10: %.9 = assoc_entity element0, imports.%import_ref.9 [template] +// CHECK:STDOUT: %ImplicitAs.type.1: type = generic_interface_type @ImplicitAs [template] +// CHECK:STDOUT: %ImplicitAs: %ImplicitAs.type.1 = struct_value () [template] // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic] -// CHECK:STDOUT: %.13: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic] -// CHECK:STDOUT: %Self.3: @ImplicitAs.%.1 (%.13) = bind_symbolic_name Self, 1 [symbolic] -// CHECK:STDOUT: %Self.4: %.13 = bind_symbolic_name Self, 1 [symbolic] +// CHECK:STDOUT: %ImplicitAs.type.2: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic] +// CHECK:STDOUT: %Self.3: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2) = bind_symbolic_name Self, 1 [symbolic] +// CHECK:STDOUT: %Self.4: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: %Convert.type.1: type = fn_type @Convert, @ImplicitAs(%Dest) [symbolic] // CHECK:STDOUT: %Convert.1: %Convert.type.1 = struct_value () [symbolic] -// CHECK:STDOUT: %.14: type = assoc_entity_type %.13, %Convert.type.1 [symbolic] -// CHECK:STDOUT: %.15: %.14 = assoc_entity element0, imports.%import_ref.14 [symbolic] -// CHECK:STDOUT: %.16: type = interface_type @ImplicitAs, @ImplicitAs(%C) [template] +// CHECK:STDOUT: %.11: type = assoc_entity_type %ImplicitAs.type.2, %Convert.type.1 [symbolic] +// CHECK:STDOUT: %.12: %.11 = assoc_entity element0, imports.%import_ref.14 [symbolic] +// CHECK:STDOUT: %ImplicitAs.type.3: type = interface_type @ImplicitAs, @ImplicitAs(%C) [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert, @ImplicitAs(%C) [template] // CHECK:STDOUT: %Convert.2: %Convert.type.2 = struct_value () [template] -// CHECK:STDOUT: %.17: type = assoc_entity_type %.16, %Convert.type.2 [template] -// CHECK:STDOUT: %.18: %.17 = assoc_entity element0, imports.%import_ref.14 [template] -// CHECK:STDOUT: %.19: %.14 = assoc_entity element0, imports.%import_ref.15 [symbolic] +// CHECK:STDOUT: %.13: type = assoc_entity_type %ImplicitAs.type.3, %Convert.type.2 [template] +// CHECK:STDOUT: %.14: %.13 = assoc_entity element0, imports.%import_ref.14 [template] +// CHECK:STDOUT: %.15: %.11 = assoc_entity element0, imports.%import_ref.15 [symbolic] // CHECK:STDOUT: %TestAssign.type: type = fn_type @TestAssign [template] // CHECK:STDOUT: %TestAssign: %TestAssign.type = struct_value () [template] // CHECK:STDOUT: %struct: %C = struct_value () [template] -// CHECK:STDOUT: %.20: type = assoc_entity_type %.6, %Op.type.4 [template] -// CHECK:STDOUT: %.21: %.20 = assoc_entity element0, imports.%import_ref.16 [template] +// CHECK:STDOUT: %.16: type = assoc_entity_type %AddAssign.type, %Op.type.4 [template] +// CHECK:STDOUT: %.17: %.16 = assoc_entity element0, imports.%import_ref.16 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -114,18 +114,18 @@ fn TestAssign(b: D) { // CHECK:STDOUT: import Core//prelude/operators/comparison // CHECK:STDOUT: import Core//prelude/types/bool // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.1: type = import_ref Core//prelude/operators/arithmetic, inst+1, loaded [template = constants.%.3] +// CHECK:STDOUT: %import_ref.1: type = import_ref Core//prelude/operators/arithmetic, inst+1, loaded [template = constants.%Add.type] // CHECK:STDOUT: %import_ref.2 = import_ref Core//prelude/operators/arithmetic, inst+3, unloaded -// CHECK:STDOUT: %import_ref.3: %.11 = import_ref Core//prelude/operators/arithmetic, inst+27, loaded [template = constants.%.12] +// CHECK:STDOUT: %import_ref.3: %.9 = import_ref Core//prelude/operators/arithmetic, inst+27, loaded [template = constants.%.10] // CHECK:STDOUT: %import_ref.4: %Op.type.2 = import_ref Core//prelude/operators/arithmetic, inst+21, loaded [template = constants.%Op.2] -// CHECK:STDOUT: %import_ref.5: type = import_ref Core//prelude/operators/arithmetic, inst+29, loaded [template = constants.%.6] +// CHECK:STDOUT: %import_ref.5: type = import_ref Core//prelude/operators/arithmetic, inst+29, loaded [template = constants.%AddAssign.type] // CHECK:STDOUT: %import_ref.6 = import_ref Core//prelude/operators/arithmetic, inst+31, unloaded -// CHECK:STDOUT: %import_ref.7: %.20 = import_ref Core//prelude/operators/arithmetic, inst+54, loaded [template = constants.%.21] +// CHECK:STDOUT: %import_ref.7: %.16 = import_ref Core//prelude/operators/arithmetic, inst+54, loaded [template = constants.%.17] // CHECK:STDOUT: %import_ref.8: %Op.type.4 = import_ref Core//prelude/operators/arithmetic, inst+48, loaded [template = constants.%Op.4] // CHECK:STDOUT: %import_ref.9 = import_ref Core//prelude/operators/arithmetic, inst+21, unloaded -// CHECK:STDOUT: %import_ref.10: %ImplicitAs.type = import_ref Core//prelude/operators/as, inst+40, loaded [template = constants.%ImplicitAs] +// CHECK:STDOUT: %import_ref.10: %ImplicitAs.type.1 = import_ref Core//prelude/operators/as, inst+40, loaded [template = constants.%ImplicitAs] // CHECK:STDOUT: %import_ref.11 = import_ref Core//prelude/operators/as, inst+45, unloaded -// CHECK:STDOUT: %import_ref.12: @ImplicitAs.%.2 (%.14) = import_ref Core//prelude/operators/as, inst+63, loaded [symbolic = @ImplicitAs.%.3 (constants.%.19)] +// CHECK:STDOUT: %import_ref.12: @ImplicitAs.%.1 (%.11) = import_ref Core//prelude/operators/as, inst+63, loaded [symbolic = @ImplicitAs.%.2 (constants.%.15)] // CHECK:STDOUT: %import_ref.13 = import_ref Core//prelude/operators/as, inst+56, unloaded // CHECK:STDOUT: %import_ref.14 = import_ref Core//prelude/operators/as, inst+56, unloaded // CHECK:STDOUT: %import_ref.15 = import_ref Core//prelude/operators/as, inst+56, unloaded @@ -146,12 +146,12 @@ fn TestAssign(b: D) { // CHECK:STDOUT: impl_decl @impl.1 [template] {} { // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %Core.ref: = name_ref Core, imports.%Core [template = imports.%Core] -// CHECK:STDOUT: %Add.ref: type = name_ref Add, imports.%import_ref.1 [template = constants.%.3] +// CHECK:STDOUT: %Add.ref: type = name_ref Add, imports.%import_ref.1 [template = constants.%Add.type] // CHECK:STDOUT: } // CHECK:STDOUT: impl_decl @impl.2 [template] {} { // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %Core.ref: = name_ref Core, imports.%Core [template = imports.%Core] -// CHECK:STDOUT: %AddAssign.ref: type = name_ref AddAssign, imports.%import_ref.5 [template = constants.%.6] +// CHECK:STDOUT: %AddAssign.ref: type = name_ref AddAssign, imports.%import_ref.5 [template = constants.%AddAssign.type] // CHECK:STDOUT: } // CHECK:STDOUT: %Test.decl: %Test.type = fn_decl @Test [template = constants.%Test] { // CHECK:STDOUT: %a.patt: %C = binding_pattern a @@ -193,12 +193,12 @@ fn TestAssign(b: D) { // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic = %Dest (constants.%Dest)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.1: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic = %.1 (constants.%.13)] -// CHECK:STDOUT: %Self: %.13 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.4)] +// CHECK:STDOUT: %ImplicitAs.type: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.2)] +// CHECK:STDOUT: %Self: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.4)] // CHECK:STDOUT: %Convert.type: type = fn_type @Convert, @ImplicitAs(%Dest) [symbolic = %Convert.type (constants.%Convert.type.1)] // CHECK:STDOUT: %Convert: @ImplicitAs.%Convert.type (%Convert.type.1) = struct_value () [symbolic = %Convert (constants.%Convert.1)] -// CHECK:STDOUT: %.2: type = assoc_entity_type @ImplicitAs.%.1 (%.13), @ImplicitAs.%Convert.type (%Convert.type.1) [symbolic = %.2 (constants.%.14)] -// CHECK:STDOUT: %.3: @ImplicitAs.%.2 (%.14) = assoc_entity element0, imports.%import_ref.14 [symbolic = %.3 (constants.%.15)] +// CHECK:STDOUT: %.1: type = assoc_entity_type @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2), @ImplicitAs.%Convert.type (%Convert.type.1) [symbolic = %.1 (constants.%.11)] +// CHECK:STDOUT: %.2: @ImplicitAs.%.1 (%.11) = assoc_entity element0, imports.%import_ref.14 [symbolic = %.2 (constants.%.12)] // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: !members: @@ -222,7 +222,7 @@ fn TestAssign(b: D) { // CHECK:STDOUT: %C.ref.loc17_31: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %return: ref %C = var // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc16: = interface_witness (%Op.decl) [template = constants.%.5] +// CHECK:STDOUT: %.loc16: = interface_witness (%Op.decl) [template = constants.%.4] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Op = %Op.decl @@ -231,19 +231,19 @@ fn TestAssign(b: D) { // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.2: %C.ref as %AddAssign.ref { // CHECK:STDOUT: %Op.decl: %Op.type.3 = fn_decl @Op.3 [template = constants.%Op.3] { -// CHECK:STDOUT: %self.patt: %.7 = binding_pattern self +// CHECK:STDOUT: %self.patt: %.5 = binding_pattern self // CHECK:STDOUT: %other.patt: %C = binding_pattern other // CHECK:STDOUT: } { // CHECK:STDOUT: %C.ref.loc20_20: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %.loc20_21: type = ptr_type %C [template = constants.%.7] -// CHECK:STDOUT: %self.param: %.7 = param self, runtime_param0 -// CHECK:STDOUT: %self: %.7 = bind_name self, %self.param -// CHECK:STDOUT: %.loc20_9: %.7 = addr_pattern %self +// CHECK:STDOUT: %.loc20_21: type = ptr_type %C [template = constants.%.5] +// CHECK:STDOUT: %self.param: %.5 = param self, runtime_param0 +// CHECK:STDOUT: %self: %.5 = bind_name self, %self.param +// CHECK:STDOUT: %.loc20_9: %.5 = addr_pattern %self // CHECK:STDOUT: %C.ref.loc20_31: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %other.param: %C = param other, runtime_param1 // CHECK:STDOUT: %other: %C = bind_name other, %other.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc19: = interface_witness (%Op.decl) [template = constants.%.9] +// CHECK:STDOUT: %.loc19: = interface_witness (%Op.decl) [template = constants.%.7] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Op = %Op.decl @@ -266,41 +266,41 @@ fn TestAssign(b: D) { // CHECK:STDOUT: // CHECK:STDOUT: fn @Op.1[%self: %C](%other: %C) -> %C; // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @Op.2(constants.%Self.1: %.3) { -// CHECK:STDOUT: %Self: %.3 = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self.1)] +// CHECK:STDOUT: generic fn @Op.2(constants.%Self.1: %Add.type) { +// CHECK:STDOUT: %Self: %Add.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self.1)] // CHECK:STDOUT: // CHECK:STDOUT: fn[%self: @Op.2.%Self (%Self.1)](%other: @Op.2.%Self (%Self.1)) -> @Op.2.%Self (%Self.1); // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Op.3[addr %self: %.7](%other: %C); +// CHECK:STDOUT: fn @Op.3[addr %self: %.5](%other: %C); // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @Op.4(constants.%Self.2: %.6) { -// CHECK:STDOUT: %Self: %.6 = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self.2)] -// CHECK:STDOUT: %.2: type = ptr_type @Op.4.%Self (%Self.2) [symbolic = %.2 (constants.%.8)] +// CHECK:STDOUT: generic fn @Op.4(constants.%Self.2: %AddAssign.type) { +// CHECK:STDOUT: %Self: %AddAssign.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self.2)] +// CHECK:STDOUT: %.2: type = ptr_type @Op.4.%Self (%Self.2) [symbolic = %.2 (constants.%.6)] // CHECK:STDOUT: -// CHECK:STDOUT: fn[addr %self: @Op.4.%.2 (%.8)](%other: @Op.4.%Self (%Self.2)); +// CHECK:STDOUT: fn[addr %self: @Op.4.%.2 (%.6)](%other: @Op.4.%Self (%Self.2)); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Test(%a: %C, %b: %D) -> %return: %C { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: %C = name_ref a, %a // CHECK:STDOUT: %b.ref: %D = name_ref b, %b -// CHECK:STDOUT: %Op.ref: %.11 = name_ref Op, imports.%import_ref.3 [template = constants.%.12] -// CHECK:STDOUT: %.loc34_12.1: %Op.type.2 = interface_witness_access constants.%.5, element0 [template = constants.%Op.1] +// CHECK:STDOUT: %Op.ref: %.9 = name_ref Op, imports.%import_ref.3 [template = constants.%.10] +// CHECK:STDOUT: %.loc34_12.1: %Op.type.2 = interface_witness_access constants.%.4, element0 [template = constants.%Op.1] // CHECK:STDOUT: %.loc34_12.2: = bound_method %a.ref, %.loc34_12.1 // CHECK:STDOUT: %.loc34_12.3: ref %C = temporary_storage -// CHECK:STDOUT: %.loc34_12.4: type = interface_type @ImplicitAs, @ImplicitAs(constants.%C) [template = constants.%.16] -// CHECK:STDOUT: %.loc34_12.5: %.17 = specific_constant imports.%import_ref.12, @ImplicitAs(constants.%C) [template = constants.%.18] -// CHECK:STDOUT: %Convert.ref: %.17 = name_ref Convert, %.loc34_12.5 [template = constants.%.18] -// CHECK:STDOUT: %.loc34_12.6: %C = converted %b.ref, [template = ] +// CHECK:STDOUT: %ImplicitAs.type: type = interface_type @ImplicitAs, @ImplicitAs(constants.%C) [template = constants.%ImplicitAs.type.3] +// CHECK:STDOUT: %.loc34_12.4: %.13 = specific_constant imports.%import_ref.12, @ImplicitAs(constants.%C) [template = constants.%.14] +// CHECK:STDOUT: %Convert.ref: %.13 = name_ref Convert, %.loc34_12.4 [template = constants.%.14] +// CHECK:STDOUT: %.loc34_12.5: %C = converted %b.ref, [template = ] // CHECK:STDOUT: %Op.call: init %C = call %.loc34_12.2() [template = ] // CHECK:STDOUT: return %Op.call to %return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @Convert(constants.%Dest: type, constants.%Self.3: @ImplicitAs.%.1 (%.13)) { +// CHECK:STDOUT: generic fn @Convert(constants.%Dest: type, constants.%Self.3: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2)) { // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic = %Dest (constants.%Dest)] -// CHECK:STDOUT: %.1: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic = %.1 (constants.%.13)] -// CHECK:STDOUT: %Self: %.13 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.4)] +// CHECK:STDOUT: %ImplicitAs.type: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.2)] +// CHECK:STDOUT: %Self: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.4)] // CHECK:STDOUT: // CHECK:STDOUT: fn[%self: @Convert.%Self (%Self.4)]() -> @Convert.%Dest (%Dest); // CHECK:STDOUT: } @@ -316,15 +316,15 @@ fn TestAssign(b: D) { // CHECK:STDOUT: assign %a.var, %.loc38_16 // CHECK:STDOUT: %a.ref: ref %C = name_ref a, %a // CHECK:STDOUT: %b.ref: %D = name_ref b, %b -// CHECK:STDOUT: %Op.ref: %.20 = name_ref Op, imports.%import_ref.7 [template = constants.%.21] -// CHECK:STDOUT: %.loc48_5.1: %Op.type.4 = interface_witness_access constants.%.9, element0 [template = constants.%Op.3] +// CHECK:STDOUT: %Op.ref: %.16 = name_ref Op, imports.%import_ref.7 [template = constants.%.17] +// CHECK:STDOUT: %.loc48_5.1: %Op.type.4 = interface_witness_access constants.%.7, element0 [template = constants.%Op.3] // CHECK:STDOUT: %.loc48_5.2: = bound_method %a.ref, %.loc48_5.1 -// CHECK:STDOUT: %.loc48_3: %.7 = addr_of %a.ref -// CHECK:STDOUT: %.loc48_5.3: type = interface_type @ImplicitAs, @ImplicitAs(constants.%C) [template = constants.%.16] -// CHECK:STDOUT: %.loc48_5.4: %.17 = specific_constant imports.%import_ref.12, @ImplicitAs(constants.%C) [template = constants.%.18] -// CHECK:STDOUT: %Convert.ref: %.17 = name_ref Convert, %.loc48_5.4 [template = constants.%.18] -// CHECK:STDOUT: %.loc48_5.5: %C = converted %b.ref, [template = ] -// CHECK:STDOUT: %Op.call: init %.4 = call %.loc48_5.2() [template = ] +// CHECK:STDOUT: %.loc48_3: %.5 = addr_of %a.ref +// CHECK:STDOUT: %ImplicitAs.type: type = interface_type @ImplicitAs, @ImplicitAs(constants.%C) [template = constants.%ImplicitAs.type.3] +// CHECK:STDOUT: %.loc48_5.3: %.13 = specific_constant imports.%import_ref.12, @ImplicitAs(constants.%C) [template = constants.%.14] +// CHECK:STDOUT: %Convert.ref: %.13 = name_ref Convert, %.loc48_5.3 [template = constants.%.14] +// CHECK:STDOUT: %.loc48_5.4: %C = converted %b.ref, [template = ] +// CHECK:STDOUT: %Op.call: init %.3 = call %.loc48_5.2() [template = ] // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -338,12 +338,12 @@ fn TestAssign(b: D) { // CHECK:STDOUT: // CHECK:STDOUT: specific @Op.4(constants.%Self.2) { // CHECK:STDOUT: %Self => constants.%Self.2 -// CHECK:STDOUT: %.2 => constants.%.8 +// CHECK:STDOUT: %.2 => constants.%.6 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Op.4(constants.%C) { // CHECK:STDOUT: %Self => constants.%C -// CHECK:STDOUT: %.2 => constants.%.7 +// CHECK:STDOUT: %.2 => constants.%.5 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @ImplicitAs(constants.%Dest) { @@ -360,7 +360,7 @@ fn TestAssign(b: D) { // CHECK:STDOUT: // CHECK:STDOUT: specific @Convert(constants.%Dest, constants.%Self.3) { // CHECK:STDOUT: %Dest => constants.%Dest -// CHECK:STDOUT: %.1 => constants.%.13 +// CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.2 // CHECK:STDOUT: %Self => constants.%Self.3 // CHECK:STDOUT: } // CHECK:STDOUT: @@ -368,11 +368,11 @@ fn TestAssign(b: D) { // CHECK:STDOUT: %Dest => constants.%C // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.1 => constants.%.16 +// CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.3 // CHECK:STDOUT: %Self => constants.%Self.4 // CHECK:STDOUT: %Convert.type => constants.%Convert.type.2 // CHECK:STDOUT: %Convert => constants.%Convert.2 -// CHECK:STDOUT: %.2 => constants.%.17 -// CHECK:STDOUT: %.3 => constants.%.18 +// CHECK:STDOUT: %.1 => constants.%.13 +// CHECK:STDOUT: %.2 => constants.%.14 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/operators/overloaded/implicit_as.carbon b/toolchain/check/testdata/operators/overloaded/implicit_as.carbon index 17fba7c8c5577..634b2785aa0f1 100644 --- a/toolchain/check/testdata/operators/overloaded/implicit_as.carbon +++ b/toolchain/check/testdata/operators/overloaded/implicit_as.carbon @@ -41,33 +41,33 @@ fn Test() { // CHECK:STDOUT: %.2: type = unbound_element_type %X, i32 [template] // CHECK:STDOUT: %.3: type = struct_type {.n: i32} [template] // CHECK:STDOUT: %.4: = complete_type_witness %.3 [template] -// CHECK:STDOUT: %ImplicitAs.type: type = generic_interface_type @ImplicitAs [template] -// CHECK:STDOUT: %ImplicitAs: %ImplicitAs.type = struct_value () [template] +// CHECK:STDOUT: %ImplicitAs.type.1: type = generic_interface_type @ImplicitAs [template] +// CHECK:STDOUT: %ImplicitAs: %ImplicitAs.type.1 = struct_value () [template] // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic] -// CHECK:STDOUT: %.5: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic] -// CHECK:STDOUT: %Self.1: @ImplicitAs.%.1 (%.5) = bind_symbolic_name Self, 1 [symbolic] -// CHECK:STDOUT: %Self.2: %.5 = bind_symbolic_name Self, 1 [symbolic] +// CHECK:STDOUT: %ImplicitAs.type.2: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic] +// CHECK:STDOUT: %Self.1: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2) = bind_symbolic_name Self, 1 [symbolic] +// CHECK:STDOUT: %Self.2: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: %Convert.type.1: type = fn_type @Convert.1, @ImplicitAs(%Dest) [symbolic] // CHECK:STDOUT: %Convert.1: %Convert.type.1 = struct_value () [symbolic] -// CHECK:STDOUT: %.6: type = assoc_entity_type %.5, %Convert.type.1 [symbolic] -// CHECK:STDOUT: %.7: %.6 = assoc_entity element0, imports.%import_ref.6 [symbolic] -// CHECK:STDOUT: %.8: type = interface_type @ImplicitAs, @ImplicitAs(%X) [template] +// CHECK:STDOUT: %.5: type = assoc_entity_type %ImplicitAs.type.2, %Convert.type.1 [symbolic] +// CHECK:STDOUT: %.6: %.5 = assoc_entity element0, imports.%import_ref.6 [symbolic] +// CHECK:STDOUT: %ImplicitAs.type.3: type = interface_type @ImplicitAs, @ImplicitAs(%X) [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.2 [template] // CHECK:STDOUT: %Convert.2: %Convert.type.2 = struct_value () [template] // CHECK:STDOUT: %Convert.type.3: type = fn_type @Convert.1, @ImplicitAs(%X) [template] // CHECK:STDOUT: %Convert.3: %Convert.type.3 = struct_value () [template] -// CHECK:STDOUT: %.9: type = assoc_entity_type %.8, %Convert.type.3 [template] -// CHECK:STDOUT: %.10: %.9 = assoc_entity element0, imports.%import_ref.6 [template] -// CHECK:STDOUT: %.11: = interface_witness (%Convert.2) [template] -// CHECK:STDOUT: %.12: type = ptr_type %.3 [template] -// CHECK:STDOUT: %.13: type = interface_type @ImplicitAs, @ImplicitAs(i32) [template] +// CHECK:STDOUT: %.7: type = assoc_entity_type %ImplicitAs.type.3, %Convert.type.3 [template] +// CHECK:STDOUT: %.8: %.7 = assoc_entity element0, imports.%import_ref.6 [template] +// CHECK:STDOUT: %.9: = interface_witness (%Convert.2) [template] +// CHECK:STDOUT: %.10: type = ptr_type %.3 [template] +// CHECK:STDOUT: %ImplicitAs.type.4: type = interface_type @ImplicitAs, @ImplicitAs(i32) [template] // CHECK:STDOUT: %Convert.type.4: type = fn_type @Convert.3 [template] // CHECK:STDOUT: %Convert.4: %Convert.type.4 = struct_value () [template] // CHECK:STDOUT: %Convert.type.5: type = fn_type @Convert.1, @ImplicitAs(i32) [template] // CHECK:STDOUT: %Convert.5: %Convert.type.5 = struct_value () [template] -// CHECK:STDOUT: %.14: type = assoc_entity_type %.13, %Convert.type.5 [template] -// CHECK:STDOUT: %.15: %.14 = assoc_entity element0, imports.%import_ref.6 [template] -// CHECK:STDOUT: %.16: = interface_witness (%Convert.4) [template] +// CHECK:STDOUT: %.11: type = assoc_entity_type %ImplicitAs.type.4, %Convert.type.5 [template] +// CHECK:STDOUT: %.12: %.11 = assoc_entity element0, imports.%import_ref.6 [template] +// CHECK:STDOUT: %.13: = interface_witness (%Convert.4) [template] // CHECK:STDOUT: %Sink_i32.type: type = fn_type @Sink_i32 [template] // CHECK:STDOUT: %Sink_i32: %Sink_i32.type = struct_value () [template] // CHECK:STDOUT: %Sink_X.type: type = fn_type @Sink_X [template] @@ -77,7 +77,7 @@ fn Test() { // CHECK:STDOUT: %Source: %Source.type = struct_value () [template] // CHECK:STDOUT: %Test.type: type = fn_type @Test [template] // CHECK:STDOUT: %Test: %Test.type = struct_value () [template] -// CHECK:STDOUT: %.17: %.6 = assoc_entity element0, imports.%import_ref.7 [symbolic] +// CHECK:STDOUT: %.14: %.5 = assoc_entity element0, imports.%import_ref.7 [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -94,9 +94,9 @@ fn Test() { // CHECK:STDOUT: import Core//prelude/types/bool // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref Core//prelude/types, inst+4, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.2: %ImplicitAs.type = import_ref Core//prelude/operators/as, inst+40, loaded [template = constants.%ImplicitAs] +// CHECK:STDOUT: %import_ref.2: %ImplicitAs.type.1 = import_ref Core//prelude/operators/as, inst+40, loaded [template = constants.%ImplicitAs] // CHECK:STDOUT: %import_ref.3 = import_ref Core//prelude/operators/as, inst+45, unloaded -// CHECK:STDOUT: %import_ref.4: @ImplicitAs.%.2 (%.6) = import_ref Core//prelude/operators/as, inst+63, loaded [symbolic = @ImplicitAs.%.3 (constants.%.17)] +// CHECK:STDOUT: %import_ref.4: @ImplicitAs.%.1 (%.5) = import_ref Core//prelude/operators/as, inst+63, loaded [symbolic = @ImplicitAs.%.2 (constants.%.14)] // CHECK:STDOUT: %import_ref.5: @ImplicitAs.%Convert.type (%Convert.type.1) = import_ref Core//prelude/operators/as, inst+56, loaded [symbolic = @ImplicitAs.%Convert (constants.%Convert.1)] // CHECK:STDOUT: %import_ref.6 = import_ref Core//prelude/operators/as, inst+56, unloaded // CHECK:STDOUT: %import_ref.7 = import_ref Core//prelude/operators/as, inst+56, unloaded @@ -118,18 +118,18 @@ fn Test() { // CHECK:STDOUT: %.loc15_6.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc15_6.2: type = converted %int.make_type_32, %.loc15_6.1 [template = i32] // CHECK:STDOUT: %Core.ref: = name_ref Core, imports.%Core [template = imports.%Core] -// CHECK:STDOUT: %ImplicitAs.ref: %ImplicitAs.type = name_ref ImplicitAs, imports.%import_ref.2 [template = constants.%ImplicitAs] +// CHECK:STDOUT: %ImplicitAs.ref: %ImplicitAs.type.1 = name_ref ImplicitAs, imports.%import_ref.2 [template = constants.%ImplicitAs] // CHECK:STDOUT: %X.ref: type = name_ref X, file.%X.decl [template = constants.%X] -// CHECK:STDOUT: %.loc15_28: type = interface_type @ImplicitAs, @ImplicitAs(constants.%X) [template = constants.%.8] +// CHECK:STDOUT: %ImplicitAs.type: type = interface_type @ImplicitAs, @ImplicitAs(constants.%X) [template = constants.%ImplicitAs.type.3] // CHECK:STDOUT: } // CHECK:STDOUT: impl_decl @impl.2 [template] {} { // CHECK:STDOUT: %X.ref: type = name_ref X, file.%X.decl [template = constants.%X] // CHECK:STDOUT: %Core.ref: = name_ref Core, imports.%Core [template = imports.%Core] -// CHECK:STDOUT: %ImplicitAs.ref: %ImplicitAs.type = name_ref ImplicitAs, imports.%import_ref.2 [template = constants.%ImplicitAs] +// CHECK:STDOUT: %ImplicitAs.ref: %ImplicitAs.type.1 = name_ref ImplicitAs, imports.%import_ref.2 [template = constants.%ImplicitAs] // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc19_26.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc19_26.2: type = converted %int.make_type_32, %.loc19_26.1 [template = i32] -// CHECK:STDOUT: %.loc19_26.3: type = interface_type @ImplicitAs, @ImplicitAs(i32) [template = constants.%.13] +// CHECK:STDOUT: %ImplicitAs.type: type = interface_type @ImplicitAs, @ImplicitAs(i32) [template = constants.%ImplicitAs.type.4] // CHECK:STDOUT: } // CHECK:STDOUT: %Sink_i32.decl: %Sink_i32.type = fn_decl @Sink_i32 [template = constants.%Sink_i32] { // CHECK:STDOUT: %n.patt: i32 = binding_pattern n @@ -162,12 +162,12 @@ fn Test() { // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic = %Dest (constants.%Dest)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.1: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic = %.1 (constants.%.5)] -// CHECK:STDOUT: %Self: %.5 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] +// CHECK:STDOUT: %ImplicitAs.type: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.2)] +// CHECK:STDOUT: %Self: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.1, @ImplicitAs(%Dest) [symbolic = %Convert.type (constants.%Convert.type.1)] // CHECK:STDOUT: %Convert: @ImplicitAs.%Convert.type (%Convert.type.1) = struct_value () [symbolic = %Convert (constants.%Convert.1)] -// CHECK:STDOUT: %.2: type = assoc_entity_type @ImplicitAs.%.1 (%.5), @ImplicitAs.%Convert.type (%Convert.type.1) [symbolic = %.2 (constants.%.6)] -// CHECK:STDOUT: %.3: @ImplicitAs.%.2 (%.6) = assoc_entity element0, imports.%import_ref.6 [symbolic = %.3 (constants.%.7)] +// CHECK:STDOUT: %.1: type = assoc_entity_type @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2), @ImplicitAs.%Convert.type (%Convert.type.1) [symbolic = %.1 (constants.%.5)] +// CHECK:STDOUT: %.2: @ImplicitAs.%.1 (%.5) = assoc_entity element0, imports.%import_ref.6 [symbolic = %.2 (constants.%.6)] // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: !members: @@ -177,7 +177,7 @@ fn Test() { // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: impl @impl.1: %.loc15_6.2 as %.loc15_28 { +// CHECK:STDOUT: impl @impl.1: %.loc15_6.2 as %ImplicitAs.type { // CHECK:STDOUT: %Convert.decl: %Convert.type.2 = fn_decl @Convert.2 [template = constants.%Convert.2] { // CHECK:STDOUT: %self.patt: i32 = binding_pattern self // CHECK:STDOUT: } { @@ -189,14 +189,14 @@ fn Test() { // CHECK:STDOUT: %X.ref: type = name_ref X, file.%X.decl [template = constants.%X] // CHECK:STDOUT: %return: ref %X = var // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc15_32: = interface_witness (%Convert.decl) [template = constants.%.11] +// CHECK:STDOUT: %.loc15_32: = interface_witness (%Convert.decl) [template = constants.%.9] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Convert = %Convert.decl // CHECK:STDOUT: witness = %.loc15_32 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: impl @impl.2: %X.ref as %.loc19_26.3 { +// CHECK:STDOUT: impl @impl.2: %X.ref as %ImplicitAs.type { // CHECK:STDOUT: %Convert.decl: %Convert.type.4 = fn_decl @Convert.3 [template = constants.%Convert.4] { // CHECK:STDOUT: %self.patt: %X = binding_pattern self // CHECK:STDOUT: } { @@ -208,7 +208,7 @@ fn Test() { // CHECK:STDOUT: %.loc20_28.2: type = converted %int.make_type_32, %.loc20_28.1 [template = i32] // CHECK:STDOUT: %return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc19_32: = interface_witness (%Convert.decl) [template = constants.%.16] +// CHECK:STDOUT: %.loc19_32: = interface_witness (%Convert.decl) [template = constants.%.13] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Convert = %Convert.decl @@ -229,10 +229,10 @@ fn Test() { // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32"; // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @Convert.1(constants.%Dest: type, constants.%Self.1: @ImplicitAs.%.1 (%.5)) { +// CHECK:STDOUT: generic fn @Convert.1(constants.%Dest: type, constants.%Self.1: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2)) { // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic = %Dest (constants.%Dest)] -// CHECK:STDOUT: %.1: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic = %.1 (constants.%.5)] -// CHECK:STDOUT: %Self: %.5 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] +// CHECK:STDOUT: %ImplicitAs.type: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.2)] +// CHECK:STDOUT: %Self: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] // CHECK:STDOUT: // CHECK:STDOUT: fn[%self: @Convert.1.%Self (%Self.2)]() -> @Convert.1.%Dest (%Dest); // CHECK:STDOUT: } @@ -274,39 +274,39 @@ fn Test() { // CHECK:STDOUT: %X.ref: type = name_ref X, file.%X.decl [template = constants.%X] // CHECK:STDOUT: %.loc30_18.1: ref %X = temporary_storage // CHECK:STDOUT: %Source.call.loc30: init %X = call %Source.ref.loc30() to %.loc30_18.1 -// CHECK:STDOUT: %.loc30_11.1: type = interface_type @ImplicitAs, @ImplicitAs(i32) [template = constants.%.13] -// CHECK:STDOUT: %.loc30_11.2: %.14 = specific_constant imports.%import_ref.4, @ImplicitAs(i32) [template = constants.%.15] -// CHECK:STDOUT: %Convert.ref.loc30: %.14 = name_ref Convert, %.loc30_11.2 [template = constants.%.15] +// CHECK:STDOUT: %ImplicitAs.type.loc30: type = interface_type @ImplicitAs, @ImplicitAs(i32) [template = constants.%ImplicitAs.type.4] +// CHECK:STDOUT: %.loc30_11.1: %.11 = specific_constant imports.%import_ref.4, @ImplicitAs(i32) [template = constants.%.12] +// CHECK:STDOUT: %Convert.ref.loc30: %.11 = name_ref Convert, %.loc30_11.1 [template = constants.%.12] // CHECK:STDOUT: %.loc30_18.2: ref %X = temporary %.loc30_18.1, %Source.call.loc30 -// CHECK:STDOUT: %.loc30_11.3: %Convert.type.5 = interface_witness_access constants.%.16, element0 [template = constants.%Convert.4] -// CHECK:STDOUT: %.loc30_11.4: = bound_method %.loc30_18.2, %.loc30_11.3 +// CHECK:STDOUT: %.loc30_11.2: %Convert.type.5 = interface_witness_access constants.%.13, element0 [template = constants.%Convert.4] +// CHECK:STDOUT: %.loc30_11.3: = bound_method %.loc30_18.2, %.loc30_11.2 // CHECK:STDOUT: %.loc30_18.3: %X = bind_value %.loc30_18.2 -// CHECK:STDOUT: %Convert.call.loc30: init i32 = call %.loc30_11.4(%.loc30_18.3) -// CHECK:STDOUT: %.loc30_11.5: init i32 = converted %Source.call.loc30, %Convert.call.loc30 -// CHECK:STDOUT: %.loc30_11.6: ref i32 = temporary_storage -// CHECK:STDOUT: %.loc30_11.7: ref i32 = temporary %.loc30_11.6, %.loc30_11.5 -// CHECK:STDOUT: %.loc30_11.8: %X = bind_value %.loc30_11.7 -// CHECK:STDOUT: %Sink_i32.call: init %.1 = call %Sink_i32.ref(%.loc30_11.8) +// CHECK:STDOUT: %Convert.call.loc30: init i32 = call %.loc30_11.3(%.loc30_18.3) +// CHECK:STDOUT: %.loc30_11.4: init i32 = converted %Source.call.loc30, %Convert.call.loc30 +// CHECK:STDOUT: %.loc30_11.5: ref i32 = temporary_storage +// CHECK:STDOUT: %.loc30_11.6: ref i32 = temporary %.loc30_11.5, %.loc30_11.4 +// CHECK:STDOUT: %.loc30_11.7: %X = bind_value %.loc30_11.6 +// CHECK:STDOUT: %Sink_i32.call: init %.1 = call %Sink_i32.ref(%.loc30_11.7) // CHECK:STDOUT: %Sink_X.ref: %Sink_X.type = name_ref Sink_X, file.%Sink_X.decl [template = constants.%Sink_X] // CHECK:STDOUT: %Source.ref.loc31: %Source.type = name_ref Source, file.%Source.decl [template = constants.%Source] // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc31_16.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc31_16.2: type = converted %int.make_type_32, %.loc31_16.1 [template = i32] // CHECK:STDOUT: %Source.call.loc31: init i32 = call %Source.ref.loc31() -// CHECK:STDOUT: %.loc31_9.1: type = interface_type @ImplicitAs, @ImplicitAs(constants.%X) [template = constants.%.8] -// CHECK:STDOUT: %.loc31_9.2: %.9 = specific_constant imports.%import_ref.4, @ImplicitAs(constants.%X) [template = constants.%.10] -// CHECK:STDOUT: %Convert.ref.loc31: %.9 = name_ref Convert, %.loc31_9.2 [template = constants.%.10] +// CHECK:STDOUT: %ImplicitAs.type.loc31: type = interface_type @ImplicitAs, @ImplicitAs(constants.%X) [template = constants.%ImplicitAs.type.3] +// CHECK:STDOUT: %.loc31_9.1: %.7 = specific_constant imports.%import_ref.4, @ImplicitAs(constants.%X) [template = constants.%.8] +// CHECK:STDOUT: %Convert.ref.loc31: %.7 = name_ref Convert, %.loc31_9.1 [template = constants.%.8] // CHECK:STDOUT: %.loc31_16.3: ref i32 = temporary_storage // CHECK:STDOUT: %.loc31_16.4: ref i32 = temporary %.loc31_16.3, %Source.call.loc31 -// CHECK:STDOUT: %.loc31_9.3: %Convert.type.3 = interface_witness_access constants.%.11, element0 [template = constants.%Convert.2] -// CHECK:STDOUT: %.loc31_9.4: = bound_method %.loc31_16.4, %.loc31_9.3 -// CHECK:STDOUT: %.loc31_9.5: ref %X = temporary_storage +// CHECK:STDOUT: %.loc31_9.2: %Convert.type.3 = interface_witness_access constants.%.9, element0 [template = constants.%Convert.2] +// CHECK:STDOUT: %.loc31_9.3: = bound_method %.loc31_16.4, %.loc31_9.2 +// CHECK:STDOUT: %.loc31_9.4: ref %X = temporary_storage // CHECK:STDOUT: %.loc31_16.5: i32 = bind_value %.loc31_16.4 -// CHECK:STDOUT: %Convert.call.loc31: init %X = call %.loc31_9.4(%.loc31_16.5) to %.loc31_9.5 -// CHECK:STDOUT: %.loc31_9.6: init %X = converted %Source.call.loc31, %Convert.call.loc31 -// CHECK:STDOUT: %.loc31_9.7: ref %X = temporary %.loc31_9.5, %.loc31_9.6 -// CHECK:STDOUT: %.loc31_9.8: i32 = bind_value %.loc31_9.7 -// CHECK:STDOUT: %Sink_X.call: init %.1 = call %Sink_X.ref(%.loc31_9.8) +// CHECK:STDOUT: %Convert.call.loc31: init %X = call %.loc31_9.3(%.loc31_16.5) to %.loc31_9.4 +// CHECK:STDOUT: %.loc31_9.5: init %X = converted %Source.call.loc31, %Convert.call.loc31 +// CHECK:STDOUT: %.loc31_9.6: ref %X = temporary %.loc31_9.4, %.loc31_9.5 +// CHECK:STDOUT: %.loc31_9.7: i32 = bind_value %.loc31_9.6 +// CHECK:STDOUT: %Sink_X.call: init %.1 = call %Sink_X.ref(%.loc31_9.7) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -324,7 +324,7 @@ fn Test() { // CHECK:STDOUT: // CHECK:STDOUT: specific @Convert.1(constants.%Dest, constants.%Self.1) { // CHECK:STDOUT: %Dest => constants.%Dest -// CHECK:STDOUT: %.1 => constants.%.5 +// CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.2 // CHECK:STDOUT: %Self => constants.%Self.1 // CHECK:STDOUT: } // CHECK:STDOUT: @@ -332,17 +332,17 @@ fn Test() { // CHECK:STDOUT: %Dest => constants.%X // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.1 => constants.%.8 +// CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.3 // CHECK:STDOUT: %Self => constants.%Self.2 // CHECK:STDOUT: %Convert.type => constants.%Convert.type.3 // CHECK:STDOUT: %Convert => constants.%Convert.3 -// CHECK:STDOUT: %.2 => constants.%.9 -// CHECK:STDOUT: %.3 => constants.%.10 +// CHECK:STDOUT: %.1 => constants.%.7 +// CHECK:STDOUT: %.2 => constants.%.8 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Convert.1(constants.%X, i32) { // CHECK:STDOUT: %Dest => constants.%X -// CHECK:STDOUT: %.1 => constants.%.8 +// CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.3 // CHECK:STDOUT: %Self => i32 // CHECK:STDOUT: } // CHECK:STDOUT: @@ -350,17 +350,17 @@ fn Test() { // CHECK:STDOUT: %Dest => i32 // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.1 => constants.%.13 +// CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.4 // CHECK:STDOUT: %Self => constants.%Self.2 // CHECK:STDOUT: %Convert.type => constants.%Convert.type.5 // CHECK:STDOUT: %Convert => constants.%Convert.5 -// CHECK:STDOUT: %.2 => constants.%.14 -// CHECK:STDOUT: %.3 => constants.%.15 +// CHECK:STDOUT: %.1 => constants.%.11 +// CHECK:STDOUT: %.2 => constants.%.12 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Convert.1(i32, constants.%X) { // CHECK:STDOUT: %Dest => i32 -// CHECK:STDOUT: %.1 => constants.%.13 +// CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.4 // CHECK:STDOUT: %Self => constants.%X // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/operators/overloaded/inc.carbon b/toolchain/check/testdata/operators/overloaded/inc.carbon index 3f80140e003dd..280d41d31443e 100644 --- a/toolchain/check/testdata/operators/overloaded/inc.carbon +++ b/toolchain/check/testdata/operators/overloaded/inc.carbon @@ -29,22 +29,22 @@ fn TestOp() { // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %.1: type = struct_type {} [template] // CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] -// CHECK:STDOUT: %.3: type = interface_type @Inc [template] -// CHECK:STDOUT: %Self: %.3 = bind_symbolic_name Self, 0 [symbolic] -// CHECK:STDOUT: %.4: type = ptr_type %C [template] +// CHECK:STDOUT: %Inc.type: type = interface_type @Inc [template] +// CHECK:STDOUT: %Self: %Inc.type = bind_symbolic_name Self, 0 [symbolic] +// CHECK:STDOUT: %.3: type = ptr_type %C [template] // CHECK:STDOUT: %Op.type.1: type = fn_type @Op.1 [template] -// CHECK:STDOUT: %.5: type = tuple_type () [template] +// CHECK:STDOUT: %.4: type = tuple_type () [template] // CHECK:STDOUT: %Op.1: %Op.type.1 = struct_value () [template] // CHECK:STDOUT: %Op.type.2: type = fn_type @Op.2 [template] // CHECK:STDOUT: %Op.2: %Op.type.2 = struct_value () [template] -// CHECK:STDOUT: %.6: type = ptr_type %Self [symbolic] -// CHECK:STDOUT: %.7: = interface_witness (%Op.1) [template] +// CHECK:STDOUT: %.5: type = ptr_type %Self [symbolic] +// CHECK:STDOUT: %.6: = interface_witness (%Op.1) [template] // CHECK:STDOUT: %TestOp.type: type = fn_type @TestOp [template] // CHECK:STDOUT: %TestOp: %TestOp.type = struct_value () [template] -// CHECK:STDOUT: %.8: type = ptr_type %.1 [template] +// CHECK:STDOUT: %.7: type = ptr_type %.1 [template] // CHECK:STDOUT: %struct: %C = struct_value () [template] -// CHECK:STDOUT: %.9: type = assoc_entity_type %.3, %Op.type.2 [template] -// CHECK:STDOUT: %.10: %.9 = assoc_entity element0, imports.%import_ref.5 [template] +// CHECK:STDOUT: %.8: type = assoc_entity_type %Inc.type, %Op.type.2 [template] +// CHECK:STDOUT: %.9: %.8 = assoc_entity element0, imports.%import_ref.5 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -59,9 +59,9 @@ fn TestOp() { // CHECK:STDOUT: import Core//prelude/operators/comparison // CHECK:STDOUT: import Core//prelude/types/bool // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.1: type = import_ref Core//prelude/operators/arithmetic, inst+56, loaded [template = constants.%.3] +// CHECK:STDOUT: %import_ref.1: type = import_ref Core//prelude/operators/arithmetic, inst+56, loaded [template = constants.%Inc.type] // CHECK:STDOUT: %import_ref.2 = import_ref Core//prelude/operators/arithmetic, inst+58, unloaded -// CHECK:STDOUT: %import_ref.3: %.9 = import_ref Core//prelude/operators/arithmetic, inst+75, loaded [template = constants.%.10] +// CHECK:STDOUT: %import_ref.3: %.8 = import_ref Core//prelude/operators/arithmetic, inst+75, loaded [template = constants.%.9] // CHECK:STDOUT: %import_ref.4: %Op.type.2 = import_ref Core//prelude/operators/arithmetic, inst+69, loaded [template = constants.%Op.2] // CHECK:STDOUT: %import_ref.5 = import_ref Core//prelude/operators/arithmetic, inst+69, unloaded // CHECK:STDOUT: } @@ -77,7 +77,7 @@ fn TestOp() { // CHECK:STDOUT: impl_decl @impl [template] {} { // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %Core.ref: = name_ref Core, imports.%Core [template = imports.%Core] -// CHECK:STDOUT: %Inc.ref: type = name_ref Inc, imports.%import_ref.1 [template = constants.%.3] +// CHECK:STDOUT: %Inc.ref: type = name_ref Inc, imports.%import_ref.1 [template = constants.%Inc.type] // CHECK:STDOUT: } // CHECK:STDOUT: %TestOp.decl: %TestOp.type = fn_decl @TestOp [template = constants.%TestOp] {} {} // CHECK:STDOUT: } @@ -91,15 +91,15 @@ fn TestOp() { // CHECK:STDOUT: // CHECK:STDOUT: impl @impl: %C.ref as %Inc.ref { // CHECK:STDOUT: %Op.decl: %Op.type.1 = fn_decl @Op.1 [template = constants.%Op.1] { -// CHECK:STDOUT: %self.patt: %.4 = binding_pattern self +// CHECK:STDOUT: %self.patt: %.3 = binding_pattern self // CHECK:STDOUT: } { // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %.loc18_21: type = ptr_type %C [template = constants.%.4] -// CHECK:STDOUT: %self.param: %.4 = param self, runtime_param0 -// CHECK:STDOUT: %self: %.4 = bind_name self, %self.param -// CHECK:STDOUT: %.loc18_9: %.4 = addr_pattern %self +// CHECK:STDOUT: %.loc18_21: type = ptr_type %C [template = constants.%.3] +// CHECK:STDOUT: %self.param: %.3 = param self, runtime_param0 +// CHECK:STDOUT: %self: %.3 = bind_name self, %self.param +// CHECK:STDOUT: %.loc18_9: %.3 = addr_pattern %self // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc17: = interface_witness (%Op.decl) [template = constants.%.7] +// CHECK:STDOUT: %.loc17: = interface_witness (%Op.decl) [template = constants.%.6] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Op = %Op.decl @@ -113,13 +113,13 @@ fn TestOp() { // CHECK:STDOUT: .Self = constants.%C // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Op.1[addr %self: %.4](); +// CHECK:STDOUT: fn @Op.1[addr %self: %.3](); // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @Op.2(constants.%Self: %.3) { -// CHECK:STDOUT: %Self: %.3 = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self)] -// CHECK:STDOUT: %.2: type = ptr_type @Op.2.%Self (%Self) [symbolic = %.2 (constants.%.6)] +// CHECK:STDOUT: generic fn @Op.2(constants.%Self: %Inc.type) { +// CHECK:STDOUT: %Self: %Inc.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self)] +// CHECK:STDOUT: %.2: type = ptr_type @Op.2.%Self (%Self) [symbolic = %.2 (constants.%.5)] // CHECK:STDOUT: -// CHECK:STDOUT: fn[addr %self: @Op.2.%.2 (%.6)](); +// CHECK:STDOUT: fn[addr %self: @Op.2.%.2 (%.5)](); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @TestOp() { @@ -132,21 +132,21 @@ fn TestOp() { // CHECK:STDOUT: %.loc22_16: init %C = converted %.loc22_15.1, %.loc22_15.2 [template = constants.%struct] // CHECK:STDOUT: assign %c.var, %.loc22_16 // CHECK:STDOUT: %c.ref: ref %C = name_ref c, %c -// CHECK:STDOUT: %Op.ref: %.9 = name_ref Op, imports.%import_ref.3 [template = constants.%.10] -// CHECK:STDOUT: %.loc23_3.1: %Op.type.2 = interface_witness_access constants.%.7, element0 [template = constants.%Op.1] +// CHECK:STDOUT: %Op.ref: %.8 = name_ref Op, imports.%import_ref.3 [template = constants.%.9] +// CHECK:STDOUT: %.loc23_3.1: %Op.type.2 = interface_witness_access constants.%.6, element0 [template = constants.%Op.1] // CHECK:STDOUT: %.loc23_3.2: = bound_method %c.ref, %.loc23_3.1 -// CHECK:STDOUT: %.loc23_5: %.4 = addr_of %c.ref -// CHECK:STDOUT: %Op.call: init %.5 = call %.loc23_3.2(%.loc23_5) +// CHECK:STDOUT: %.loc23_5: %.3 = addr_of %c.ref +// CHECK:STDOUT: %Op.call: init %.4 = call %.loc23_3.2(%.loc23_5) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Op.2(constants.%Self) { // CHECK:STDOUT: %Self => constants.%Self -// CHECK:STDOUT: %.2 => constants.%.6 +// CHECK:STDOUT: %.2 => constants.%.5 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Op.2(constants.%C) { // CHECK:STDOUT: %Self => constants.%C -// CHECK:STDOUT: %.2 => constants.%.4 +// CHECK:STDOUT: %.2 => constants.%.3 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/operators/overloaded/left_shift.carbon b/toolchain/check/testdata/operators/overloaded/left_shift.carbon index e6cb8c0c509a6..2d9fb529ad06a 100644 --- a/toolchain/check/testdata/operators/overloaded/left_shift.carbon +++ b/toolchain/check/testdata/operators/overloaded/left_shift.carbon @@ -37,33 +37,33 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %.1: type = struct_type {} [template] // CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] -// CHECK:STDOUT: %.3: type = interface_type @LeftShift [template] -// CHECK:STDOUT: %Self.1: %.3 = bind_symbolic_name Self, 0 [symbolic] +// CHECK:STDOUT: %LeftShift.type: type = interface_type @LeftShift [template] +// CHECK:STDOUT: %Self.1: %LeftShift.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %Op.type.1: type = fn_type @Op.1 [template] -// CHECK:STDOUT: %.4: type = tuple_type () [template] +// CHECK:STDOUT: %.3: type = tuple_type () [template] // CHECK:STDOUT: %Op.1: %Op.type.1 = struct_value () [template] // CHECK:STDOUT: %Op.type.2: type = fn_type @Op.2 [template] // CHECK:STDOUT: %Op.2: %Op.type.2 = struct_value () [template] -// CHECK:STDOUT: %.5: = interface_witness (%Op.1) [template] -// CHECK:STDOUT: %.6: type = ptr_type %.1 [template] +// CHECK:STDOUT: %.4: = interface_witness (%Op.1) [template] +// CHECK:STDOUT: %.5: type = ptr_type %.1 [template] // CHECK:STDOUT: %struct: %C = struct_value () [template] -// CHECK:STDOUT: %.7: type = interface_type @LeftShiftAssign [template] -// CHECK:STDOUT: %Self.2: %.7 = bind_symbolic_name Self, 0 [symbolic] -// CHECK:STDOUT: %.8: type = ptr_type %C [template] +// CHECK:STDOUT: %LeftShiftAssign.type: type = interface_type @LeftShiftAssign [template] +// CHECK:STDOUT: %Self.2: %LeftShiftAssign.type = bind_symbolic_name Self, 0 [symbolic] +// CHECK:STDOUT: %.6: type = ptr_type %C [template] // CHECK:STDOUT: %Op.type.3: type = fn_type @Op.3 [template] // CHECK:STDOUT: %Op.3: %Op.type.3 = struct_value () [template] // CHECK:STDOUT: %Op.type.4: type = fn_type @Op.4 [template] // CHECK:STDOUT: %Op.4: %Op.type.4 = struct_value () [template] -// CHECK:STDOUT: %.9: type = ptr_type %Self.2 [symbolic] -// CHECK:STDOUT: %.10: = interface_witness (%Op.3) [template] +// CHECK:STDOUT: %.7: type = ptr_type %Self.2 [symbolic] +// CHECK:STDOUT: %.8: = interface_witness (%Op.3) [template] // CHECK:STDOUT: %TestOp.type: type = fn_type @TestOp [template] // CHECK:STDOUT: %TestOp: %TestOp.type = struct_value () [template] -// CHECK:STDOUT: %.11: type = assoc_entity_type %.3, %Op.type.2 [template] -// CHECK:STDOUT: %.12: %.11 = assoc_entity element0, imports.%import_ref.9 [template] +// CHECK:STDOUT: %.9: type = assoc_entity_type %LeftShift.type, %Op.type.2 [template] +// CHECK:STDOUT: %.10: %.9 = assoc_entity element0, imports.%import_ref.9 [template] // CHECK:STDOUT: %TestAssign.type: type = fn_type @TestAssign [template] // CHECK:STDOUT: %TestAssign: %TestAssign.type = struct_value () [template] -// CHECK:STDOUT: %.13: type = assoc_entity_type %.7, %Op.type.4 [template] -// CHECK:STDOUT: %.14: %.13 = assoc_entity element0, imports.%import_ref.10 [template] +// CHECK:STDOUT: %.11: type = assoc_entity_type %LeftShiftAssign.type, %Op.type.4 [template] +// CHECK:STDOUT: %.12: %.11 = assoc_entity element0, imports.%import_ref.10 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -79,13 +79,13 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: import Core//prelude/operators/comparison // CHECK:STDOUT: import Core//prelude/types/bool // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.1: type = import_ref Core//prelude/operators/bitwise, inst+185, loaded [template = constants.%.3] +// CHECK:STDOUT: %import_ref.1: type = import_ref Core//prelude/operators/bitwise, inst+185, loaded [template = constants.%LeftShift.type] // CHECK:STDOUT: %import_ref.2 = import_ref Core//prelude/operators/bitwise, inst+187, unloaded -// CHECK:STDOUT: %import_ref.3: %.11 = import_ref Core//prelude/operators/bitwise, inst+210, loaded [template = constants.%.12] +// CHECK:STDOUT: %import_ref.3: %.9 = import_ref Core//prelude/operators/bitwise, inst+210, loaded [template = constants.%.10] // CHECK:STDOUT: %import_ref.4: %Op.type.2 = import_ref Core//prelude/operators/bitwise, inst+205, loaded [template = constants.%Op.2] -// CHECK:STDOUT: %import_ref.5: type = import_ref Core//prelude/operators/bitwise, inst+212, loaded [template = constants.%.7] +// CHECK:STDOUT: %import_ref.5: type = import_ref Core//prelude/operators/bitwise, inst+212, loaded [template = constants.%LeftShiftAssign.type] // CHECK:STDOUT: %import_ref.6 = import_ref Core//prelude/operators/bitwise, inst+214, unloaded -// CHECK:STDOUT: %import_ref.7: %.13 = import_ref Core//prelude/operators/bitwise, inst+237, loaded [template = constants.%.14] +// CHECK:STDOUT: %import_ref.7: %.11 = import_ref Core//prelude/operators/bitwise, inst+237, loaded [template = constants.%.12] // CHECK:STDOUT: %import_ref.8: %Op.type.4 = import_ref Core//prelude/operators/bitwise, inst+231, loaded [template = constants.%Op.4] // CHECK:STDOUT: %import_ref.9 = import_ref Core//prelude/operators/bitwise, inst+205, unloaded // CHECK:STDOUT: %import_ref.10 = import_ref Core//prelude/operators/bitwise, inst+231, unloaded @@ -103,12 +103,12 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: impl_decl @impl.1 [template] {} { // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %Core.ref: = name_ref Core, imports.%Core [template = imports.%Core] -// CHECK:STDOUT: %LeftShift.ref: type = name_ref LeftShift, imports.%import_ref.1 [template = constants.%.3] +// CHECK:STDOUT: %LeftShift.ref: type = name_ref LeftShift, imports.%import_ref.1 [template = constants.%LeftShift.type] // CHECK:STDOUT: } // CHECK:STDOUT: impl_decl @impl.2 [template] {} { // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %Core.ref: = name_ref Core, imports.%Core [template = imports.%Core] -// CHECK:STDOUT: %LeftShiftAssign.ref: type = name_ref LeftShiftAssign, imports.%import_ref.5 [template = constants.%.7] +// CHECK:STDOUT: %LeftShiftAssign.ref: type = name_ref LeftShiftAssign, imports.%import_ref.5 [template = constants.%LeftShiftAssign.type] // CHECK:STDOUT: } // CHECK:STDOUT: %TestOp.decl: %TestOp.type = fn_decl @TestOp [template = constants.%TestOp] { // CHECK:STDOUT: %a.patt: %C = binding_pattern a @@ -124,13 +124,13 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %return: ref %C = var // CHECK:STDOUT: } // CHECK:STDOUT: %TestAssign.decl: %TestAssign.type = fn_decl @TestAssign [template = constants.%TestAssign] { -// CHECK:STDOUT: %a.patt: %.8 = binding_pattern a +// CHECK:STDOUT: %a.patt: %.6 = binding_pattern a // CHECK:STDOUT: %b.patt: %C = binding_pattern b // CHECK:STDOUT: } { // CHECK:STDOUT: %C.ref.loc30_18: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %.loc30: type = ptr_type %C [template = constants.%.8] -// CHECK:STDOUT: %a.param: %.8 = param a, runtime_param0 -// CHECK:STDOUT: %a: %.8 = bind_name a, %a.param +// CHECK:STDOUT: %.loc30: type = ptr_type %C [template = constants.%.6] +// CHECK:STDOUT: %a.param: %.6 = param a, runtime_param0 +// CHECK:STDOUT: %a: %.6 = bind_name a, %a.param // CHECK:STDOUT: %C.ref.loc30_25: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %b.param: %C = param b, runtime_param1 // CHECK:STDOUT: %b: %C = bind_name b, %b.param @@ -165,7 +165,7 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %C.ref.loc18_31: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %return: ref %C = var // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc17: = interface_witness (%Op.decl) [template = constants.%.5] +// CHECK:STDOUT: %.loc17: = interface_witness (%Op.decl) [template = constants.%.4] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Op = %Op.decl @@ -174,19 +174,19 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.2: %C.ref as %LeftShiftAssign.ref { // CHECK:STDOUT: %Op.decl: %Op.type.3 = fn_decl @Op.3 [template = constants.%Op.3] { -// CHECK:STDOUT: %self.patt: %.8 = binding_pattern self +// CHECK:STDOUT: %self.patt: %.6 = binding_pattern self // CHECK:STDOUT: %other.patt: %C = binding_pattern other // CHECK:STDOUT: } { // CHECK:STDOUT: %C.ref.loc23_20: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %.loc23_21: type = ptr_type %C [template = constants.%.8] -// CHECK:STDOUT: %self.param: %.8 = param self, runtime_param0 -// CHECK:STDOUT: %self: %.8 = bind_name self, %self.param -// CHECK:STDOUT: %.loc23_9: %.8 = addr_pattern %self +// CHECK:STDOUT: %.loc23_21: type = ptr_type %C [template = constants.%.6] +// CHECK:STDOUT: %self.param: %.6 = param self, runtime_param0 +// CHECK:STDOUT: %self: %.6 = bind_name self, %self.param +// CHECK:STDOUT: %.loc23_9: %.6 = addr_pattern %self // CHECK:STDOUT: %C.ref.loc23_31: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %other.param: %C = param other, runtime_param1 // CHECK:STDOUT: %other: %C = bind_name other, %other.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc22: = interface_witness (%Op.decl) [template = constants.%.10] +// CHECK:STDOUT: %.loc22: = interface_witness (%Op.decl) [template = constants.%.8] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Op = %Op.decl @@ -208,46 +208,46 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: return %.loc19_14 to %return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @Op.2(constants.%Self.1: %.3) { -// CHECK:STDOUT: %Self: %.3 = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self.1)] +// CHECK:STDOUT: generic fn @Op.2(constants.%Self.1: %LeftShift.type) { +// CHECK:STDOUT: %Self: %LeftShift.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self.1)] // CHECK:STDOUT: // CHECK:STDOUT: fn[%self: @Op.2.%Self (%Self.1)](%other: @Op.2.%Self (%Self.1)) -> @Op.2.%Self (%Self.1); // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Op.3[addr %self: %.8](%other: %C) { +// CHECK:STDOUT: fn @Op.3[addr %self: %.6](%other: %C) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @Op.4(constants.%Self.2: %.7) { -// CHECK:STDOUT: %Self: %.7 = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self.2)] -// CHECK:STDOUT: %.2: type = ptr_type @Op.4.%Self (%Self.2) [symbolic = %.2 (constants.%.9)] +// CHECK:STDOUT: generic fn @Op.4(constants.%Self.2: %LeftShiftAssign.type) { +// CHECK:STDOUT: %Self: %LeftShiftAssign.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self.2)] +// CHECK:STDOUT: %.2: type = ptr_type @Op.4.%Self (%Self.2) [symbolic = %.2 (constants.%.7)] // CHECK:STDOUT: -// CHECK:STDOUT: fn[addr %self: @Op.4.%.2 (%.9)](%other: @Op.4.%Self (%Self.2)); +// CHECK:STDOUT: fn[addr %self: @Op.4.%.2 (%.7)](%other: @Op.4.%Self (%Self.2)); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @TestOp(%a: %C, %b: %C) -> %return: %C { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: %C = name_ref a, %a // CHECK:STDOUT: %b.ref: %C = name_ref b, %b -// CHECK:STDOUT: %Op.ref: %.11 = name_ref Op, imports.%import_ref.3 [template = constants.%.12] -// CHECK:STDOUT: %.loc27_12.1: %Op.type.2 = interface_witness_access constants.%.5, element0 [template = constants.%Op.1] +// CHECK:STDOUT: %Op.ref: %.9 = name_ref Op, imports.%import_ref.3 [template = constants.%.10] +// CHECK:STDOUT: %.loc27_12.1: %Op.type.2 = interface_witness_access constants.%.4, element0 [template = constants.%Op.1] // CHECK:STDOUT: %.loc27_12.2: = bound_method %a.ref, %.loc27_12.1 // CHECK:STDOUT: %.loc26: ref %C = splice_block %return {} // CHECK:STDOUT: %Op.call: init %C = call %.loc27_12.2(%a.ref, %b.ref) to %.loc26 // CHECK:STDOUT: return %Op.call to %return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @TestAssign(%a: %.8, %b: %C) { +// CHECK:STDOUT: fn @TestAssign(%a: %.6, %b: %C) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %a.ref: %.8 = name_ref a, %a +// CHECK:STDOUT: %a.ref: %.6 = name_ref a, %a // CHECK:STDOUT: %.loc31_3.1: ref %C = deref %a.ref // CHECK:STDOUT: %b.ref: %C = name_ref b, %b -// CHECK:STDOUT: %Op.ref: %.13 = name_ref Op, imports.%import_ref.7 [template = constants.%.14] -// CHECK:STDOUT: %.loc31_6.1: %Op.type.4 = interface_witness_access constants.%.10, element0 [template = constants.%Op.3] +// CHECK:STDOUT: %Op.ref: %.11 = name_ref Op, imports.%import_ref.7 [template = constants.%.12] +// CHECK:STDOUT: %.loc31_6.1: %Op.type.4 = interface_witness_access constants.%.8, element0 [template = constants.%Op.3] // CHECK:STDOUT: %.loc31_6.2: = bound_method %.loc31_3.1, %.loc31_6.1 -// CHECK:STDOUT: %.loc31_3.2: %.8 = addr_of %.loc31_3.1 -// CHECK:STDOUT: %Op.call: init %.4 = call %.loc31_6.2(%.loc31_3.2, %b.ref) +// CHECK:STDOUT: %.loc31_3.2: %.6 = addr_of %.loc31_3.1 +// CHECK:STDOUT: %Op.call: init %.3 = call %.loc31_6.2(%.loc31_3.2, %b.ref) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -261,11 +261,11 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: // CHECK:STDOUT: specific @Op.4(constants.%Self.2) { // CHECK:STDOUT: %Self => constants.%Self.2 -// CHECK:STDOUT: %.2 => constants.%.9 +// CHECK:STDOUT: %.2 => constants.%.7 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Op.4(constants.%C) { // CHECK:STDOUT: %Self => constants.%C -// CHECK:STDOUT: %.2 => constants.%.8 +// CHECK:STDOUT: %.2 => constants.%.6 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/operators/overloaded/mod.carbon b/toolchain/check/testdata/operators/overloaded/mod.carbon index d708f8234fa45..b7e3895e65ae0 100644 --- a/toolchain/check/testdata/operators/overloaded/mod.carbon +++ b/toolchain/check/testdata/operators/overloaded/mod.carbon @@ -37,33 +37,33 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %.1: type = struct_type {} [template] // CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] -// CHECK:STDOUT: %.3: type = interface_type @Mod [template] -// CHECK:STDOUT: %Self.1: %.3 = bind_symbolic_name Self, 0 [symbolic] +// CHECK:STDOUT: %Mod.type: type = interface_type @Mod [template] +// CHECK:STDOUT: %Self.1: %Mod.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %Op.type.1: type = fn_type @Op.1 [template] -// CHECK:STDOUT: %.4: type = tuple_type () [template] +// CHECK:STDOUT: %.3: type = tuple_type () [template] // CHECK:STDOUT: %Op.1: %Op.type.1 = struct_value () [template] // CHECK:STDOUT: %Op.type.2: type = fn_type @Op.2 [template] // CHECK:STDOUT: %Op.2: %Op.type.2 = struct_value () [template] -// CHECK:STDOUT: %.5: = interface_witness (%Op.1) [template] -// CHECK:STDOUT: %.6: type = ptr_type %.1 [template] +// CHECK:STDOUT: %.4: = interface_witness (%Op.1) [template] +// CHECK:STDOUT: %.5: type = ptr_type %.1 [template] // CHECK:STDOUT: %struct: %C = struct_value () [template] -// CHECK:STDOUT: %.7: type = interface_type @ModAssign [template] -// CHECK:STDOUT: %Self.2: %.7 = bind_symbolic_name Self, 0 [symbolic] -// CHECK:STDOUT: %.8: type = ptr_type %C [template] +// CHECK:STDOUT: %ModAssign.type: type = interface_type @ModAssign [template] +// CHECK:STDOUT: %Self.2: %ModAssign.type = bind_symbolic_name Self, 0 [symbolic] +// CHECK:STDOUT: %.6: type = ptr_type %C [template] // CHECK:STDOUT: %Op.type.3: type = fn_type @Op.3 [template] // CHECK:STDOUT: %Op.3: %Op.type.3 = struct_value () [template] // CHECK:STDOUT: %Op.type.4: type = fn_type @Op.4 [template] // CHECK:STDOUT: %Op.4: %Op.type.4 = struct_value () [template] -// CHECK:STDOUT: %.9: type = ptr_type %Self.2 [symbolic] -// CHECK:STDOUT: %.10: = interface_witness (%Op.3) [template] +// CHECK:STDOUT: %.7: type = ptr_type %Self.2 [symbolic] +// CHECK:STDOUT: %.8: = interface_witness (%Op.3) [template] // CHECK:STDOUT: %TestOp.type: type = fn_type @TestOp [template] // CHECK:STDOUT: %TestOp: %TestOp.type = struct_value () [template] -// CHECK:STDOUT: %.11: type = assoc_entity_type %.3, %Op.type.2 [template] -// CHECK:STDOUT: %.12: %.11 = assoc_entity element0, imports.%import_ref.9 [template] +// CHECK:STDOUT: %.9: type = assoc_entity_type %Mod.type, %Op.type.2 [template] +// CHECK:STDOUT: %.10: %.9 = assoc_entity element0, imports.%import_ref.9 [template] // CHECK:STDOUT: %TestAssign.type: type = fn_type @TestAssign [template] // CHECK:STDOUT: %TestAssign: %TestAssign.type = struct_value () [template] -// CHECK:STDOUT: %.13: type = assoc_entity_type %.7, %Op.type.4 [template] -// CHECK:STDOUT: %.14: %.13 = assoc_entity element0, imports.%import_ref.10 [template] +// CHECK:STDOUT: %.11: type = assoc_entity_type %ModAssign.type, %Op.type.4 [template] +// CHECK:STDOUT: %.12: %.11 = assoc_entity element0, imports.%import_ref.10 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -79,13 +79,13 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: import Core//prelude/operators/comparison // CHECK:STDOUT: import Core//prelude/types/bool // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.1: type = import_ref Core//prelude/operators/arithmetic, inst+281, loaded [template = constants.%.3] +// CHECK:STDOUT: %import_ref.1: type = import_ref Core//prelude/operators/arithmetic, inst+281, loaded [template = constants.%Mod.type] // CHECK:STDOUT: %import_ref.2 = import_ref Core//prelude/operators/arithmetic, inst+283, unloaded -// CHECK:STDOUT: %import_ref.3: %.11 = import_ref Core//prelude/operators/arithmetic, inst+306, loaded [template = constants.%.12] +// CHECK:STDOUT: %import_ref.3: %.9 = import_ref Core//prelude/operators/arithmetic, inst+306, loaded [template = constants.%.10] // CHECK:STDOUT: %import_ref.4: %Op.type.2 = import_ref Core//prelude/operators/arithmetic, inst+301, loaded [template = constants.%Op.2] -// CHECK:STDOUT: %import_ref.5: type = import_ref Core//prelude/operators/arithmetic, inst+308, loaded [template = constants.%.7] +// CHECK:STDOUT: %import_ref.5: type = import_ref Core//prelude/operators/arithmetic, inst+308, loaded [template = constants.%ModAssign.type] // CHECK:STDOUT: %import_ref.6 = import_ref Core//prelude/operators/arithmetic, inst+310, unloaded -// CHECK:STDOUT: %import_ref.7: %.13 = import_ref Core//prelude/operators/arithmetic, inst+333, loaded [template = constants.%.14] +// CHECK:STDOUT: %import_ref.7: %.11 = import_ref Core//prelude/operators/arithmetic, inst+333, loaded [template = constants.%.12] // CHECK:STDOUT: %import_ref.8: %Op.type.4 = import_ref Core//prelude/operators/arithmetic, inst+327, loaded [template = constants.%Op.4] // CHECK:STDOUT: %import_ref.9 = import_ref Core//prelude/operators/arithmetic, inst+301, unloaded // CHECK:STDOUT: %import_ref.10 = import_ref Core//prelude/operators/arithmetic, inst+327, unloaded @@ -103,12 +103,12 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: impl_decl @impl.1 [template] {} { // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %Core.ref: = name_ref Core, imports.%Core [template = imports.%Core] -// CHECK:STDOUT: %Mod.ref: type = name_ref Mod, imports.%import_ref.1 [template = constants.%.3] +// CHECK:STDOUT: %Mod.ref: type = name_ref Mod, imports.%import_ref.1 [template = constants.%Mod.type] // CHECK:STDOUT: } // CHECK:STDOUT: impl_decl @impl.2 [template] {} { // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %Core.ref: = name_ref Core, imports.%Core [template = imports.%Core] -// CHECK:STDOUT: %ModAssign.ref: type = name_ref ModAssign, imports.%import_ref.5 [template = constants.%.7] +// CHECK:STDOUT: %ModAssign.ref: type = name_ref ModAssign, imports.%import_ref.5 [template = constants.%ModAssign.type] // CHECK:STDOUT: } // CHECK:STDOUT: %TestOp.decl: %TestOp.type = fn_decl @TestOp [template = constants.%TestOp] { // CHECK:STDOUT: %a.patt: %C = binding_pattern a @@ -124,13 +124,13 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %return: ref %C = var // CHECK:STDOUT: } // CHECK:STDOUT: %TestAssign.decl: %TestAssign.type = fn_decl @TestAssign [template = constants.%TestAssign] { -// CHECK:STDOUT: %a.patt: %.8 = binding_pattern a +// CHECK:STDOUT: %a.patt: %.6 = binding_pattern a // CHECK:STDOUT: %b.patt: %C = binding_pattern b // CHECK:STDOUT: } { // CHECK:STDOUT: %C.ref.loc30_18: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %.loc30: type = ptr_type %C [template = constants.%.8] -// CHECK:STDOUT: %a.param: %.8 = param a, runtime_param0 -// CHECK:STDOUT: %a: %.8 = bind_name a, %a.param +// CHECK:STDOUT: %.loc30: type = ptr_type %C [template = constants.%.6] +// CHECK:STDOUT: %a.param: %.6 = param a, runtime_param0 +// CHECK:STDOUT: %a: %.6 = bind_name a, %a.param // CHECK:STDOUT: %C.ref.loc30_25: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %b.param: %C = param b, runtime_param1 // CHECK:STDOUT: %b: %C = bind_name b, %b.param @@ -165,7 +165,7 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %C.ref.loc18_31: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %return: ref %C = var // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc17: = interface_witness (%Op.decl) [template = constants.%.5] +// CHECK:STDOUT: %.loc17: = interface_witness (%Op.decl) [template = constants.%.4] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Op = %Op.decl @@ -174,19 +174,19 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.2: %C.ref as %ModAssign.ref { // CHECK:STDOUT: %Op.decl: %Op.type.3 = fn_decl @Op.3 [template = constants.%Op.3] { -// CHECK:STDOUT: %self.patt: %.8 = binding_pattern self +// CHECK:STDOUT: %self.patt: %.6 = binding_pattern self // CHECK:STDOUT: %other.patt: %C = binding_pattern other // CHECK:STDOUT: } { // CHECK:STDOUT: %C.ref.loc23_20: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %.loc23_21: type = ptr_type %C [template = constants.%.8] -// CHECK:STDOUT: %self.param: %.8 = param self, runtime_param0 -// CHECK:STDOUT: %self: %.8 = bind_name self, %self.param -// CHECK:STDOUT: %.loc23_9: %.8 = addr_pattern %self +// CHECK:STDOUT: %.loc23_21: type = ptr_type %C [template = constants.%.6] +// CHECK:STDOUT: %self.param: %.6 = param self, runtime_param0 +// CHECK:STDOUT: %self: %.6 = bind_name self, %self.param +// CHECK:STDOUT: %.loc23_9: %.6 = addr_pattern %self // CHECK:STDOUT: %C.ref.loc23_31: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %other.param: %C = param other, runtime_param1 // CHECK:STDOUT: %other: %C = bind_name other, %other.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc22: = interface_witness (%Op.decl) [template = constants.%.10] +// CHECK:STDOUT: %.loc22: = interface_witness (%Op.decl) [template = constants.%.8] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Op = %Op.decl @@ -208,46 +208,46 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: return %.loc19_14 to %return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @Op.2(constants.%Self.1: %.3) { -// CHECK:STDOUT: %Self: %.3 = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self.1)] +// CHECK:STDOUT: generic fn @Op.2(constants.%Self.1: %Mod.type) { +// CHECK:STDOUT: %Self: %Mod.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self.1)] // CHECK:STDOUT: // CHECK:STDOUT: fn[%self: @Op.2.%Self (%Self.1)](%other: @Op.2.%Self (%Self.1)) -> @Op.2.%Self (%Self.1); // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Op.3[addr %self: %.8](%other: %C) { +// CHECK:STDOUT: fn @Op.3[addr %self: %.6](%other: %C) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @Op.4(constants.%Self.2: %.7) { -// CHECK:STDOUT: %Self: %.7 = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self.2)] -// CHECK:STDOUT: %.2: type = ptr_type @Op.4.%Self (%Self.2) [symbolic = %.2 (constants.%.9)] +// CHECK:STDOUT: generic fn @Op.4(constants.%Self.2: %ModAssign.type) { +// CHECK:STDOUT: %Self: %ModAssign.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self.2)] +// CHECK:STDOUT: %.2: type = ptr_type @Op.4.%Self (%Self.2) [symbolic = %.2 (constants.%.7)] // CHECK:STDOUT: -// CHECK:STDOUT: fn[addr %self: @Op.4.%.2 (%.9)](%other: @Op.4.%Self (%Self.2)); +// CHECK:STDOUT: fn[addr %self: @Op.4.%.2 (%.7)](%other: @Op.4.%Self (%Self.2)); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @TestOp(%a: %C, %b: %C) -> %return: %C { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: %C = name_ref a, %a // CHECK:STDOUT: %b.ref: %C = name_ref b, %b -// CHECK:STDOUT: %Op.ref: %.11 = name_ref Op, imports.%import_ref.3 [template = constants.%.12] -// CHECK:STDOUT: %.loc27_12.1: %Op.type.2 = interface_witness_access constants.%.5, element0 [template = constants.%Op.1] +// CHECK:STDOUT: %Op.ref: %.9 = name_ref Op, imports.%import_ref.3 [template = constants.%.10] +// CHECK:STDOUT: %.loc27_12.1: %Op.type.2 = interface_witness_access constants.%.4, element0 [template = constants.%Op.1] // CHECK:STDOUT: %.loc27_12.2: = bound_method %a.ref, %.loc27_12.1 // CHECK:STDOUT: %.loc26: ref %C = splice_block %return {} // CHECK:STDOUT: %Op.call: init %C = call %.loc27_12.2(%a.ref, %b.ref) to %.loc26 // CHECK:STDOUT: return %Op.call to %return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @TestAssign(%a: %.8, %b: %C) { +// CHECK:STDOUT: fn @TestAssign(%a: %.6, %b: %C) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %a.ref: %.8 = name_ref a, %a +// CHECK:STDOUT: %a.ref: %.6 = name_ref a, %a // CHECK:STDOUT: %.loc31_3.1: ref %C = deref %a.ref // CHECK:STDOUT: %b.ref: %C = name_ref b, %b -// CHECK:STDOUT: %Op.ref: %.13 = name_ref Op, imports.%import_ref.7 [template = constants.%.14] -// CHECK:STDOUT: %.loc31_6.1: %Op.type.4 = interface_witness_access constants.%.10, element0 [template = constants.%Op.3] +// CHECK:STDOUT: %Op.ref: %.11 = name_ref Op, imports.%import_ref.7 [template = constants.%.12] +// CHECK:STDOUT: %.loc31_6.1: %Op.type.4 = interface_witness_access constants.%.8, element0 [template = constants.%Op.3] // CHECK:STDOUT: %.loc31_6.2: = bound_method %.loc31_3.1, %.loc31_6.1 -// CHECK:STDOUT: %.loc31_3.2: %.8 = addr_of %.loc31_3.1 -// CHECK:STDOUT: %Op.call: init %.4 = call %.loc31_6.2(%.loc31_3.2, %b.ref) +// CHECK:STDOUT: %.loc31_3.2: %.6 = addr_of %.loc31_3.1 +// CHECK:STDOUT: %Op.call: init %.3 = call %.loc31_6.2(%.loc31_3.2, %b.ref) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -261,11 +261,11 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: // CHECK:STDOUT: specific @Op.4(constants.%Self.2) { // CHECK:STDOUT: %Self => constants.%Self.2 -// CHECK:STDOUT: %.2 => constants.%.9 +// CHECK:STDOUT: %.2 => constants.%.7 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Op.4(constants.%C) { // CHECK:STDOUT: %Self => constants.%C -// CHECK:STDOUT: %.2 => constants.%.8 +// CHECK:STDOUT: %.2 => constants.%.6 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/operators/overloaded/mul.carbon b/toolchain/check/testdata/operators/overloaded/mul.carbon index aa2a039770296..f12fa19660c56 100644 --- a/toolchain/check/testdata/operators/overloaded/mul.carbon +++ b/toolchain/check/testdata/operators/overloaded/mul.carbon @@ -37,33 +37,33 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %.1: type = struct_type {} [template] // CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] -// CHECK:STDOUT: %.3: type = interface_type @Mul [template] -// CHECK:STDOUT: %Self.1: %.3 = bind_symbolic_name Self, 0 [symbolic] +// CHECK:STDOUT: %Mul.type: type = interface_type @Mul [template] +// CHECK:STDOUT: %Self.1: %Mul.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %Op.type.1: type = fn_type @Op.1 [template] -// CHECK:STDOUT: %.4: type = tuple_type () [template] +// CHECK:STDOUT: %.3: type = tuple_type () [template] // CHECK:STDOUT: %Op.1: %Op.type.1 = struct_value () [template] // CHECK:STDOUT: %Op.type.2: type = fn_type @Op.2 [template] // CHECK:STDOUT: %Op.2: %Op.type.2 = struct_value () [template] -// CHECK:STDOUT: %.5: = interface_witness (%Op.1) [template] -// CHECK:STDOUT: %.6: type = ptr_type %.1 [template] +// CHECK:STDOUT: %.4: = interface_witness (%Op.1) [template] +// CHECK:STDOUT: %.5: type = ptr_type %.1 [template] // CHECK:STDOUT: %struct: %C = struct_value () [template] -// CHECK:STDOUT: %.7: type = interface_type @MulAssign [template] -// CHECK:STDOUT: %Self.2: %.7 = bind_symbolic_name Self, 0 [symbolic] -// CHECK:STDOUT: %.8: type = ptr_type %C [template] +// CHECK:STDOUT: %MulAssign.type: type = interface_type @MulAssign [template] +// CHECK:STDOUT: %Self.2: %MulAssign.type = bind_symbolic_name Self, 0 [symbolic] +// CHECK:STDOUT: %.6: type = ptr_type %C [template] // CHECK:STDOUT: %Op.type.3: type = fn_type @Op.3 [template] // CHECK:STDOUT: %Op.3: %Op.type.3 = struct_value () [template] // CHECK:STDOUT: %Op.type.4: type = fn_type @Op.4 [template] // CHECK:STDOUT: %Op.4: %Op.type.4 = struct_value () [template] -// CHECK:STDOUT: %.9: type = ptr_type %Self.2 [symbolic] -// CHECK:STDOUT: %.10: = interface_witness (%Op.3) [template] +// CHECK:STDOUT: %.7: type = ptr_type %Self.2 [symbolic] +// CHECK:STDOUT: %.8: = interface_witness (%Op.3) [template] // CHECK:STDOUT: %TestOp.type: type = fn_type @TestOp [template] // CHECK:STDOUT: %TestOp: %TestOp.type = struct_value () [template] -// CHECK:STDOUT: %.11: type = assoc_entity_type %.3, %Op.type.2 [template] -// CHECK:STDOUT: %.12: %.11 = assoc_entity element0, imports.%import_ref.9 [template] +// CHECK:STDOUT: %.9: type = assoc_entity_type %Mul.type, %Op.type.2 [template] +// CHECK:STDOUT: %.10: %.9 = assoc_entity element0, imports.%import_ref.9 [template] // CHECK:STDOUT: %TestAssign.type: type = fn_type @TestAssign [template] // CHECK:STDOUT: %TestAssign: %TestAssign.type = struct_value () [template] -// CHECK:STDOUT: %.13: type = assoc_entity_type %.7, %Op.type.4 [template] -// CHECK:STDOUT: %.14: %.13 = assoc_entity element0, imports.%import_ref.10 [template] +// CHECK:STDOUT: %.11: type = assoc_entity_type %MulAssign.type, %Op.type.4 [template] +// CHECK:STDOUT: %.12: %.11 = assoc_entity element0, imports.%import_ref.10 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -79,13 +79,13 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: import Core//prelude/operators/comparison // CHECK:STDOUT: import Core//prelude/types/bool // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.1: type = import_ref Core//prelude/operators/arithmetic, inst+173, loaded [template = constants.%.3] +// CHECK:STDOUT: %import_ref.1: type = import_ref Core//prelude/operators/arithmetic, inst+173, loaded [template = constants.%Mul.type] // CHECK:STDOUT: %import_ref.2 = import_ref Core//prelude/operators/arithmetic, inst+175, unloaded -// CHECK:STDOUT: %import_ref.3: %.11 = import_ref Core//prelude/operators/arithmetic, inst+198, loaded [template = constants.%.12] +// CHECK:STDOUT: %import_ref.3: %.9 = import_ref Core//prelude/operators/arithmetic, inst+198, loaded [template = constants.%.10] // CHECK:STDOUT: %import_ref.4: %Op.type.2 = import_ref Core//prelude/operators/arithmetic, inst+193, loaded [template = constants.%Op.2] -// CHECK:STDOUT: %import_ref.5: type = import_ref Core//prelude/operators/arithmetic, inst+200, loaded [template = constants.%.7] +// CHECK:STDOUT: %import_ref.5: type = import_ref Core//prelude/operators/arithmetic, inst+200, loaded [template = constants.%MulAssign.type] // CHECK:STDOUT: %import_ref.6 = import_ref Core//prelude/operators/arithmetic, inst+202, unloaded -// CHECK:STDOUT: %import_ref.7: %.13 = import_ref Core//prelude/operators/arithmetic, inst+225, loaded [template = constants.%.14] +// CHECK:STDOUT: %import_ref.7: %.11 = import_ref Core//prelude/operators/arithmetic, inst+225, loaded [template = constants.%.12] // CHECK:STDOUT: %import_ref.8: %Op.type.4 = import_ref Core//prelude/operators/arithmetic, inst+219, loaded [template = constants.%Op.4] // CHECK:STDOUT: %import_ref.9 = import_ref Core//prelude/operators/arithmetic, inst+193, unloaded // CHECK:STDOUT: %import_ref.10 = import_ref Core//prelude/operators/arithmetic, inst+219, unloaded @@ -103,12 +103,12 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: impl_decl @impl.1 [template] {} { // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %Core.ref: = name_ref Core, imports.%Core [template = imports.%Core] -// CHECK:STDOUT: %Mul.ref: type = name_ref Mul, imports.%import_ref.1 [template = constants.%.3] +// CHECK:STDOUT: %Mul.ref: type = name_ref Mul, imports.%import_ref.1 [template = constants.%Mul.type] // CHECK:STDOUT: } // CHECK:STDOUT: impl_decl @impl.2 [template] {} { // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %Core.ref: = name_ref Core, imports.%Core [template = imports.%Core] -// CHECK:STDOUT: %MulAssign.ref: type = name_ref MulAssign, imports.%import_ref.5 [template = constants.%.7] +// CHECK:STDOUT: %MulAssign.ref: type = name_ref MulAssign, imports.%import_ref.5 [template = constants.%MulAssign.type] // CHECK:STDOUT: } // CHECK:STDOUT: %TestOp.decl: %TestOp.type = fn_decl @TestOp [template = constants.%TestOp] { // CHECK:STDOUT: %a.patt: %C = binding_pattern a @@ -124,13 +124,13 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %return: ref %C = var // CHECK:STDOUT: } // CHECK:STDOUT: %TestAssign.decl: %TestAssign.type = fn_decl @TestAssign [template = constants.%TestAssign] { -// CHECK:STDOUT: %a.patt: %.8 = binding_pattern a +// CHECK:STDOUT: %a.patt: %.6 = binding_pattern a // CHECK:STDOUT: %b.patt: %C = binding_pattern b // CHECK:STDOUT: } { // CHECK:STDOUT: %C.ref.loc30_18: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %.loc30: type = ptr_type %C [template = constants.%.8] -// CHECK:STDOUT: %a.param: %.8 = param a, runtime_param0 -// CHECK:STDOUT: %a: %.8 = bind_name a, %a.param +// CHECK:STDOUT: %.loc30: type = ptr_type %C [template = constants.%.6] +// CHECK:STDOUT: %a.param: %.6 = param a, runtime_param0 +// CHECK:STDOUT: %a: %.6 = bind_name a, %a.param // CHECK:STDOUT: %C.ref.loc30_25: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %b.param: %C = param b, runtime_param1 // CHECK:STDOUT: %b: %C = bind_name b, %b.param @@ -165,7 +165,7 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %C.ref.loc18_31: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %return: ref %C = var // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc17: = interface_witness (%Op.decl) [template = constants.%.5] +// CHECK:STDOUT: %.loc17: = interface_witness (%Op.decl) [template = constants.%.4] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Op = %Op.decl @@ -174,19 +174,19 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.2: %C.ref as %MulAssign.ref { // CHECK:STDOUT: %Op.decl: %Op.type.3 = fn_decl @Op.3 [template = constants.%Op.3] { -// CHECK:STDOUT: %self.patt: %.8 = binding_pattern self +// CHECK:STDOUT: %self.patt: %.6 = binding_pattern self // CHECK:STDOUT: %other.patt: %C = binding_pattern other // CHECK:STDOUT: } { // CHECK:STDOUT: %C.ref.loc23_20: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %.loc23_21: type = ptr_type %C [template = constants.%.8] -// CHECK:STDOUT: %self.param: %.8 = param self, runtime_param0 -// CHECK:STDOUT: %self: %.8 = bind_name self, %self.param -// CHECK:STDOUT: %.loc23_9: %.8 = addr_pattern %self +// CHECK:STDOUT: %.loc23_21: type = ptr_type %C [template = constants.%.6] +// CHECK:STDOUT: %self.param: %.6 = param self, runtime_param0 +// CHECK:STDOUT: %self: %.6 = bind_name self, %self.param +// CHECK:STDOUT: %.loc23_9: %.6 = addr_pattern %self // CHECK:STDOUT: %C.ref.loc23_31: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %other.param: %C = param other, runtime_param1 // CHECK:STDOUT: %other: %C = bind_name other, %other.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc22: = interface_witness (%Op.decl) [template = constants.%.10] +// CHECK:STDOUT: %.loc22: = interface_witness (%Op.decl) [template = constants.%.8] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Op = %Op.decl @@ -208,46 +208,46 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: return %.loc19_14 to %return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @Op.2(constants.%Self.1: %.3) { -// CHECK:STDOUT: %Self: %.3 = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self.1)] +// CHECK:STDOUT: generic fn @Op.2(constants.%Self.1: %Mul.type) { +// CHECK:STDOUT: %Self: %Mul.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self.1)] // CHECK:STDOUT: // CHECK:STDOUT: fn[%self: @Op.2.%Self (%Self.1)](%other: @Op.2.%Self (%Self.1)) -> @Op.2.%Self (%Self.1); // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Op.3[addr %self: %.8](%other: %C) { +// CHECK:STDOUT: fn @Op.3[addr %self: %.6](%other: %C) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @Op.4(constants.%Self.2: %.7) { -// CHECK:STDOUT: %Self: %.7 = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self.2)] -// CHECK:STDOUT: %.2: type = ptr_type @Op.4.%Self (%Self.2) [symbolic = %.2 (constants.%.9)] +// CHECK:STDOUT: generic fn @Op.4(constants.%Self.2: %MulAssign.type) { +// CHECK:STDOUT: %Self: %MulAssign.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self.2)] +// CHECK:STDOUT: %.2: type = ptr_type @Op.4.%Self (%Self.2) [symbolic = %.2 (constants.%.7)] // CHECK:STDOUT: -// CHECK:STDOUT: fn[addr %self: @Op.4.%.2 (%.9)](%other: @Op.4.%Self (%Self.2)); +// CHECK:STDOUT: fn[addr %self: @Op.4.%.2 (%.7)](%other: @Op.4.%Self (%Self.2)); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @TestOp(%a: %C, %b: %C) -> %return: %C { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: %C = name_ref a, %a // CHECK:STDOUT: %b.ref: %C = name_ref b, %b -// CHECK:STDOUT: %Op.ref: %.11 = name_ref Op, imports.%import_ref.3 [template = constants.%.12] -// CHECK:STDOUT: %.loc27_12.1: %Op.type.2 = interface_witness_access constants.%.5, element0 [template = constants.%Op.1] +// CHECK:STDOUT: %Op.ref: %.9 = name_ref Op, imports.%import_ref.3 [template = constants.%.10] +// CHECK:STDOUT: %.loc27_12.1: %Op.type.2 = interface_witness_access constants.%.4, element0 [template = constants.%Op.1] // CHECK:STDOUT: %.loc27_12.2: = bound_method %a.ref, %.loc27_12.1 // CHECK:STDOUT: %.loc26: ref %C = splice_block %return {} // CHECK:STDOUT: %Op.call: init %C = call %.loc27_12.2(%a.ref, %b.ref) to %.loc26 // CHECK:STDOUT: return %Op.call to %return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @TestAssign(%a: %.8, %b: %C) { +// CHECK:STDOUT: fn @TestAssign(%a: %.6, %b: %C) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %a.ref: %.8 = name_ref a, %a +// CHECK:STDOUT: %a.ref: %.6 = name_ref a, %a // CHECK:STDOUT: %.loc31_3.1: ref %C = deref %a.ref // CHECK:STDOUT: %b.ref: %C = name_ref b, %b -// CHECK:STDOUT: %Op.ref: %.13 = name_ref Op, imports.%import_ref.7 [template = constants.%.14] -// CHECK:STDOUT: %.loc31_6.1: %Op.type.4 = interface_witness_access constants.%.10, element0 [template = constants.%Op.3] +// CHECK:STDOUT: %Op.ref: %.11 = name_ref Op, imports.%import_ref.7 [template = constants.%.12] +// CHECK:STDOUT: %.loc31_6.1: %Op.type.4 = interface_witness_access constants.%.8, element0 [template = constants.%Op.3] // CHECK:STDOUT: %.loc31_6.2: = bound_method %.loc31_3.1, %.loc31_6.1 -// CHECK:STDOUT: %.loc31_3.2: %.8 = addr_of %.loc31_3.1 -// CHECK:STDOUT: %Op.call: init %.4 = call %.loc31_6.2(%.loc31_3.2, %b.ref) +// CHECK:STDOUT: %.loc31_3.2: %.6 = addr_of %.loc31_3.1 +// CHECK:STDOUT: %Op.call: init %.3 = call %.loc31_6.2(%.loc31_3.2, %b.ref) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -261,11 +261,11 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: // CHECK:STDOUT: specific @Op.4(constants.%Self.2) { // CHECK:STDOUT: %Self => constants.%Self.2 -// CHECK:STDOUT: %.2 => constants.%.9 +// CHECK:STDOUT: %.2 => constants.%.7 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Op.4(constants.%C) { // CHECK:STDOUT: %Self => constants.%C -// CHECK:STDOUT: %.2 => constants.%.8 +// CHECK:STDOUT: %.2 => constants.%.6 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/operators/overloaded/negate.carbon b/toolchain/check/testdata/operators/overloaded/negate.carbon index 10dec0a87fc85..ff7f7a27e2b90 100644 --- a/toolchain/check/testdata/operators/overloaded/negate.carbon +++ b/toolchain/check/testdata/operators/overloaded/negate.carbon @@ -30,20 +30,20 @@ fn TestOp(a: C) -> C { // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %.1: type = struct_type {} [template] // CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] -// CHECK:STDOUT: %.3: type = interface_type @Negate [template] -// CHECK:STDOUT: %Self: %.3 = bind_symbolic_name Self, 0 [symbolic] +// CHECK:STDOUT: %Negate.type: type = interface_type @Negate [template] +// CHECK:STDOUT: %Self: %Negate.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %Op.type.1: type = fn_type @Op.1 [template] -// CHECK:STDOUT: %.4: type = tuple_type () [template] +// CHECK:STDOUT: %.3: type = tuple_type () [template] // CHECK:STDOUT: %Op.1: %Op.type.1 = struct_value () [template] // CHECK:STDOUT: %Op.type.2: type = fn_type @Op.2 [template] // CHECK:STDOUT: %Op.2: %Op.type.2 = struct_value () [template] -// CHECK:STDOUT: %.5: = interface_witness (%Op.1) [template] -// CHECK:STDOUT: %.6: type = ptr_type %.1 [template] +// CHECK:STDOUT: %.4: = interface_witness (%Op.1) [template] +// CHECK:STDOUT: %.5: type = ptr_type %.1 [template] // CHECK:STDOUT: %struct: %C = struct_value () [template] // CHECK:STDOUT: %TestOp.type: type = fn_type @TestOp [template] // CHECK:STDOUT: %TestOp: %TestOp.type = struct_value () [template] -// CHECK:STDOUT: %.7: type = assoc_entity_type %.3, %Op.type.2 [template] -// CHECK:STDOUT: %.8: %.7 = assoc_entity element0, imports.%import_ref.5 [template] +// CHECK:STDOUT: %.6: type = assoc_entity_type %Negate.type, %Op.type.2 [template] +// CHECK:STDOUT: %.7: %.6 = assoc_entity element0, imports.%import_ref.5 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -58,9 +58,9 @@ fn TestOp(a: C) -> C { // CHECK:STDOUT: import Core//prelude/operators/comparison // CHECK:STDOUT: import Core//prelude/types/bool // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.1: type = import_ref Core//prelude/operators/arithmetic, inst+77, loaded [template = constants.%.3] +// CHECK:STDOUT: %import_ref.1: type = import_ref Core//prelude/operators/arithmetic, inst+77, loaded [template = constants.%Negate.type] // CHECK:STDOUT: %import_ref.2 = import_ref Core//prelude/operators/arithmetic, inst+79, unloaded -// CHECK:STDOUT: %import_ref.3: %.7 = import_ref Core//prelude/operators/arithmetic, inst+96, loaded [template = constants.%.8] +// CHECK:STDOUT: %import_ref.3: %.6 = import_ref Core//prelude/operators/arithmetic, inst+96, loaded [template = constants.%.7] // CHECK:STDOUT: %import_ref.4: %Op.type.2 = import_ref Core//prelude/operators/arithmetic, inst+91, loaded [template = constants.%Op.2] // CHECK:STDOUT: %import_ref.5 = import_ref Core//prelude/operators/arithmetic, inst+91, unloaded // CHECK:STDOUT: } @@ -76,7 +76,7 @@ fn TestOp(a: C) -> C { // CHECK:STDOUT: impl_decl @impl [template] {} { // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %Core.ref: = name_ref Core, imports.%Core [template = imports.%Core] -// CHECK:STDOUT: %Negate.ref: type = name_ref Negate, imports.%import_ref.1 [template = constants.%.3] +// CHECK:STDOUT: %Negate.ref: type = name_ref Negate, imports.%import_ref.1 [template = constants.%Negate.type] // CHECK:STDOUT: } // CHECK:STDOUT: %TestOp.decl: %TestOp.type = fn_decl @TestOp [template = constants.%TestOp] { // CHECK:STDOUT: %a.patt: %C = binding_pattern a @@ -106,7 +106,7 @@ fn TestOp(a: C) -> C { // CHECK:STDOUT: %C.ref.loc18_23: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %return: ref %C = var // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc17: = interface_witness (%Op.decl) [template = constants.%.5] +// CHECK:STDOUT: %.loc17: = interface_witness (%Op.decl) [template = constants.%.4] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Op = %Op.decl @@ -128,8 +128,8 @@ fn TestOp(a: C) -> C { // CHECK:STDOUT: return %.loc19_14 to %return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @Op.2(constants.%Self: %.3) { -// CHECK:STDOUT: %Self: %.3 = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self)] +// CHECK:STDOUT: generic fn @Op.2(constants.%Self: %Negate.type) { +// CHECK:STDOUT: %Self: %Negate.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self)] // CHECK:STDOUT: // CHECK:STDOUT: fn[%self: @Op.2.%Self (%Self)]() -> @Op.2.%Self (%Self); // CHECK:STDOUT: } @@ -137,8 +137,8 @@ fn TestOp(a: C) -> C { // CHECK:STDOUT: fn @TestOp(%a: %C) -> %return: %C { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: %C = name_ref a, %a -// CHECK:STDOUT: %Op.ref: %.7 = name_ref Op, imports.%import_ref.3 [template = constants.%.8] -// CHECK:STDOUT: %.loc24_10.1: %Op.type.2 = interface_witness_access constants.%.5, element0 [template = constants.%Op.1] +// CHECK:STDOUT: %Op.ref: %.6 = name_ref Op, imports.%import_ref.3 [template = constants.%.7] +// CHECK:STDOUT: %.loc24_10.1: %Op.type.2 = interface_witness_access constants.%.4, element0 [template = constants.%Op.1] // CHECK:STDOUT: %.loc24_10.2: = bound_method %a.ref, %.loc24_10.1 // CHECK:STDOUT: %.loc23: ref %C = splice_block %return {} // CHECK:STDOUT: %Op.call: init %C = call %.loc24_10.2(%a.ref) to %.loc23 diff --git a/toolchain/check/testdata/operators/overloaded/ordered.carbon b/toolchain/check/testdata/operators/overloaded/ordered.carbon index 708c8199e7bdd..7a4c3d900eae5 100644 --- a/toolchain/check/testdata/operators/overloaded/ordered.carbon +++ b/toolchain/check/testdata/operators/overloaded/ordered.carbon @@ -80,10 +80,10 @@ fn TestGreaterEqual(a: D, b: D) -> bool { // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %.1: type = struct_type {} [template] // CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] -// CHECK:STDOUT: %.3: type = interface_type @Ordered [template] -// CHECK:STDOUT: %Self: %.3 = bind_symbolic_name Self, 0 [symbolic] +// CHECK:STDOUT: %Ordered.type: type = interface_type @Ordered [template] +// CHECK:STDOUT: %Self: %Ordered.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %Bool.type: type = fn_type @Bool [template] -// CHECK:STDOUT: %.4: type = tuple_type () [template] +// CHECK:STDOUT: %.3: type = tuple_type () [template] // CHECK:STDOUT: %Bool: %Bool.type = struct_value () [template] // CHECK:STDOUT: %Less.type.1: type = fn_type @Less.1 [template] // CHECK:STDOUT: %Less.1: %Less.type.1 = struct_value () [template] @@ -101,24 +101,24 @@ fn TestGreaterEqual(a: D, b: D) -> bool { // CHECK:STDOUT: %Greater.2: %Greater.type.2 = struct_value () [template] // CHECK:STDOUT: %GreaterOrEquivalent.type.2: type = fn_type @GreaterOrEquivalent.2 [template] // CHECK:STDOUT: %GreaterOrEquivalent.2: %GreaterOrEquivalent.type.2 = struct_value () [template] -// CHECK:STDOUT: %.5: = interface_witness (%Less.1, %LessOrEquivalent.1, %Greater.1, %GreaterOrEquivalent.1) [template] +// CHECK:STDOUT: %.4: = interface_witness (%Less.1, %LessOrEquivalent.1, %Greater.1, %GreaterOrEquivalent.1) [template] // CHECK:STDOUT: %TestLess.type: type = fn_type @TestLess [template] // CHECK:STDOUT: %TestLess: %TestLess.type = struct_value () [template] -// CHECK:STDOUT: %.6: type = ptr_type %.1 [template] -// CHECK:STDOUT: %.7: type = assoc_entity_type %.3, %Less.type.2 [template] -// CHECK:STDOUT: %.8: %.7 = assoc_entity element0, imports.%import_ref.12 [template] +// CHECK:STDOUT: %.5: type = ptr_type %.1 [template] +// CHECK:STDOUT: %.6: type = assoc_entity_type %Ordered.type, %Less.type.2 [template] +// CHECK:STDOUT: %.7: %.6 = assoc_entity element0, imports.%import_ref.12 [template] // CHECK:STDOUT: %TestLessEqual.type: type = fn_type @TestLessEqual [template] // CHECK:STDOUT: %TestLessEqual: %TestLessEqual.type = struct_value () [template] -// CHECK:STDOUT: %.9: type = assoc_entity_type %.3, %LessOrEquivalent.type.2 [template] -// CHECK:STDOUT: %.10: %.9 = assoc_entity element1, imports.%import_ref.13 [template] +// CHECK:STDOUT: %.8: type = assoc_entity_type %Ordered.type, %LessOrEquivalent.type.2 [template] +// CHECK:STDOUT: %.9: %.8 = assoc_entity element1, imports.%import_ref.13 [template] // CHECK:STDOUT: %TestGreater.type: type = fn_type @TestGreater [template] // CHECK:STDOUT: %TestGreater: %TestGreater.type = struct_value () [template] -// CHECK:STDOUT: %.11: type = assoc_entity_type %.3, %Greater.type.2 [template] -// CHECK:STDOUT: %.12: %.11 = assoc_entity element2, imports.%import_ref.14 [template] +// CHECK:STDOUT: %.10: type = assoc_entity_type %Ordered.type, %Greater.type.2 [template] +// CHECK:STDOUT: %.11: %.10 = assoc_entity element2, imports.%import_ref.14 [template] // CHECK:STDOUT: %TestGreaterEqual.type: type = fn_type @TestGreaterEqual [template] // CHECK:STDOUT: %TestGreaterEqual: %TestGreaterEqual.type = struct_value () [template] -// CHECK:STDOUT: %.13: type = assoc_entity_type %.3, %GreaterOrEquivalent.type.2 [template] -// CHECK:STDOUT: %.14: %.13 = assoc_entity element3, imports.%import_ref.15 [template] +// CHECK:STDOUT: %.12: type = assoc_entity_type %Ordered.type, %GreaterOrEquivalent.type.2 [template] +// CHECK:STDOUT: %.13: %.12 = assoc_entity element3, imports.%import_ref.15 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -134,12 +134,12 @@ fn TestGreaterEqual(a: D, b: D) -> bool { // CHECK:STDOUT: import Core//prelude/operators/comparison // CHECK:STDOUT: import Core//prelude/types/bool // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.1: type = import_ref Core//prelude/operators/comparison, inst+58, loaded [template = constants.%.3] +// CHECK:STDOUT: %import_ref.1: type = import_ref Core//prelude/operators/comparison, inst+58, loaded [template = constants.%Ordered.type] // CHECK:STDOUT: %import_ref.2 = import_ref Core//prelude/operators/comparison, inst+60, unloaded -// CHECK:STDOUT: %import_ref.3: %.7 = import_ref Core//prelude/operators/comparison, inst+83, loaded [template = constants.%.8] -// CHECK:STDOUT: %import_ref.4: %.9 = import_ref Core//prelude/operators/comparison, inst+106, loaded [template = constants.%.10] -// CHECK:STDOUT: %import_ref.5: %.11 = import_ref Core//prelude/operators/comparison, inst+129, loaded [template = constants.%.12] -// CHECK:STDOUT: %import_ref.6: %.13 = import_ref Core//prelude/operators/comparison, inst+152, loaded [template = constants.%.14] +// CHECK:STDOUT: %import_ref.3: %.6 = import_ref Core//prelude/operators/comparison, inst+83, loaded [template = constants.%.7] +// CHECK:STDOUT: %import_ref.4: %.8 = import_ref Core//prelude/operators/comparison, inst+106, loaded [template = constants.%.9] +// CHECK:STDOUT: %import_ref.5: %.10 = import_ref Core//prelude/operators/comparison, inst+129, loaded [template = constants.%.11] +// CHECK:STDOUT: %import_ref.6: %.12 = import_ref Core//prelude/operators/comparison, inst+152, loaded [template = constants.%.13] // CHECK:STDOUT: %import_ref.7: %Less.type.2 = import_ref Core//prelude/operators/comparison, inst+78, loaded [template = constants.%Less.2] // CHECK:STDOUT: %import_ref.8: %LessOrEquivalent.type.2 = import_ref Core//prelude/operators/comparison, inst+101, loaded [template = constants.%LessOrEquivalent.2] // CHECK:STDOUT: %import_ref.9: %Greater.type.2 = import_ref Core//prelude/operators/comparison, inst+124, loaded [template = constants.%Greater.2] @@ -165,7 +165,7 @@ fn TestGreaterEqual(a: D, b: D) -> bool { // CHECK:STDOUT: impl_decl @impl [template] {} { // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %Core.ref: = name_ref Core, imports.%Core [template = imports.%Core] -// CHECK:STDOUT: %Ordered.ref: type = name_ref Ordered, imports.%import_ref.1 [template = constants.%.3] +// CHECK:STDOUT: %Ordered.ref: type = name_ref Ordered, imports.%import_ref.1 [template = constants.%Ordered.type] // CHECK:STDOUT: } // CHECK:STDOUT: %TestLess.decl: %TestLess.type = fn_decl @TestLess [template = constants.%TestLess] { // CHECK:STDOUT: %a.patt: %C = binding_pattern a @@ -300,7 +300,7 @@ fn TestGreaterEqual(a: D, b: D) -> bool { // CHECK:STDOUT: %.loc10_48.2: type = converted %bool.make_type, %.loc10_48.1 [template = bool] // CHECK:STDOUT: %return: ref bool = var // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc6: = interface_witness (%Less.decl, %LessOrEquivalent.decl, %Greater.decl, %GreaterOrEquivalent.decl) [template = constants.%.5] +// CHECK:STDOUT: %.loc6: = interface_witness (%Less.decl, %LessOrEquivalent.decl, %Greater.decl, %GreaterOrEquivalent.decl) [template = constants.%.4] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Less = %Less.decl @@ -327,26 +327,26 @@ fn TestGreaterEqual(a: D, b: D) -> bool { // CHECK:STDOUT: // CHECK:STDOUT: fn @GreaterOrEquivalent.1[%self: %C](%other: %C) -> bool; // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @Less.2(constants.%Self: %.3) { -// CHECK:STDOUT: %Self: %.3 = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self)] +// CHECK:STDOUT: generic fn @Less.2(constants.%Self: %Ordered.type) { +// CHECK:STDOUT: %Self: %Ordered.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self)] // CHECK:STDOUT: // CHECK:STDOUT: fn[%self: @Less.2.%Self (%Self)](%other: @Less.2.%Self (%Self)) -> bool; // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @LessOrEquivalent.2(constants.%Self: %.3) { -// CHECK:STDOUT: %Self: %.3 = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self)] +// CHECK:STDOUT: generic fn @LessOrEquivalent.2(constants.%Self: %Ordered.type) { +// CHECK:STDOUT: %Self: %Ordered.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self)] // CHECK:STDOUT: // CHECK:STDOUT: fn[%self: @LessOrEquivalent.2.%Self (%Self)](%other: @LessOrEquivalent.2.%Self (%Self)) -> bool; // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @Greater.2(constants.%Self: %.3) { -// CHECK:STDOUT: %Self: %.3 = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self)] +// CHECK:STDOUT: generic fn @Greater.2(constants.%Self: %Ordered.type) { +// CHECK:STDOUT: %Self: %Ordered.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self)] // CHECK:STDOUT: // CHECK:STDOUT: fn[%self: @Greater.2.%Self (%Self)](%other: @Greater.2.%Self (%Self)) -> bool; // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @GreaterOrEquivalent.2(constants.%Self: %.3) { -// CHECK:STDOUT: %Self: %.3 = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self)] +// CHECK:STDOUT: generic fn @GreaterOrEquivalent.2(constants.%Self: %Ordered.type) { +// CHECK:STDOUT: %Self: %Ordered.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self)] // CHECK:STDOUT: // CHECK:STDOUT: fn[%self: @GreaterOrEquivalent.2.%Self (%Self)](%other: @GreaterOrEquivalent.2.%Self (%Self)) -> bool; // CHECK:STDOUT: } @@ -355,8 +355,8 @@ fn TestGreaterEqual(a: D, b: D) -> bool { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: %C = name_ref a, %a // CHECK:STDOUT: %b.ref: %C = name_ref b, %b -// CHECK:STDOUT: %Less.ref: %.7 = name_ref Less, imports.%import_ref.3 [template = constants.%.8] -// CHECK:STDOUT: %.loc14_12.1: %Less.type.2 = interface_witness_access constants.%.5, element0 [template = constants.%Less.1] +// CHECK:STDOUT: %Less.ref: %.6 = name_ref Less, imports.%import_ref.3 [template = constants.%.7] +// CHECK:STDOUT: %.loc14_12.1: %Less.type.2 = interface_witness_access constants.%.4, element0 [template = constants.%Less.1] // CHECK:STDOUT: %.loc14_12.2: = bound_method %a.ref, %.loc14_12.1 // CHECK:STDOUT: %Less.call: init bool = call %.loc14_12.2(%a.ref, %b.ref) // CHECK:STDOUT: %.loc14_15.1: bool = value_of_initializer %Less.call @@ -368,8 +368,8 @@ fn TestGreaterEqual(a: D, b: D) -> bool { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: %C = name_ref a, %a // CHECK:STDOUT: %b.ref: %C = name_ref b, %b -// CHECK:STDOUT: %LessOrEquivalent.ref: %.9 = name_ref LessOrEquivalent, imports.%import_ref.4 [template = constants.%.10] -// CHECK:STDOUT: %.loc18_12.1: %LessOrEquivalent.type.2 = interface_witness_access constants.%.5, element1 [template = constants.%LessOrEquivalent.1] +// CHECK:STDOUT: %LessOrEquivalent.ref: %.8 = name_ref LessOrEquivalent, imports.%import_ref.4 [template = constants.%.9] +// CHECK:STDOUT: %.loc18_12.1: %LessOrEquivalent.type.2 = interface_witness_access constants.%.4, element1 [template = constants.%LessOrEquivalent.1] // CHECK:STDOUT: %.loc18_12.2: = bound_method %a.ref, %.loc18_12.1 // CHECK:STDOUT: %LessOrEquivalent.call: init bool = call %.loc18_12.2(%a.ref, %b.ref) // CHECK:STDOUT: %.loc18_16.1: bool = value_of_initializer %LessOrEquivalent.call @@ -381,8 +381,8 @@ fn TestGreaterEqual(a: D, b: D) -> bool { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: %C = name_ref a, %a // CHECK:STDOUT: %b.ref: %C = name_ref b, %b -// CHECK:STDOUT: %Greater.ref: %.11 = name_ref Greater, imports.%import_ref.5 [template = constants.%.12] -// CHECK:STDOUT: %.loc22_12.1: %Greater.type.2 = interface_witness_access constants.%.5, element2 [template = constants.%Greater.1] +// CHECK:STDOUT: %Greater.ref: %.10 = name_ref Greater, imports.%import_ref.5 [template = constants.%.11] +// CHECK:STDOUT: %.loc22_12.1: %Greater.type.2 = interface_witness_access constants.%.4, element2 [template = constants.%Greater.1] // CHECK:STDOUT: %.loc22_12.2: = bound_method %a.ref, %.loc22_12.1 // CHECK:STDOUT: %Greater.call: init bool = call %.loc22_12.2(%a.ref, %b.ref) // CHECK:STDOUT: %.loc22_15.1: bool = value_of_initializer %Greater.call @@ -394,8 +394,8 @@ fn TestGreaterEqual(a: D, b: D) -> bool { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: %C = name_ref a, %a // CHECK:STDOUT: %b.ref: %C = name_ref b, %b -// CHECK:STDOUT: %GreaterOrEquivalent.ref: %.13 = name_ref GreaterOrEquivalent, imports.%import_ref.6 [template = constants.%.14] -// CHECK:STDOUT: %.loc26_12.1: %GreaterOrEquivalent.type.2 = interface_witness_access constants.%.5, element3 [template = constants.%GreaterOrEquivalent.1] +// CHECK:STDOUT: %GreaterOrEquivalent.ref: %.12 = name_ref GreaterOrEquivalent, imports.%import_ref.6 [template = constants.%.13] +// CHECK:STDOUT: %.loc26_12.1: %GreaterOrEquivalent.type.2 = interface_witness_access constants.%.4, element3 [template = constants.%GreaterOrEquivalent.1] // CHECK:STDOUT: %.loc26_12.2: = bound_method %a.ref, %.loc26_12.1 // CHECK:STDOUT: %GreaterOrEquivalent.call: init bool = call %.loc26_12.2(%a.ref, %b.ref) // CHECK:STDOUT: %.loc26_16.1: bool = value_of_initializer %GreaterOrEquivalent.call @@ -447,30 +447,30 @@ fn TestGreaterEqual(a: D, b: D) -> bool { // CHECK:STDOUT: %TestLess.type: type = fn_type @TestLess [template] // CHECK:STDOUT: %TestLess: %TestLess.type = struct_value () [template] // CHECK:STDOUT: %.4: type = ptr_type %.1 [template] -// CHECK:STDOUT: %.5: type = interface_type @Ordered [template] -// CHECK:STDOUT: %Self: %.5 = bind_symbolic_name Self, 0 [symbolic] +// CHECK:STDOUT: %Ordered.type: type = interface_type @Ordered [template] +// CHECK:STDOUT: %Self: %Ordered.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %Less.type: type = fn_type @Less [template] // CHECK:STDOUT: %Less: %Less.type = struct_value () [template] -// CHECK:STDOUT: %.6: type = assoc_entity_type %.5, %Less.type [template] -// CHECK:STDOUT: %.7: %.6 = assoc_entity element0, imports.%import_ref.12 [template] +// CHECK:STDOUT: %.5: type = assoc_entity_type %Ordered.type, %Less.type [template] +// CHECK:STDOUT: %.6: %.5 = assoc_entity element0, imports.%import_ref.12 [template] // CHECK:STDOUT: %TestLessEqual.type: type = fn_type @TestLessEqual [template] // CHECK:STDOUT: %TestLessEqual: %TestLessEqual.type = struct_value () [template] // CHECK:STDOUT: %LessOrEquivalent.type: type = fn_type @LessOrEquivalent [template] // CHECK:STDOUT: %LessOrEquivalent: %LessOrEquivalent.type = struct_value () [template] -// CHECK:STDOUT: %.8: type = assoc_entity_type %.5, %LessOrEquivalent.type [template] -// CHECK:STDOUT: %.9: %.8 = assoc_entity element1, imports.%import_ref.13 [template] +// CHECK:STDOUT: %.7: type = assoc_entity_type %Ordered.type, %LessOrEquivalent.type [template] +// CHECK:STDOUT: %.8: %.7 = assoc_entity element1, imports.%import_ref.13 [template] // CHECK:STDOUT: %TestGreater.type: type = fn_type @TestGreater [template] // CHECK:STDOUT: %TestGreater: %TestGreater.type = struct_value () [template] // CHECK:STDOUT: %Greater.type: type = fn_type @Greater [template] // CHECK:STDOUT: %Greater: %Greater.type = struct_value () [template] -// CHECK:STDOUT: %.10: type = assoc_entity_type %.5, %Greater.type [template] -// CHECK:STDOUT: %.11: %.10 = assoc_entity element2, imports.%import_ref.14 [template] +// CHECK:STDOUT: %.9: type = assoc_entity_type %Ordered.type, %Greater.type [template] +// CHECK:STDOUT: %.10: %.9 = assoc_entity element2, imports.%import_ref.14 [template] // CHECK:STDOUT: %TestGreaterEqual.type: type = fn_type @TestGreaterEqual [template] // CHECK:STDOUT: %TestGreaterEqual: %TestGreaterEqual.type = struct_value () [template] // CHECK:STDOUT: %GreaterOrEquivalent.type: type = fn_type @GreaterOrEquivalent [template] // CHECK:STDOUT: %GreaterOrEquivalent: %GreaterOrEquivalent.type = struct_value () [template] -// CHECK:STDOUT: %.12: type = assoc_entity_type %.5, %GreaterOrEquivalent.type [template] -// CHECK:STDOUT: %.13: %.12 = assoc_entity element3, imports.%import_ref.15 [template] +// CHECK:STDOUT: %.11: type = assoc_entity_type %Ordered.type, %GreaterOrEquivalent.type [template] +// CHECK:STDOUT: %.12: %.11 = assoc_entity element3, imports.%import_ref.15 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -487,12 +487,12 @@ fn TestGreaterEqual(a: D, b: D) -> bool { // CHECK:STDOUT: import Core//prelude/types/bool // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.1: %Bool.type = import_ref Core//prelude/types/bool, inst+2, loaded [template = constants.%Bool] -// CHECK:STDOUT: %import_ref.2: type = import_ref Core//prelude/operators/comparison, inst+58, loaded [template = constants.%.5] +// CHECK:STDOUT: %import_ref.2: type = import_ref Core//prelude/operators/comparison, inst+58, loaded [template = constants.%Ordered.type] // CHECK:STDOUT: %import_ref.3 = import_ref Core//prelude/operators/comparison, inst+60, unloaded -// CHECK:STDOUT: %import_ref.4: %.6 = import_ref Core//prelude/operators/comparison, inst+83, loaded [template = constants.%.7] -// CHECK:STDOUT: %import_ref.5: %.8 = import_ref Core//prelude/operators/comparison, inst+106, loaded [template = constants.%.9] -// CHECK:STDOUT: %import_ref.6: %.10 = import_ref Core//prelude/operators/comparison, inst+129, loaded [template = constants.%.11] -// CHECK:STDOUT: %import_ref.7: %.12 = import_ref Core//prelude/operators/comparison, inst+152, loaded [template = constants.%.13] +// CHECK:STDOUT: %import_ref.4: %.5 = import_ref Core//prelude/operators/comparison, inst+83, loaded [template = constants.%.6] +// CHECK:STDOUT: %import_ref.5: %.7 = import_ref Core//prelude/operators/comparison, inst+106, loaded [template = constants.%.8] +// CHECK:STDOUT: %import_ref.6: %.9 = import_ref Core//prelude/operators/comparison, inst+129, loaded [template = constants.%.10] +// CHECK:STDOUT: %import_ref.7: %.11 = import_ref Core//prelude/operators/comparison, inst+152, loaded [template = constants.%.12] // CHECK:STDOUT: %import_ref.8 = import_ref Core//prelude/operators/comparison, inst+78, unloaded // CHECK:STDOUT: %import_ref.9 = import_ref Core//prelude/operators/comparison, inst+101, unloaded // CHECK:STDOUT: %import_ref.10 = import_ref Core//prelude/operators/comparison, inst+124, unloaded @@ -599,12 +599,12 @@ fn TestGreaterEqual(a: D, b: D) -> bool { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: %D = name_ref a, %a // CHECK:STDOUT: %b.ref: %D = name_ref b, %b -// CHECK:STDOUT: %Less.ref: %.6 = name_ref Less, imports.%import_ref.4 [template = constants.%.7] +// CHECK:STDOUT: %Less.ref: %.5 = name_ref Less, imports.%import_ref.4 [template = constants.%.6] // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @Less(constants.%Self: %.5) { -// CHECK:STDOUT: %Self: %.5 = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self)] +// CHECK:STDOUT: generic fn @Less(constants.%Self: %Ordered.type) { +// CHECK:STDOUT: %Self: %Ordered.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self)] // CHECK:STDOUT: // CHECK:STDOUT: fn[%self: @Less.%Self (%Self)](%other: @Less.%Self (%Self)) -> bool; // CHECK:STDOUT: } @@ -613,12 +613,12 @@ fn TestGreaterEqual(a: D, b: D) -> bool { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: %D = name_ref a, %a // CHECK:STDOUT: %b.ref: %D = name_ref b, %b -// CHECK:STDOUT: %LessOrEquivalent.ref: %.8 = name_ref LessOrEquivalent, imports.%import_ref.5 [template = constants.%.9] +// CHECK:STDOUT: %LessOrEquivalent.ref: %.7 = name_ref LessOrEquivalent, imports.%import_ref.5 [template = constants.%.8] // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @LessOrEquivalent(constants.%Self: %.5) { -// CHECK:STDOUT: %Self: %.5 = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self)] +// CHECK:STDOUT: generic fn @LessOrEquivalent(constants.%Self: %Ordered.type) { +// CHECK:STDOUT: %Self: %Ordered.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self)] // CHECK:STDOUT: // CHECK:STDOUT: fn[%self: @LessOrEquivalent.%Self (%Self)](%other: @LessOrEquivalent.%Self (%Self)) -> bool; // CHECK:STDOUT: } @@ -627,12 +627,12 @@ fn TestGreaterEqual(a: D, b: D) -> bool { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: %D = name_ref a, %a // CHECK:STDOUT: %b.ref: %D = name_ref b, %b -// CHECK:STDOUT: %Greater.ref: %.10 = name_ref Greater, imports.%import_ref.6 [template = constants.%.11] +// CHECK:STDOUT: %Greater.ref: %.9 = name_ref Greater, imports.%import_ref.6 [template = constants.%.10] // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @Greater(constants.%Self: %.5) { -// CHECK:STDOUT: %Self: %.5 = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self)] +// CHECK:STDOUT: generic fn @Greater(constants.%Self: %Ordered.type) { +// CHECK:STDOUT: %Self: %Ordered.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self)] // CHECK:STDOUT: // CHECK:STDOUT: fn[%self: @Greater.%Self (%Self)](%other: @Greater.%Self (%Self)) -> bool; // CHECK:STDOUT: } @@ -641,12 +641,12 @@ fn TestGreaterEqual(a: D, b: D) -> bool { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: %D = name_ref a, %a // CHECK:STDOUT: %b.ref: %D = name_ref b, %b -// CHECK:STDOUT: %GreaterOrEquivalent.ref: %.12 = name_ref GreaterOrEquivalent, imports.%import_ref.7 [template = constants.%.13] +// CHECK:STDOUT: %GreaterOrEquivalent.ref: %.11 = name_ref GreaterOrEquivalent, imports.%import_ref.7 [template = constants.%.12] // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @GreaterOrEquivalent(constants.%Self: %.5) { -// CHECK:STDOUT: %Self: %.5 = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self)] +// CHECK:STDOUT: generic fn @GreaterOrEquivalent(constants.%Self: %Ordered.type) { +// CHECK:STDOUT: %Self: %Ordered.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self)] // CHECK:STDOUT: // CHECK:STDOUT: fn[%self: @GreaterOrEquivalent.%Self (%Self)](%other: @GreaterOrEquivalent.%Self (%Self)) -> bool; // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/operators/overloaded/right_shift.carbon b/toolchain/check/testdata/operators/overloaded/right_shift.carbon index e3fbd268a5072..c6dec11cf0022 100644 --- a/toolchain/check/testdata/operators/overloaded/right_shift.carbon +++ b/toolchain/check/testdata/operators/overloaded/right_shift.carbon @@ -37,33 +37,33 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %.1: type = struct_type {} [template] // CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] -// CHECK:STDOUT: %.3: type = interface_type @RightShift [template] -// CHECK:STDOUT: %Self.1: %.3 = bind_symbolic_name Self, 0 [symbolic] +// CHECK:STDOUT: %RightShift.type: type = interface_type @RightShift [template] +// CHECK:STDOUT: %Self.1: %RightShift.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %Op.type.1: type = fn_type @Op.1 [template] -// CHECK:STDOUT: %.4: type = tuple_type () [template] +// CHECK:STDOUT: %.3: type = tuple_type () [template] // CHECK:STDOUT: %Op.1: %Op.type.1 = struct_value () [template] // CHECK:STDOUT: %Op.type.2: type = fn_type @Op.2 [template] // CHECK:STDOUT: %Op.2: %Op.type.2 = struct_value () [template] -// CHECK:STDOUT: %.5: = interface_witness (%Op.1) [template] -// CHECK:STDOUT: %.6: type = ptr_type %.1 [template] +// CHECK:STDOUT: %.4: = interface_witness (%Op.1) [template] +// CHECK:STDOUT: %.5: type = ptr_type %.1 [template] // CHECK:STDOUT: %struct: %C = struct_value () [template] -// CHECK:STDOUT: %.7: type = interface_type @RightShiftAssign [template] -// CHECK:STDOUT: %Self.2: %.7 = bind_symbolic_name Self, 0 [symbolic] -// CHECK:STDOUT: %.8: type = ptr_type %C [template] +// CHECK:STDOUT: %RightShiftAssign.type: type = interface_type @RightShiftAssign [template] +// CHECK:STDOUT: %Self.2: %RightShiftAssign.type = bind_symbolic_name Self, 0 [symbolic] +// CHECK:STDOUT: %.6: type = ptr_type %C [template] // CHECK:STDOUT: %Op.type.3: type = fn_type @Op.3 [template] // CHECK:STDOUT: %Op.3: %Op.type.3 = struct_value () [template] // CHECK:STDOUT: %Op.type.4: type = fn_type @Op.4 [template] // CHECK:STDOUT: %Op.4: %Op.type.4 = struct_value () [template] -// CHECK:STDOUT: %.9: type = ptr_type %Self.2 [symbolic] -// CHECK:STDOUT: %.10: = interface_witness (%Op.3) [template] +// CHECK:STDOUT: %.7: type = ptr_type %Self.2 [symbolic] +// CHECK:STDOUT: %.8: = interface_witness (%Op.3) [template] // CHECK:STDOUT: %TestOp.type: type = fn_type @TestOp [template] // CHECK:STDOUT: %TestOp: %TestOp.type = struct_value () [template] -// CHECK:STDOUT: %.11: type = assoc_entity_type %.3, %Op.type.2 [template] -// CHECK:STDOUT: %.12: %.11 = assoc_entity element0, imports.%import_ref.9 [template] +// CHECK:STDOUT: %.9: type = assoc_entity_type %RightShift.type, %Op.type.2 [template] +// CHECK:STDOUT: %.10: %.9 = assoc_entity element0, imports.%import_ref.9 [template] // CHECK:STDOUT: %TestAssign.type: type = fn_type @TestAssign [template] // CHECK:STDOUT: %TestAssign: %TestAssign.type = struct_value () [template] -// CHECK:STDOUT: %.13: type = assoc_entity_type %.7, %Op.type.4 [template] -// CHECK:STDOUT: %.14: %.13 = assoc_entity element0, imports.%import_ref.10 [template] +// CHECK:STDOUT: %.11: type = assoc_entity_type %RightShiftAssign.type, %Op.type.4 [template] +// CHECK:STDOUT: %.12: %.11 = assoc_entity element0, imports.%import_ref.10 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -79,13 +79,13 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: import Core//prelude/operators/comparison // CHECK:STDOUT: import Core//prelude/types/bool // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.1: type = import_ref Core//prelude/operators/bitwise, inst+239, loaded [template = constants.%.3] +// CHECK:STDOUT: %import_ref.1: type = import_ref Core//prelude/operators/bitwise, inst+239, loaded [template = constants.%RightShift.type] // CHECK:STDOUT: %import_ref.2 = import_ref Core//prelude/operators/bitwise, inst+241, unloaded -// CHECK:STDOUT: %import_ref.3: %.11 = import_ref Core//prelude/operators/bitwise, inst+264, loaded [template = constants.%.12] +// CHECK:STDOUT: %import_ref.3: %.9 = import_ref Core//prelude/operators/bitwise, inst+264, loaded [template = constants.%.10] // CHECK:STDOUT: %import_ref.4: %Op.type.2 = import_ref Core//prelude/operators/bitwise, inst+259, loaded [template = constants.%Op.2] -// CHECK:STDOUT: %import_ref.5: type = import_ref Core//prelude/operators/bitwise, inst+266, loaded [template = constants.%.7] +// CHECK:STDOUT: %import_ref.5: type = import_ref Core//prelude/operators/bitwise, inst+266, loaded [template = constants.%RightShiftAssign.type] // CHECK:STDOUT: %import_ref.6 = import_ref Core//prelude/operators/bitwise, inst+268, unloaded -// CHECK:STDOUT: %import_ref.7: %.13 = import_ref Core//prelude/operators/bitwise, inst+291, loaded [template = constants.%.14] +// CHECK:STDOUT: %import_ref.7: %.11 = import_ref Core//prelude/operators/bitwise, inst+291, loaded [template = constants.%.12] // CHECK:STDOUT: %import_ref.8: %Op.type.4 = import_ref Core//prelude/operators/bitwise, inst+285, loaded [template = constants.%Op.4] // CHECK:STDOUT: %import_ref.9 = import_ref Core//prelude/operators/bitwise, inst+259, unloaded // CHECK:STDOUT: %import_ref.10 = import_ref Core//prelude/operators/bitwise, inst+285, unloaded @@ -103,12 +103,12 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: impl_decl @impl.1 [template] {} { // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %Core.ref: = name_ref Core, imports.%Core [template = imports.%Core] -// CHECK:STDOUT: %RightShift.ref: type = name_ref RightShift, imports.%import_ref.1 [template = constants.%.3] +// CHECK:STDOUT: %RightShift.ref: type = name_ref RightShift, imports.%import_ref.1 [template = constants.%RightShift.type] // CHECK:STDOUT: } // CHECK:STDOUT: impl_decl @impl.2 [template] {} { // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %Core.ref: = name_ref Core, imports.%Core [template = imports.%Core] -// CHECK:STDOUT: %RightShiftAssign.ref: type = name_ref RightShiftAssign, imports.%import_ref.5 [template = constants.%.7] +// CHECK:STDOUT: %RightShiftAssign.ref: type = name_ref RightShiftAssign, imports.%import_ref.5 [template = constants.%RightShiftAssign.type] // CHECK:STDOUT: } // CHECK:STDOUT: %TestOp.decl: %TestOp.type = fn_decl @TestOp [template = constants.%TestOp] { // CHECK:STDOUT: %a.patt: %C = binding_pattern a @@ -124,13 +124,13 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %return: ref %C = var // CHECK:STDOUT: } // CHECK:STDOUT: %TestAssign.decl: %TestAssign.type = fn_decl @TestAssign [template = constants.%TestAssign] { -// CHECK:STDOUT: %a.patt: %.8 = binding_pattern a +// CHECK:STDOUT: %a.patt: %.6 = binding_pattern a // CHECK:STDOUT: %b.patt: %C = binding_pattern b // CHECK:STDOUT: } { // CHECK:STDOUT: %C.ref.loc30_18: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %.loc30: type = ptr_type %C [template = constants.%.8] -// CHECK:STDOUT: %a.param: %.8 = param a, runtime_param0 -// CHECK:STDOUT: %a: %.8 = bind_name a, %a.param +// CHECK:STDOUT: %.loc30: type = ptr_type %C [template = constants.%.6] +// CHECK:STDOUT: %a.param: %.6 = param a, runtime_param0 +// CHECK:STDOUT: %a: %.6 = bind_name a, %a.param // CHECK:STDOUT: %C.ref.loc30_25: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %b.param: %C = param b, runtime_param1 // CHECK:STDOUT: %b: %C = bind_name b, %b.param @@ -165,7 +165,7 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %C.ref.loc18_31: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %return: ref %C = var // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc17: = interface_witness (%Op.decl) [template = constants.%.5] +// CHECK:STDOUT: %.loc17: = interface_witness (%Op.decl) [template = constants.%.4] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Op = %Op.decl @@ -174,19 +174,19 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.2: %C.ref as %RightShiftAssign.ref { // CHECK:STDOUT: %Op.decl: %Op.type.3 = fn_decl @Op.3 [template = constants.%Op.3] { -// CHECK:STDOUT: %self.patt: %.8 = binding_pattern self +// CHECK:STDOUT: %self.patt: %.6 = binding_pattern self // CHECK:STDOUT: %other.patt: %C = binding_pattern other // CHECK:STDOUT: } { // CHECK:STDOUT: %C.ref.loc23_20: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %.loc23_21: type = ptr_type %C [template = constants.%.8] -// CHECK:STDOUT: %self.param: %.8 = param self, runtime_param0 -// CHECK:STDOUT: %self: %.8 = bind_name self, %self.param -// CHECK:STDOUT: %.loc23_9: %.8 = addr_pattern %self +// CHECK:STDOUT: %.loc23_21: type = ptr_type %C [template = constants.%.6] +// CHECK:STDOUT: %self.param: %.6 = param self, runtime_param0 +// CHECK:STDOUT: %self: %.6 = bind_name self, %self.param +// CHECK:STDOUT: %.loc23_9: %.6 = addr_pattern %self // CHECK:STDOUT: %C.ref.loc23_31: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %other.param: %C = param other, runtime_param1 // CHECK:STDOUT: %other: %C = bind_name other, %other.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc22: = interface_witness (%Op.decl) [template = constants.%.10] +// CHECK:STDOUT: %.loc22: = interface_witness (%Op.decl) [template = constants.%.8] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Op = %Op.decl @@ -208,46 +208,46 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: return %.loc19_14 to %return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @Op.2(constants.%Self.1: %.3) { -// CHECK:STDOUT: %Self: %.3 = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self.1)] +// CHECK:STDOUT: generic fn @Op.2(constants.%Self.1: %RightShift.type) { +// CHECK:STDOUT: %Self: %RightShift.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self.1)] // CHECK:STDOUT: // CHECK:STDOUT: fn[%self: @Op.2.%Self (%Self.1)](%other: @Op.2.%Self (%Self.1)) -> @Op.2.%Self (%Self.1); // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Op.3[addr %self: %.8](%other: %C) { +// CHECK:STDOUT: fn @Op.3[addr %self: %.6](%other: %C) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @Op.4(constants.%Self.2: %.7) { -// CHECK:STDOUT: %Self: %.7 = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self.2)] -// CHECK:STDOUT: %.2: type = ptr_type @Op.4.%Self (%Self.2) [symbolic = %.2 (constants.%.9)] +// CHECK:STDOUT: generic fn @Op.4(constants.%Self.2: %RightShiftAssign.type) { +// CHECK:STDOUT: %Self: %RightShiftAssign.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self.2)] +// CHECK:STDOUT: %.2: type = ptr_type @Op.4.%Self (%Self.2) [symbolic = %.2 (constants.%.7)] // CHECK:STDOUT: -// CHECK:STDOUT: fn[addr %self: @Op.4.%.2 (%.9)](%other: @Op.4.%Self (%Self.2)); +// CHECK:STDOUT: fn[addr %self: @Op.4.%.2 (%.7)](%other: @Op.4.%Self (%Self.2)); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @TestOp(%a: %C, %b: %C) -> %return: %C { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: %C = name_ref a, %a // CHECK:STDOUT: %b.ref: %C = name_ref b, %b -// CHECK:STDOUT: %Op.ref: %.11 = name_ref Op, imports.%import_ref.3 [template = constants.%.12] -// CHECK:STDOUT: %.loc27_12.1: %Op.type.2 = interface_witness_access constants.%.5, element0 [template = constants.%Op.1] +// CHECK:STDOUT: %Op.ref: %.9 = name_ref Op, imports.%import_ref.3 [template = constants.%.10] +// CHECK:STDOUT: %.loc27_12.1: %Op.type.2 = interface_witness_access constants.%.4, element0 [template = constants.%Op.1] // CHECK:STDOUT: %.loc27_12.2: = bound_method %a.ref, %.loc27_12.1 // CHECK:STDOUT: %.loc26: ref %C = splice_block %return {} // CHECK:STDOUT: %Op.call: init %C = call %.loc27_12.2(%a.ref, %b.ref) to %.loc26 // CHECK:STDOUT: return %Op.call to %return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @TestAssign(%a: %.8, %b: %C) { +// CHECK:STDOUT: fn @TestAssign(%a: %.6, %b: %C) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %a.ref: %.8 = name_ref a, %a +// CHECK:STDOUT: %a.ref: %.6 = name_ref a, %a // CHECK:STDOUT: %.loc31_3.1: ref %C = deref %a.ref // CHECK:STDOUT: %b.ref: %C = name_ref b, %b -// CHECK:STDOUT: %Op.ref: %.13 = name_ref Op, imports.%import_ref.7 [template = constants.%.14] -// CHECK:STDOUT: %.loc31_6.1: %Op.type.4 = interface_witness_access constants.%.10, element0 [template = constants.%Op.3] +// CHECK:STDOUT: %Op.ref: %.11 = name_ref Op, imports.%import_ref.7 [template = constants.%.12] +// CHECK:STDOUT: %.loc31_6.1: %Op.type.4 = interface_witness_access constants.%.8, element0 [template = constants.%Op.3] // CHECK:STDOUT: %.loc31_6.2: = bound_method %.loc31_3.1, %.loc31_6.1 -// CHECK:STDOUT: %.loc31_3.2: %.8 = addr_of %.loc31_3.1 -// CHECK:STDOUT: %Op.call: init %.4 = call %.loc31_6.2(%.loc31_3.2, %b.ref) +// CHECK:STDOUT: %.loc31_3.2: %.6 = addr_of %.loc31_3.1 +// CHECK:STDOUT: %Op.call: init %.3 = call %.loc31_6.2(%.loc31_3.2, %b.ref) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -261,11 +261,11 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: // CHECK:STDOUT: specific @Op.4(constants.%Self.2) { // CHECK:STDOUT: %Self => constants.%Self.2 -// CHECK:STDOUT: %.2 => constants.%.9 +// CHECK:STDOUT: %.2 => constants.%.7 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Op.4(constants.%C) { // CHECK:STDOUT: %Self => constants.%C -// CHECK:STDOUT: %.2 => constants.%.8 +// CHECK:STDOUT: %.2 => constants.%.6 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/operators/overloaded/sub.carbon b/toolchain/check/testdata/operators/overloaded/sub.carbon index 1598b24e581f3..0fb92a20f28eb 100644 --- a/toolchain/check/testdata/operators/overloaded/sub.carbon +++ b/toolchain/check/testdata/operators/overloaded/sub.carbon @@ -37,33 +37,33 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %.1: type = struct_type {} [template] // CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] -// CHECK:STDOUT: %.3: type = interface_type @Sub [template] -// CHECK:STDOUT: %Self.1: %.3 = bind_symbolic_name Self, 0 [symbolic] +// CHECK:STDOUT: %Sub.type: type = interface_type @Sub [template] +// CHECK:STDOUT: %Self.1: %Sub.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %Op.type.1: type = fn_type @Op.1 [template] -// CHECK:STDOUT: %.4: type = tuple_type () [template] +// CHECK:STDOUT: %.3: type = tuple_type () [template] // CHECK:STDOUT: %Op.1: %Op.type.1 = struct_value () [template] // CHECK:STDOUT: %Op.type.2: type = fn_type @Op.2 [template] // CHECK:STDOUT: %Op.2: %Op.type.2 = struct_value () [template] -// CHECK:STDOUT: %.5: = interface_witness (%Op.1) [template] -// CHECK:STDOUT: %.6: type = ptr_type %.1 [template] +// CHECK:STDOUT: %.4: = interface_witness (%Op.1) [template] +// CHECK:STDOUT: %.5: type = ptr_type %.1 [template] // CHECK:STDOUT: %struct: %C = struct_value () [template] -// CHECK:STDOUT: %.7: type = interface_type @SubAssign [template] -// CHECK:STDOUT: %Self.2: %.7 = bind_symbolic_name Self, 0 [symbolic] -// CHECK:STDOUT: %.8: type = ptr_type %C [template] +// CHECK:STDOUT: %SubAssign.type: type = interface_type @SubAssign [template] +// CHECK:STDOUT: %Self.2: %SubAssign.type = bind_symbolic_name Self, 0 [symbolic] +// CHECK:STDOUT: %.6: type = ptr_type %C [template] // CHECK:STDOUT: %Op.type.3: type = fn_type @Op.3 [template] // CHECK:STDOUT: %Op.3: %Op.type.3 = struct_value () [template] // CHECK:STDOUT: %Op.type.4: type = fn_type @Op.4 [template] // CHECK:STDOUT: %Op.4: %Op.type.4 = struct_value () [template] -// CHECK:STDOUT: %.9: type = ptr_type %Self.2 [symbolic] -// CHECK:STDOUT: %.10: = interface_witness (%Op.3) [template] +// CHECK:STDOUT: %.7: type = ptr_type %Self.2 [symbolic] +// CHECK:STDOUT: %.8: = interface_witness (%Op.3) [template] // CHECK:STDOUT: %TestOp.type: type = fn_type @TestOp [template] // CHECK:STDOUT: %TestOp: %TestOp.type = struct_value () [template] -// CHECK:STDOUT: %.11: type = assoc_entity_type %.3, %Op.type.2 [template] -// CHECK:STDOUT: %.12: %.11 = assoc_entity element0, imports.%import_ref.9 [template] +// CHECK:STDOUT: %.9: type = assoc_entity_type %Sub.type, %Op.type.2 [template] +// CHECK:STDOUT: %.10: %.9 = assoc_entity element0, imports.%import_ref.9 [template] // CHECK:STDOUT: %TestAssign.type: type = fn_type @TestAssign [template] // CHECK:STDOUT: %TestAssign: %TestAssign.type = struct_value () [template] -// CHECK:STDOUT: %.13: type = assoc_entity_type %.7, %Op.type.4 [template] -// CHECK:STDOUT: %.14: %.13 = assoc_entity element0, imports.%import_ref.10 [template] +// CHECK:STDOUT: %.11: type = assoc_entity_type %SubAssign.type, %Op.type.4 [template] +// CHECK:STDOUT: %.12: %.11 = assoc_entity element0, imports.%import_ref.10 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -79,13 +79,13 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: import Core//prelude/operators/comparison // CHECK:STDOUT: import Core//prelude/types/bool // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.1: type = import_ref Core//prelude/operators/arithmetic, inst+98, loaded [template = constants.%.3] +// CHECK:STDOUT: %import_ref.1: type = import_ref Core//prelude/operators/arithmetic, inst+98, loaded [template = constants.%Sub.type] // CHECK:STDOUT: %import_ref.2 = import_ref Core//prelude/operators/arithmetic, inst+100, unloaded -// CHECK:STDOUT: %import_ref.3: %.11 = import_ref Core//prelude/operators/arithmetic, inst+123, loaded [template = constants.%.12] +// CHECK:STDOUT: %import_ref.3: %.9 = import_ref Core//prelude/operators/arithmetic, inst+123, loaded [template = constants.%.10] // CHECK:STDOUT: %import_ref.4: %Op.type.2 = import_ref Core//prelude/operators/arithmetic, inst+118, loaded [template = constants.%Op.2] -// CHECK:STDOUT: %import_ref.5: type = import_ref Core//prelude/operators/arithmetic, inst+125, loaded [template = constants.%.7] +// CHECK:STDOUT: %import_ref.5: type = import_ref Core//prelude/operators/arithmetic, inst+125, loaded [template = constants.%SubAssign.type] // CHECK:STDOUT: %import_ref.6 = import_ref Core//prelude/operators/arithmetic, inst+127, unloaded -// CHECK:STDOUT: %import_ref.7: %.13 = import_ref Core//prelude/operators/arithmetic, inst+150, loaded [template = constants.%.14] +// CHECK:STDOUT: %import_ref.7: %.11 = import_ref Core//prelude/operators/arithmetic, inst+150, loaded [template = constants.%.12] // CHECK:STDOUT: %import_ref.8: %Op.type.4 = import_ref Core//prelude/operators/arithmetic, inst+144, loaded [template = constants.%Op.4] // CHECK:STDOUT: %import_ref.9 = import_ref Core//prelude/operators/arithmetic, inst+118, unloaded // CHECK:STDOUT: %import_ref.10 = import_ref Core//prelude/operators/arithmetic, inst+144, unloaded @@ -103,12 +103,12 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: impl_decl @impl.1 [template] {} { // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %Core.ref: = name_ref Core, imports.%Core [template = imports.%Core] -// CHECK:STDOUT: %Sub.ref: type = name_ref Sub, imports.%import_ref.1 [template = constants.%.3] +// CHECK:STDOUT: %Sub.ref: type = name_ref Sub, imports.%import_ref.1 [template = constants.%Sub.type] // CHECK:STDOUT: } // CHECK:STDOUT: impl_decl @impl.2 [template] {} { // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %Core.ref: = name_ref Core, imports.%Core [template = imports.%Core] -// CHECK:STDOUT: %SubAssign.ref: type = name_ref SubAssign, imports.%import_ref.5 [template = constants.%.7] +// CHECK:STDOUT: %SubAssign.ref: type = name_ref SubAssign, imports.%import_ref.5 [template = constants.%SubAssign.type] // CHECK:STDOUT: } // CHECK:STDOUT: %TestOp.decl: %TestOp.type = fn_decl @TestOp [template = constants.%TestOp] { // CHECK:STDOUT: %a.patt: %C = binding_pattern a @@ -124,13 +124,13 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %return: ref %C = var // CHECK:STDOUT: } // CHECK:STDOUT: %TestAssign.decl: %TestAssign.type = fn_decl @TestAssign [template = constants.%TestAssign] { -// CHECK:STDOUT: %a.patt: %.8 = binding_pattern a +// CHECK:STDOUT: %a.patt: %.6 = binding_pattern a // CHECK:STDOUT: %b.patt: %C = binding_pattern b // CHECK:STDOUT: } { // CHECK:STDOUT: %C.ref.loc30_18: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %.loc30: type = ptr_type %C [template = constants.%.8] -// CHECK:STDOUT: %a.param: %.8 = param a, runtime_param0 -// CHECK:STDOUT: %a: %.8 = bind_name a, %a.param +// CHECK:STDOUT: %.loc30: type = ptr_type %C [template = constants.%.6] +// CHECK:STDOUT: %a.param: %.6 = param a, runtime_param0 +// CHECK:STDOUT: %a: %.6 = bind_name a, %a.param // CHECK:STDOUT: %C.ref.loc30_25: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %b.param: %C = param b, runtime_param1 // CHECK:STDOUT: %b: %C = bind_name b, %b.param @@ -165,7 +165,7 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %C.ref.loc18_31: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %return: ref %C = var // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc17: = interface_witness (%Op.decl) [template = constants.%.5] +// CHECK:STDOUT: %.loc17: = interface_witness (%Op.decl) [template = constants.%.4] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Op = %Op.decl @@ -174,19 +174,19 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.2: %C.ref as %SubAssign.ref { // CHECK:STDOUT: %Op.decl: %Op.type.3 = fn_decl @Op.3 [template = constants.%Op.3] { -// CHECK:STDOUT: %self.patt: %.8 = binding_pattern self +// CHECK:STDOUT: %self.patt: %.6 = binding_pattern self // CHECK:STDOUT: %other.patt: %C = binding_pattern other // CHECK:STDOUT: } { // CHECK:STDOUT: %C.ref.loc23_20: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %.loc23_21: type = ptr_type %C [template = constants.%.8] -// CHECK:STDOUT: %self.param: %.8 = param self, runtime_param0 -// CHECK:STDOUT: %self: %.8 = bind_name self, %self.param -// CHECK:STDOUT: %.loc23_9: %.8 = addr_pattern %self +// CHECK:STDOUT: %.loc23_21: type = ptr_type %C [template = constants.%.6] +// CHECK:STDOUT: %self.param: %.6 = param self, runtime_param0 +// CHECK:STDOUT: %self: %.6 = bind_name self, %self.param +// CHECK:STDOUT: %.loc23_9: %.6 = addr_pattern %self // CHECK:STDOUT: %C.ref.loc23_31: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %other.param: %C = param other, runtime_param1 // CHECK:STDOUT: %other: %C = bind_name other, %other.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc22: = interface_witness (%Op.decl) [template = constants.%.10] +// CHECK:STDOUT: %.loc22: = interface_witness (%Op.decl) [template = constants.%.8] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Op = %Op.decl @@ -208,46 +208,46 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: return %.loc19_14 to %return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @Op.2(constants.%Self.1: %.3) { -// CHECK:STDOUT: %Self: %.3 = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self.1)] +// CHECK:STDOUT: generic fn @Op.2(constants.%Self.1: %Sub.type) { +// CHECK:STDOUT: %Self: %Sub.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self.1)] // CHECK:STDOUT: // CHECK:STDOUT: fn[%self: @Op.2.%Self (%Self.1)](%other: @Op.2.%Self (%Self.1)) -> @Op.2.%Self (%Self.1); // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Op.3[addr %self: %.8](%other: %C) { +// CHECK:STDOUT: fn @Op.3[addr %self: %.6](%other: %C) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @Op.4(constants.%Self.2: %.7) { -// CHECK:STDOUT: %Self: %.7 = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self.2)] -// CHECK:STDOUT: %.2: type = ptr_type @Op.4.%Self (%Self.2) [symbolic = %.2 (constants.%.9)] +// CHECK:STDOUT: generic fn @Op.4(constants.%Self.2: %SubAssign.type) { +// CHECK:STDOUT: %Self: %SubAssign.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self.2)] +// CHECK:STDOUT: %.2: type = ptr_type @Op.4.%Self (%Self.2) [symbolic = %.2 (constants.%.7)] // CHECK:STDOUT: -// CHECK:STDOUT: fn[addr %self: @Op.4.%.2 (%.9)](%other: @Op.4.%Self (%Self.2)); +// CHECK:STDOUT: fn[addr %self: @Op.4.%.2 (%.7)](%other: @Op.4.%Self (%Self.2)); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @TestOp(%a: %C, %b: %C) -> %return: %C { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: %C = name_ref a, %a // CHECK:STDOUT: %b.ref: %C = name_ref b, %b -// CHECK:STDOUT: %Op.ref: %.11 = name_ref Op, imports.%import_ref.3 [template = constants.%.12] -// CHECK:STDOUT: %.loc27_12.1: %Op.type.2 = interface_witness_access constants.%.5, element0 [template = constants.%Op.1] +// CHECK:STDOUT: %Op.ref: %.9 = name_ref Op, imports.%import_ref.3 [template = constants.%.10] +// CHECK:STDOUT: %.loc27_12.1: %Op.type.2 = interface_witness_access constants.%.4, element0 [template = constants.%Op.1] // CHECK:STDOUT: %.loc27_12.2: = bound_method %a.ref, %.loc27_12.1 // CHECK:STDOUT: %.loc26: ref %C = splice_block %return {} // CHECK:STDOUT: %Op.call: init %C = call %.loc27_12.2(%a.ref, %b.ref) to %.loc26 // CHECK:STDOUT: return %Op.call to %return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @TestAssign(%a: %.8, %b: %C) { +// CHECK:STDOUT: fn @TestAssign(%a: %.6, %b: %C) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %a.ref: %.8 = name_ref a, %a +// CHECK:STDOUT: %a.ref: %.6 = name_ref a, %a // CHECK:STDOUT: %.loc31_3.1: ref %C = deref %a.ref // CHECK:STDOUT: %b.ref: %C = name_ref b, %b -// CHECK:STDOUT: %Op.ref: %.13 = name_ref Op, imports.%import_ref.7 [template = constants.%.14] -// CHECK:STDOUT: %.loc31_6.1: %Op.type.4 = interface_witness_access constants.%.10, element0 [template = constants.%Op.3] +// CHECK:STDOUT: %Op.ref: %.11 = name_ref Op, imports.%import_ref.7 [template = constants.%.12] +// CHECK:STDOUT: %.loc31_6.1: %Op.type.4 = interface_witness_access constants.%.8, element0 [template = constants.%Op.3] // CHECK:STDOUT: %.loc31_6.2: = bound_method %.loc31_3.1, %.loc31_6.1 -// CHECK:STDOUT: %.loc31_3.2: %.8 = addr_of %.loc31_3.1 -// CHECK:STDOUT: %Op.call: init %.4 = call %.loc31_6.2(%.loc31_3.2, %b.ref) +// CHECK:STDOUT: %.loc31_3.2: %.6 = addr_of %.loc31_3.1 +// CHECK:STDOUT: %Op.call: init %.3 = call %.loc31_6.2(%.loc31_3.2, %b.ref) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -261,11 +261,11 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: // CHECK:STDOUT: specific @Op.4(constants.%Self.2) { // CHECK:STDOUT: %Self => constants.%Self.2 -// CHECK:STDOUT: %.2 => constants.%.9 +// CHECK:STDOUT: %.2 => constants.%.7 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Op.4(constants.%C) { // CHECK:STDOUT: %Self => constants.%C -// CHECK:STDOUT: %.2 => constants.%.8 +// CHECK:STDOUT: %.2 => constants.%.6 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/pointer/fail_type_mismatch.carbon b/toolchain/check/testdata/pointer/fail_type_mismatch.carbon index d704ce658afde..93bc2730cfc89 100644 --- a/toolchain/check/testdata/pointer/fail_type_mismatch.carbon +++ b/toolchain/check/testdata/pointer/fail_type_mismatch.carbon @@ -29,22 +29,22 @@ fn ConstMismatch(p: const {}*) -> const ({}*) { // CHECK:STDOUT: %ConstMismatch.type: type = fn_type @ConstMismatch [template] // CHECK:STDOUT: %.6: type = tuple_type () [template] // CHECK:STDOUT: %ConstMismatch: %ConstMismatch.type = struct_value () [template] -// CHECK:STDOUT: %ImplicitAs.type: type = generic_interface_type @ImplicitAs [template] -// CHECK:STDOUT: %ImplicitAs: %ImplicitAs.type = struct_value () [template] +// CHECK:STDOUT: %ImplicitAs.type.1: type = generic_interface_type @ImplicitAs [template] +// CHECK:STDOUT: %ImplicitAs: %ImplicitAs.type.1 = struct_value () [template] // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic] -// CHECK:STDOUT: %.7: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic] -// CHECK:STDOUT: %Self.1: @ImplicitAs.%.1 (%.7) = bind_symbolic_name Self, 1 [symbolic] -// CHECK:STDOUT: %Self.2: %.7 = bind_symbolic_name Self, 1 [symbolic] +// CHECK:STDOUT: %ImplicitAs.type.2: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic] +// CHECK:STDOUT: %Self.1: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2) = bind_symbolic_name Self, 1 [symbolic] +// CHECK:STDOUT: %Self.2: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: %Convert.type.1: type = fn_type @Convert, @ImplicitAs(%Dest) [symbolic] // CHECK:STDOUT: %Convert.1: %Convert.type.1 = struct_value () [symbolic] -// CHECK:STDOUT: %.8: type = assoc_entity_type %.7, %Convert.type.1 [symbolic] -// CHECK:STDOUT: %.9: %.8 = assoc_entity element0, imports.%import_ref.5 [symbolic] -// CHECK:STDOUT: %.10: type = interface_type @ImplicitAs, @ImplicitAs(%.5) [template] +// CHECK:STDOUT: %.7: type = assoc_entity_type %ImplicitAs.type.2, %Convert.type.1 [symbolic] +// CHECK:STDOUT: %.8: %.7 = assoc_entity element0, imports.%import_ref.5 [symbolic] +// CHECK:STDOUT: %ImplicitAs.type.3: type = interface_type @ImplicitAs, @ImplicitAs(%.5) [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert, @ImplicitAs(%.5) [template] // CHECK:STDOUT: %Convert.2: %Convert.type.2 = struct_value () [template] -// CHECK:STDOUT: %.11: type = assoc_entity_type %.10, %Convert.type.2 [template] -// CHECK:STDOUT: %.12: %.11 = assoc_entity element0, imports.%import_ref.5 [template] -// CHECK:STDOUT: %.13: %.8 = assoc_entity element0, imports.%import_ref.6 [symbolic] +// CHECK:STDOUT: %.9: type = assoc_entity_type %ImplicitAs.type.3, %Convert.type.2 [template] +// CHECK:STDOUT: %.10: %.9 = assoc_entity element0, imports.%import_ref.5 [template] +// CHECK:STDOUT: %.11: %.7 = assoc_entity element0, imports.%import_ref.6 [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -59,9 +59,9 @@ fn ConstMismatch(p: const {}*) -> const ({}*) { // CHECK:STDOUT: import Core//prelude/operators/comparison // CHECK:STDOUT: import Core//prelude/types/bool // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.1: %ImplicitAs.type = import_ref Core//prelude/operators/as, inst+40, loaded [template = constants.%ImplicitAs] +// CHECK:STDOUT: %import_ref.1: %ImplicitAs.type.1 = import_ref Core//prelude/operators/as, inst+40, loaded [template = constants.%ImplicitAs] // CHECK:STDOUT: %import_ref.2 = import_ref Core//prelude/operators/as, inst+45, unloaded -// CHECK:STDOUT: %import_ref.3: @ImplicitAs.%.2 (%.8) = import_ref Core//prelude/operators/as, inst+63, loaded [symbolic = @ImplicitAs.%.3 (constants.%.13)] +// CHECK:STDOUT: %import_ref.3: @ImplicitAs.%.1 (%.7) = import_ref Core//prelude/operators/as, inst+63, loaded [symbolic = @ImplicitAs.%.2 (constants.%.11)] // CHECK:STDOUT: %import_ref.4 = import_ref Core//prelude/operators/as, inst+56, unloaded // CHECK:STDOUT: %import_ref.5 = import_ref Core//prelude/operators/as, inst+56, unloaded // CHECK:STDOUT: %import_ref.6 = import_ref Core//prelude/operators/as, inst+56, unloaded @@ -94,12 +94,12 @@ fn ConstMismatch(p: const {}*) -> const ({}*) { // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic = %Dest (constants.%Dest)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.1: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic = %.1 (constants.%.7)] -// CHECK:STDOUT: %Self: %.7 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] +// CHECK:STDOUT: %ImplicitAs.type: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.2)] +// CHECK:STDOUT: %Self: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] // CHECK:STDOUT: %Convert.type: type = fn_type @Convert, @ImplicitAs(%Dest) [symbolic = %Convert.type (constants.%Convert.type.1)] // CHECK:STDOUT: %Convert: @ImplicitAs.%Convert.type (%Convert.type.1) = struct_value () [symbolic = %Convert (constants.%Convert.1)] -// CHECK:STDOUT: %.2: type = assoc_entity_type @ImplicitAs.%.1 (%.7), @ImplicitAs.%Convert.type (%Convert.type.1) [symbolic = %.2 (constants.%.8)] -// CHECK:STDOUT: %.3: @ImplicitAs.%.2 (%.8) = assoc_entity element0, imports.%import_ref.5 [symbolic = %.3 (constants.%.9)] +// CHECK:STDOUT: %.1: type = assoc_entity_type @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2), @ImplicitAs.%Convert.type (%Convert.type.1) [symbolic = %.1 (constants.%.7)] +// CHECK:STDOUT: %.2: @ImplicitAs.%.1 (%.7) = assoc_entity element0, imports.%import_ref.5 [symbolic = %.2 (constants.%.8)] // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: !members: @@ -112,17 +112,17 @@ fn ConstMismatch(p: const {}*) -> const ({}*) { // CHECK:STDOUT: fn @ConstMismatch(%p: %.3) -> %.5 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %p.ref: %.3 = name_ref p, %p -// CHECK:STDOUT: %.loc18_11.1: type = interface_type @ImplicitAs, @ImplicitAs(constants.%.5) [template = constants.%.10] -// CHECK:STDOUT: %.loc18_11.2: %.11 = specific_constant imports.%import_ref.3, @ImplicitAs(constants.%.5) [template = constants.%.12] -// CHECK:STDOUT: %Convert.ref: %.11 = name_ref Convert, %.loc18_11.2 [template = constants.%.12] -// CHECK:STDOUT: %.loc18_11.3: %.5 = converted %p.ref, [template = ] +// CHECK:STDOUT: %ImplicitAs.type: type = interface_type @ImplicitAs, @ImplicitAs(constants.%.5) [template = constants.%ImplicitAs.type.3] +// CHECK:STDOUT: %.loc18_11.1: %.9 = specific_constant imports.%import_ref.3, @ImplicitAs(constants.%.5) [template = constants.%.10] +// CHECK:STDOUT: %Convert.ref: %.9 = name_ref Convert, %.loc18_11.1 [template = constants.%.10] +// CHECK:STDOUT: %.loc18_11.2: %.5 = converted %p.ref, [template = ] // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @Convert(constants.%Dest: type, constants.%Self.1: @ImplicitAs.%.1 (%.7)) { +// CHECK:STDOUT: generic fn @Convert(constants.%Dest: type, constants.%Self.1: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2)) { // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic = %Dest (constants.%Dest)] -// CHECK:STDOUT: %.1: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic = %.1 (constants.%.7)] -// CHECK:STDOUT: %Self: %.7 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] +// CHECK:STDOUT: %ImplicitAs.type: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.2)] +// CHECK:STDOUT: %Self: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] // CHECK:STDOUT: // CHECK:STDOUT: fn[%self: @Convert.%Self (%Self.2)]() -> @Convert.%Dest (%Dest); // CHECK:STDOUT: } @@ -141,7 +141,7 @@ fn ConstMismatch(p: const {}*) -> const ({}*) { // CHECK:STDOUT: // CHECK:STDOUT: specific @Convert(constants.%Dest, constants.%Self.1) { // CHECK:STDOUT: %Dest => constants.%Dest -// CHECK:STDOUT: %.1 => constants.%.7 +// CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.2 // CHECK:STDOUT: %Self => constants.%Self.1 // CHECK:STDOUT: } // CHECK:STDOUT: @@ -149,11 +149,11 @@ fn ConstMismatch(p: const {}*) -> const ({}*) { // CHECK:STDOUT: %Dest => constants.%.5 // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.1 => constants.%.10 +// CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.3 // CHECK:STDOUT: %Self => constants.%Self.2 // CHECK:STDOUT: %Convert.type => constants.%Convert.type.2 // CHECK:STDOUT: %Convert => constants.%Convert.2 -// CHECK:STDOUT: %.2 => constants.%.11 -// CHECK:STDOUT: %.3 => constants.%.12 +// CHECK:STDOUT: %.1 => constants.%.9 +// CHECK:STDOUT: %.2 => constants.%.10 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/return/fail_type_mismatch.carbon b/toolchain/check/testdata/return/fail_type_mismatch.carbon index 8e4161128f470..8419f7bc08b78 100644 --- a/toolchain/check/testdata/return/fail_type_mismatch.carbon +++ b/toolchain/check/testdata/return/fail_type_mismatch.carbon @@ -27,22 +27,22 @@ fn Main() -> i32 { // CHECK:STDOUT: %Main.type: type = fn_type @Main [template] // CHECK:STDOUT: %Main: %Main.type = struct_value () [template] // CHECK:STDOUT: %.2: f64 = float_literal 1 [template] -// CHECK:STDOUT: %ImplicitAs.type: type = generic_interface_type @ImplicitAs [template] -// CHECK:STDOUT: %ImplicitAs: %ImplicitAs.type = struct_value () [template] +// CHECK:STDOUT: %ImplicitAs.type.1: type = generic_interface_type @ImplicitAs [template] +// CHECK:STDOUT: %ImplicitAs: %ImplicitAs.type.1 = struct_value () [template] // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic] -// CHECK:STDOUT: %.3: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic] -// CHECK:STDOUT: %Self.1: @ImplicitAs.%.1 (%.3) = bind_symbolic_name Self, 1 [symbolic] -// CHECK:STDOUT: %Self.2: %.3 = bind_symbolic_name Self, 1 [symbolic] +// CHECK:STDOUT: %ImplicitAs.type.2: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic] +// CHECK:STDOUT: %Self.1: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2) = bind_symbolic_name Self, 1 [symbolic] +// CHECK:STDOUT: %Self.2: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: %Convert.type.1: type = fn_type @Convert, @ImplicitAs(%Dest) [symbolic] // CHECK:STDOUT: %Convert.1: %Convert.type.1 = struct_value () [symbolic] -// CHECK:STDOUT: %.4: type = assoc_entity_type %.3, %Convert.type.1 [symbolic] -// CHECK:STDOUT: %.5: %.4 = assoc_entity element0, imports.%import_ref.6 [symbolic] -// CHECK:STDOUT: %.6: type = interface_type @ImplicitAs, @ImplicitAs(i32) [template] +// CHECK:STDOUT: %.3: type = assoc_entity_type %ImplicitAs.type.2, %Convert.type.1 [symbolic] +// CHECK:STDOUT: %.4: %.3 = assoc_entity element0, imports.%import_ref.6 [symbolic] +// CHECK:STDOUT: %ImplicitAs.type.3: type = interface_type @ImplicitAs, @ImplicitAs(i32) [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert, @ImplicitAs(i32) [template] // CHECK:STDOUT: %Convert.2: %Convert.type.2 = struct_value () [template] -// CHECK:STDOUT: %.7: type = assoc_entity_type %.6, %Convert.type.2 [template] -// CHECK:STDOUT: %.8: %.7 = assoc_entity element0, imports.%import_ref.6 [template] -// CHECK:STDOUT: %.9: %.4 = assoc_entity element0, imports.%import_ref.7 [symbolic] +// CHECK:STDOUT: %.5: type = assoc_entity_type %ImplicitAs.type.3, %Convert.type.2 [template] +// CHECK:STDOUT: %.6: %.5 = assoc_entity element0, imports.%import_ref.6 [template] +// CHECK:STDOUT: %.7: %.3 = assoc_entity element0, imports.%import_ref.7 [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -59,9 +59,9 @@ fn Main() -> i32 { // CHECK:STDOUT: import Core//prelude/types/bool // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref Core//prelude/types, inst+4, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.2: %ImplicitAs.type = import_ref Core//prelude/operators/as, inst+40, loaded [template = constants.%ImplicitAs] +// CHECK:STDOUT: %import_ref.2: %ImplicitAs.type.1 = import_ref Core//prelude/operators/as, inst+40, loaded [template = constants.%ImplicitAs] // CHECK:STDOUT: %import_ref.3 = import_ref Core//prelude/operators/as, inst+45, unloaded -// CHECK:STDOUT: %import_ref.4: @ImplicitAs.%.2 (%.4) = import_ref Core//prelude/operators/as, inst+63, loaded [symbolic = @ImplicitAs.%.3 (constants.%.9)] +// CHECK:STDOUT: %import_ref.4: @ImplicitAs.%.1 (%.3) = import_ref Core//prelude/operators/as, inst+63, loaded [symbolic = @ImplicitAs.%.2 (constants.%.7)] // CHECK:STDOUT: %import_ref.5 = import_ref Core//prelude/operators/as, inst+56, unloaded // CHECK:STDOUT: %import_ref.6 = import_ref Core//prelude/operators/as, inst+56, unloaded // CHECK:STDOUT: %import_ref.7 = import_ref Core//prelude/operators/as, inst+56, unloaded @@ -85,12 +85,12 @@ fn Main() -> i32 { // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic = %Dest (constants.%Dest)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.1: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic = %.1 (constants.%.3)] -// CHECK:STDOUT: %Self: %.3 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] +// CHECK:STDOUT: %ImplicitAs.type: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.2)] +// CHECK:STDOUT: %Self: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] // CHECK:STDOUT: %Convert.type: type = fn_type @Convert, @ImplicitAs(%Dest) [symbolic = %Convert.type (constants.%Convert.type.1)] // CHECK:STDOUT: %Convert: @ImplicitAs.%Convert.type (%Convert.type.1) = struct_value () [symbolic = %Convert (constants.%Convert.1)] -// CHECK:STDOUT: %.2: type = assoc_entity_type @ImplicitAs.%.1 (%.3), @ImplicitAs.%Convert.type (%Convert.type.1) [symbolic = %.2 (constants.%.4)] -// CHECK:STDOUT: %.3: @ImplicitAs.%.2 (%.4) = assoc_entity element0, imports.%import_ref.6 [symbolic = %.3 (constants.%.5)] +// CHECK:STDOUT: %.1: type = assoc_entity_type @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2), @ImplicitAs.%Convert.type (%Convert.type.1) [symbolic = %.1 (constants.%.3)] +// CHECK:STDOUT: %.2: @ImplicitAs.%.1 (%.3) = assoc_entity element0, imports.%import_ref.6 [symbolic = %.2 (constants.%.4)] // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: !members: @@ -105,17 +105,17 @@ fn Main() -> i32 { // CHECK:STDOUT: fn @Main() -> i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %.loc18_10: f64 = float_literal 1 [template = constants.%.2] -// CHECK:STDOUT: %.loc18_13.1: type = interface_type @ImplicitAs, @ImplicitAs(i32) [template = constants.%.6] -// CHECK:STDOUT: %.loc18_13.2: %.7 = specific_constant imports.%import_ref.4, @ImplicitAs(i32) [template = constants.%.8] -// CHECK:STDOUT: %Convert.ref: %.7 = name_ref Convert, %.loc18_13.2 [template = constants.%.8] -// CHECK:STDOUT: %.loc18_13.3: i32 = converted %.loc18_10, [template = ] +// CHECK:STDOUT: %ImplicitAs.type: type = interface_type @ImplicitAs, @ImplicitAs(i32) [template = constants.%ImplicitAs.type.3] +// CHECK:STDOUT: %.loc18_13.1: %.5 = specific_constant imports.%import_ref.4, @ImplicitAs(i32) [template = constants.%.6] +// CHECK:STDOUT: %Convert.ref: %.5 = name_ref Convert, %.loc18_13.1 [template = constants.%.6] +// CHECK:STDOUT: %.loc18_13.2: i32 = converted %.loc18_10, [template = ] // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @Convert(constants.%Dest: type, constants.%Self.1: @ImplicitAs.%.1 (%.3)) { +// CHECK:STDOUT: generic fn @Convert(constants.%Dest: type, constants.%Self.1: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2)) { // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic = %Dest (constants.%Dest)] -// CHECK:STDOUT: %.1: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic = %.1 (constants.%.3)] -// CHECK:STDOUT: %Self: %.3 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] +// CHECK:STDOUT: %ImplicitAs.type: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.2)] +// CHECK:STDOUT: %Self: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] // CHECK:STDOUT: // CHECK:STDOUT: fn[%self: @Convert.%Self (%Self.2)]() -> @Convert.%Dest (%Dest); // CHECK:STDOUT: } @@ -134,7 +134,7 @@ fn Main() -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: specific @Convert(constants.%Dest, constants.%Self.1) { // CHECK:STDOUT: %Dest => constants.%Dest -// CHECK:STDOUT: %.1 => constants.%.3 +// CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.2 // CHECK:STDOUT: %Self => constants.%Self.1 // CHECK:STDOUT: } // CHECK:STDOUT: @@ -142,11 +142,11 @@ fn Main() -> i32 { // CHECK:STDOUT: %Dest => i32 // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.1 => constants.%.6 +// CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.3 // CHECK:STDOUT: %Self => constants.%Self.2 // CHECK:STDOUT: %Convert.type => constants.%Convert.type.2 // CHECK:STDOUT: %Convert => constants.%Convert.2 -// CHECK:STDOUT: %.2 => constants.%.7 -// CHECK:STDOUT: %.3 => constants.%.8 +// CHECK:STDOUT: %.1 => constants.%.5 +// CHECK:STDOUT: %.2 => constants.%.6 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/struct/fail_type_assign.carbon b/toolchain/check/testdata/struct/fail_type_assign.carbon index 4fecf2f5e3226..bf4a32fce6c21 100644 --- a/toolchain/check/testdata/struct/fail_type_assign.carbon +++ b/toolchain/check/testdata/struct/fail_type_assign.carbon @@ -23,22 +23,22 @@ var x: {.a: i32} = {.a: i32}; // CHECK:STDOUT: %.1: type = tuple_type () [template] // CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %.2: type = struct_type {.a: i32} [template] -// CHECK:STDOUT: %ImplicitAs.type: type = generic_interface_type @ImplicitAs [template] -// CHECK:STDOUT: %ImplicitAs: %ImplicitAs.type = struct_value () [template] +// CHECK:STDOUT: %ImplicitAs.type.1: type = generic_interface_type @ImplicitAs [template] +// CHECK:STDOUT: %ImplicitAs: %ImplicitAs.type.1 = struct_value () [template] // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic] -// CHECK:STDOUT: %.3: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic] -// CHECK:STDOUT: %Self.1: @ImplicitAs.%.1 (%.3) = bind_symbolic_name Self, 1 [symbolic] -// CHECK:STDOUT: %Self.2: %.3 = bind_symbolic_name Self, 1 [symbolic] +// CHECK:STDOUT: %ImplicitAs.type.2: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic] +// CHECK:STDOUT: %Self.1: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2) = bind_symbolic_name Self, 1 [symbolic] +// CHECK:STDOUT: %Self.2: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: %Convert.type.1: type = fn_type @Convert, @ImplicitAs(%Dest) [symbolic] // CHECK:STDOUT: %Convert.1: %Convert.type.1 = struct_value () [symbolic] -// CHECK:STDOUT: %.4: type = assoc_entity_type %.3, %Convert.type.1 [symbolic] -// CHECK:STDOUT: %.5: %.4 = assoc_entity element0, imports.%import_ref.6 [symbolic] -// CHECK:STDOUT: %.6: type = interface_type @ImplicitAs, @ImplicitAs(%.2) [template] +// CHECK:STDOUT: %.3: type = assoc_entity_type %ImplicitAs.type.2, %Convert.type.1 [symbolic] +// CHECK:STDOUT: %.4: %.3 = assoc_entity element0, imports.%import_ref.6 [symbolic] +// CHECK:STDOUT: %ImplicitAs.type.3: type = interface_type @ImplicitAs, @ImplicitAs(%.2) [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert, @ImplicitAs(%.2) [template] // CHECK:STDOUT: %Convert.2: %Convert.type.2 = struct_value () [template] -// CHECK:STDOUT: %.7: type = assoc_entity_type %.6, %Convert.type.2 [template] -// CHECK:STDOUT: %.8: %.7 = assoc_entity element0, imports.%import_ref.6 [template] -// CHECK:STDOUT: %.9: %.4 = assoc_entity element0, imports.%import_ref.7 [symbolic] +// CHECK:STDOUT: %.5: type = assoc_entity_type %ImplicitAs.type.3, %Convert.type.2 [template] +// CHECK:STDOUT: %.6: %.5 = assoc_entity element0, imports.%import_ref.6 [template] +// CHECK:STDOUT: %.7: %.3 = assoc_entity element0, imports.%import_ref.7 [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -55,9 +55,9 @@ var x: {.a: i32} = {.a: i32}; // CHECK:STDOUT: import Core//prelude/types/bool // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref Core//prelude/types, inst+4, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.2: %ImplicitAs.type = import_ref Core//prelude/operators/as, inst+40, loaded [template = constants.%ImplicitAs] +// CHECK:STDOUT: %import_ref.2: %ImplicitAs.type.1 = import_ref Core//prelude/operators/as, inst+40, loaded [template = constants.%ImplicitAs] // CHECK:STDOUT: %import_ref.3 = import_ref Core//prelude/operators/as, inst+45, unloaded -// CHECK:STDOUT: %import_ref.4: @ImplicitAs.%.2 (%.4) = import_ref Core//prelude/operators/as, inst+63, loaded [symbolic = @ImplicitAs.%.3 (constants.%.9)] +// CHECK:STDOUT: %import_ref.4: @ImplicitAs.%.1 (%.3) = import_ref Core//prelude/operators/as, inst+63, loaded [symbolic = @ImplicitAs.%.2 (constants.%.7)] // CHECK:STDOUT: %import_ref.5 = import_ref Core//prelude/operators/as, inst+56, unloaded // CHECK:STDOUT: %import_ref.6 = import_ref Core//prelude/operators/as, inst+56, unloaded // CHECK:STDOUT: %import_ref.7 = import_ref Core//prelude/operators/as, inst+56, unloaded @@ -81,12 +81,12 @@ var x: {.a: i32} = {.a: i32}; // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic = %Dest (constants.%Dest)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.1: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic = %.1 (constants.%.3)] -// CHECK:STDOUT: %Self: %.3 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] +// CHECK:STDOUT: %ImplicitAs.type: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.2)] +// CHECK:STDOUT: %Self: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] // CHECK:STDOUT: %Convert.type: type = fn_type @Convert, @ImplicitAs(%Dest) [symbolic = %Convert.type (constants.%Convert.type.1)] // CHECK:STDOUT: %Convert: @ImplicitAs.%Convert.type (%Convert.type.1) = struct_value () [symbolic = %Convert (constants.%Convert.1)] -// CHECK:STDOUT: %.2: type = assoc_entity_type @ImplicitAs.%.1 (%.3), @ImplicitAs.%Convert.type (%Convert.type.1) [symbolic = %.2 (constants.%.4)] -// CHECK:STDOUT: %.3: @ImplicitAs.%.2 (%.4) = assoc_entity element0, imports.%import_ref.6 [symbolic = %.3 (constants.%.5)] +// CHECK:STDOUT: %.1: type = assoc_entity_type @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2), @ImplicitAs.%Convert.type (%Convert.type.1) [symbolic = %.1 (constants.%.3)] +// CHECK:STDOUT: %.2: @ImplicitAs.%.1 (%.3) = assoc_entity element0, imports.%import_ref.6 [symbolic = %.2 (constants.%.4)] // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: !members: @@ -98,10 +98,10 @@ var x: {.a: i32} = {.a: i32}; // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32"; // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @Convert(constants.%Dest: type, constants.%Self.1: @ImplicitAs.%.1 (%.3)) { +// CHECK:STDOUT: generic fn @Convert(constants.%Dest: type, constants.%Self.1: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2)) { // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic = %Dest (constants.%Dest)] -// CHECK:STDOUT: %.1: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic = %.1 (constants.%.3)] -// CHECK:STDOUT: %Self: %.3 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] +// CHECK:STDOUT: %ImplicitAs.type: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.2)] +// CHECK:STDOUT: %Self: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] // CHECK:STDOUT: // CHECK:STDOUT: fn[%self: @Convert.%Self (%Self.2)]() -> @Convert.%Dest (%Dest); // CHECK:STDOUT: } @@ -112,10 +112,10 @@ var x: {.a: i32} = {.a: i32}; // CHECK:STDOUT: %.loc17_25.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc17_25.2: type = converted %int.make_type_32, %.loc17_25.1 [template = i32] // CHECK:STDOUT: %.loc17_28: type = struct_type {.a: i32} [template = constants.%.2] -// CHECK:STDOUT: %.loc17_29.1: type = interface_type @ImplicitAs, @ImplicitAs(constants.%.2) [template = constants.%.6] -// CHECK:STDOUT: %.loc17_29.2: %.7 = specific_constant imports.%import_ref.4, @ImplicitAs(constants.%.2) [template = constants.%.8] -// CHECK:STDOUT: %Convert.ref: %.7 = name_ref Convert, %.loc17_29.2 [template = constants.%.8] -// CHECK:STDOUT: %.loc17_29.3: %.2 = converted %.loc17_28, [template = ] +// CHECK:STDOUT: %ImplicitAs.type: type = interface_type @ImplicitAs, @ImplicitAs(constants.%.2) [template = constants.%ImplicitAs.type.3] +// CHECK:STDOUT: %.loc17_29.1: %.5 = specific_constant imports.%import_ref.4, @ImplicitAs(constants.%.2) [template = constants.%.6] +// CHECK:STDOUT: %Convert.ref: %.5 = name_ref Convert, %.loc17_29.1 [template = constants.%.6] +// CHECK:STDOUT: %.loc17_29.2: %.2 = converted %.loc17_28, [template = ] // CHECK:STDOUT: assign file.%x.var, // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -134,7 +134,7 @@ var x: {.a: i32} = {.a: i32}; // CHECK:STDOUT: // CHECK:STDOUT: specific @Convert(constants.%Dest, constants.%Self.1) { // CHECK:STDOUT: %Dest => constants.%Dest -// CHECK:STDOUT: %.1 => constants.%.3 +// CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.2 // CHECK:STDOUT: %Self => constants.%Self.1 // CHECK:STDOUT: } // CHECK:STDOUT: @@ -142,11 +142,11 @@ var x: {.a: i32} = {.a: i32}; // CHECK:STDOUT: %Dest => constants.%.2 // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.1 => constants.%.6 +// CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.3 // CHECK:STDOUT: %Self => constants.%Self.2 // CHECK:STDOUT: %Convert.type => constants.%Convert.type.2 // CHECK:STDOUT: %Convert => constants.%Convert.2 -// CHECK:STDOUT: %.2 => constants.%.7 -// CHECK:STDOUT: %.3 => constants.%.8 +// CHECK:STDOUT: %.1 => constants.%.5 +// CHECK:STDOUT: %.2 => constants.%.6 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/struct/fail_value_as_type.carbon b/toolchain/check/testdata/struct/fail_value_as_type.carbon index d8d588ace67a7..c6316743e3d23 100644 --- a/toolchain/check/testdata/struct/fail_value_as_type.carbon +++ b/toolchain/check/testdata/struct/fail_value_as_type.carbon @@ -21,23 +21,23 @@ var x: {.a = 1}; // CHECK:STDOUT: constants { // CHECK:STDOUT: %.1: i32 = int_literal 1 [template] // CHECK:STDOUT: %.2: type = struct_type {.a: i32} [template] -// CHECK:STDOUT: %ImplicitAs.type: type = generic_interface_type @ImplicitAs [template] +// CHECK:STDOUT: %ImplicitAs.type.1: type = generic_interface_type @ImplicitAs [template] // CHECK:STDOUT: %.3: type = tuple_type () [template] -// CHECK:STDOUT: %ImplicitAs: %ImplicitAs.type = struct_value () [template] +// CHECK:STDOUT: %ImplicitAs: %ImplicitAs.type.1 = struct_value () [template] // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic] -// CHECK:STDOUT: %.4: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic] -// CHECK:STDOUT: %Self.1: @ImplicitAs.%.1 (%.4) = bind_symbolic_name Self, 1 [symbolic] -// CHECK:STDOUT: %Self.2: %.4 = bind_symbolic_name Self, 1 [symbolic] +// CHECK:STDOUT: %ImplicitAs.type.2: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic] +// CHECK:STDOUT: %Self.1: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2) = bind_symbolic_name Self, 1 [symbolic] +// CHECK:STDOUT: %Self.2: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: %Convert.type.1: type = fn_type @Convert, @ImplicitAs(%Dest) [symbolic] // CHECK:STDOUT: %Convert.1: %Convert.type.1 = struct_value () [symbolic] -// CHECK:STDOUT: %.5: type = assoc_entity_type %.4, %Convert.type.1 [symbolic] -// CHECK:STDOUT: %.6: %.5 = assoc_entity element0, imports.%import_ref.5 [symbolic] -// CHECK:STDOUT: %.7: type = interface_type @ImplicitAs, @ImplicitAs(type) [template] +// CHECK:STDOUT: %.4: type = assoc_entity_type %ImplicitAs.type.2, %Convert.type.1 [symbolic] +// CHECK:STDOUT: %.5: %.4 = assoc_entity element0, imports.%import_ref.5 [symbolic] +// CHECK:STDOUT: %ImplicitAs.type.3: type = interface_type @ImplicitAs, @ImplicitAs(type) [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert, @ImplicitAs(type) [template] // CHECK:STDOUT: %Convert.2: %Convert.type.2 = struct_value () [template] -// CHECK:STDOUT: %.8: type = assoc_entity_type %.7, %Convert.type.2 [template] -// CHECK:STDOUT: %.9: %.8 = assoc_entity element0, imports.%import_ref.5 [template] -// CHECK:STDOUT: %.10: %.5 = assoc_entity element0, imports.%import_ref.6 [symbolic] +// CHECK:STDOUT: %.6: type = assoc_entity_type %ImplicitAs.type.3, %Convert.type.2 [template] +// CHECK:STDOUT: %.7: %.6 = assoc_entity element0, imports.%import_ref.5 [template] +// CHECK:STDOUT: %.8: %.4 = assoc_entity element0, imports.%import_ref.6 [symbolic] // CHECK:STDOUT: %struct: %.2 = struct_value (%.1) [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -53,9 +53,9 @@ var x: {.a = 1}; // CHECK:STDOUT: import Core//prelude/operators/comparison // CHECK:STDOUT: import Core//prelude/types/bool // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.1: %ImplicitAs.type = import_ref Core//prelude/operators/as, inst+40, loaded [template = constants.%ImplicitAs] +// CHECK:STDOUT: %import_ref.1: %ImplicitAs.type.1 = import_ref Core//prelude/operators/as, inst+40, loaded [template = constants.%ImplicitAs] // CHECK:STDOUT: %import_ref.2 = import_ref Core//prelude/operators/as, inst+45, unloaded -// CHECK:STDOUT: %import_ref.3: @ImplicitAs.%.2 (%.5) = import_ref Core//prelude/operators/as, inst+63, loaded [symbolic = @ImplicitAs.%.3 (constants.%.10)] +// CHECK:STDOUT: %import_ref.3: @ImplicitAs.%.1 (%.4) = import_ref Core//prelude/operators/as, inst+63, loaded [symbolic = @ImplicitAs.%.2 (constants.%.8)] // CHECK:STDOUT: %import_ref.4 = import_ref Core//prelude/operators/as, inst+56, unloaded // CHECK:STDOUT: %import_ref.5 = import_ref Core//prelude/operators/as, inst+56, unloaded // CHECK:STDOUT: %import_ref.6 = import_ref Core//prelude/operators/as, inst+56, unloaded @@ -69,12 +69,12 @@ var x: {.a = 1}; // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %.loc17_14: i32 = int_literal 1 [template = constants.%.1] // CHECK:STDOUT: %.loc17_15.1: %.2 = struct_literal (%.loc17_14) -// CHECK:STDOUT: %.loc17_15.2: type = interface_type @ImplicitAs, @ImplicitAs(type) [template = constants.%.7] -// CHECK:STDOUT: %.loc17_15.3: %.8 = specific_constant imports.%import_ref.3, @ImplicitAs(type) [template = constants.%.9] -// CHECK:STDOUT: %Convert.ref: %.8 = name_ref Convert, %.loc17_15.3 [template = constants.%.9] +// CHECK:STDOUT: %ImplicitAs.type: type = interface_type @ImplicitAs, @ImplicitAs(type) [template = constants.%ImplicitAs.type.3] +// CHECK:STDOUT: %.loc17_15.2: %.6 = specific_constant imports.%import_ref.3, @ImplicitAs(type) [template = constants.%.7] +// CHECK:STDOUT: %Convert.ref: %.6 = name_ref Convert, %.loc17_15.2 [template = constants.%.7] // CHECK:STDOUT: %struct: %.2 = struct_value (%.loc17_14) [template = constants.%struct] -// CHECK:STDOUT: %.loc17_15.4: %.2 = converted %.loc17_15.1, %struct [template = constants.%struct] -// CHECK:STDOUT: %.loc17_15.5: type = converted %.loc17_15.1, [template = ] +// CHECK:STDOUT: %.loc17_15.3: %.2 = converted %.loc17_15.1, %struct [template = constants.%struct] +// CHECK:STDOUT: %.loc17_15.4: type = converted %.loc17_15.1, [template = ] // CHECK:STDOUT: %x.var: ref = var x // CHECK:STDOUT: %x: ref = bind_name x, %x.var // CHECK:STDOUT: } @@ -83,12 +83,12 @@ var x: {.a = 1}; // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic = %Dest (constants.%Dest)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.1: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic = %.1 (constants.%.4)] -// CHECK:STDOUT: %Self: %.4 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] +// CHECK:STDOUT: %ImplicitAs.type: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.2)] +// CHECK:STDOUT: %Self: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] // CHECK:STDOUT: %Convert.type: type = fn_type @Convert, @ImplicitAs(%Dest) [symbolic = %Convert.type (constants.%Convert.type.1)] // CHECK:STDOUT: %Convert: @ImplicitAs.%Convert.type (%Convert.type.1) = struct_value () [symbolic = %Convert (constants.%Convert.1)] -// CHECK:STDOUT: %.2: type = assoc_entity_type @ImplicitAs.%.1 (%.4), @ImplicitAs.%Convert.type (%Convert.type.1) [symbolic = %.2 (constants.%.5)] -// CHECK:STDOUT: %.3: @ImplicitAs.%.2 (%.5) = assoc_entity element0, imports.%import_ref.5 [symbolic = %.3 (constants.%.6)] +// CHECK:STDOUT: %.1: type = assoc_entity_type @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2), @ImplicitAs.%Convert.type (%Convert.type.1) [symbolic = %.1 (constants.%.4)] +// CHECK:STDOUT: %.2: @ImplicitAs.%.1 (%.4) = assoc_entity element0, imports.%import_ref.5 [symbolic = %.2 (constants.%.5)] // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: !members: @@ -98,10 +98,10 @@ var x: {.a = 1}; // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @Convert(constants.%Dest: type, constants.%Self.1: @ImplicitAs.%.1 (%.4)) { +// CHECK:STDOUT: generic fn @Convert(constants.%Dest: type, constants.%Self.1: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2)) { // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic = %Dest (constants.%Dest)] -// CHECK:STDOUT: %.1: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic = %.1 (constants.%.4)] -// CHECK:STDOUT: %Self: %.4 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] +// CHECK:STDOUT: %ImplicitAs.type: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.2)] +// CHECK:STDOUT: %Self: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] // CHECK:STDOUT: // CHECK:STDOUT: fn[%self: @Convert.%Self (%Self.2)]() -> @Convert.%Dest (%Dest); // CHECK:STDOUT: } @@ -120,7 +120,7 @@ var x: {.a = 1}; // CHECK:STDOUT: // CHECK:STDOUT: specific @Convert(constants.%Dest, constants.%Self.1) { // CHECK:STDOUT: %Dest => constants.%Dest -// CHECK:STDOUT: %.1 => constants.%.4 +// CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.2 // CHECK:STDOUT: %Self => constants.%Self.1 // CHECK:STDOUT: } // CHECK:STDOUT: @@ -128,11 +128,11 @@ var x: {.a = 1}; // CHECK:STDOUT: %Dest => type // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.1 => constants.%.7 +// CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.3 // CHECK:STDOUT: %Self => constants.%Self.2 // CHECK:STDOUT: %Convert.type => constants.%Convert.type.2 // CHECK:STDOUT: %Convert => constants.%Convert.2 -// CHECK:STDOUT: %.2 => constants.%.8 -// CHECK:STDOUT: %.3 => constants.%.9 +// CHECK:STDOUT: %.1 => constants.%.6 +// CHECK:STDOUT: %.2 => constants.%.7 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/struct/import.carbon b/toolchain/check/testdata/struct/import.carbon index 7cd6a5072c56b..829a70002e187 100644 --- a/toolchain/check/testdata/struct/import.carbon +++ b/toolchain/check/testdata/struct/import.carbon @@ -486,22 +486,22 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: %.10: i32 = int_literal 1 [template] // CHECK:STDOUT: %struct.2: %.4 = struct_value (%.10, %.9) [template] // CHECK:STDOUT: %C.4: type = class_type @C, @C(%struct.2) [template] -// CHECK:STDOUT: %ImplicitAs.type: type = generic_interface_type @ImplicitAs [template] -// CHECK:STDOUT: %ImplicitAs: %ImplicitAs.type = struct_value () [template] +// CHECK:STDOUT: %ImplicitAs.type.1: type = generic_interface_type @ImplicitAs [template] +// CHECK:STDOUT: %ImplicitAs: %ImplicitAs.type.1 = struct_value () [template] // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic] -// CHECK:STDOUT: %.11: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic] -// CHECK:STDOUT: %Self.1: @ImplicitAs.%.1 (%.11) = bind_symbolic_name Self, 1 [symbolic] -// CHECK:STDOUT: %Self.2: %.11 = bind_symbolic_name Self, 1 [symbolic] +// CHECK:STDOUT: %ImplicitAs.type.2: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic] +// CHECK:STDOUT: %Self.1: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2) = bind_symbolic_name Self, 1 [symbolic] +// CHECK:STDOUT: %Self.2: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: %Convert.type.1: type = fn_type @Convert, @ImplicitAs(%Dest) [symbolic] // CHECK:STDOUT: %Convert.1: %Convert.type.1 = struct_value () [symbolic] -// CHECK:STDOUT: %.12: type = assoc_entity_type %.11, %Convert.type.1 [symbolic] -// CHECK:STDOUT: %.13: %.12 = assoc_entity element0, imports.%import_ref.10 [symbolic] -// CHECK:STDOUT: %.14: type = interface_type @ImplicitAs, @ImplicitAs(%C.3) [template] +// CHECK:STDOUT: %.11: type = assoc_entity_type %ImplicitAs.type.2, %Convert.type.1 [symbolic] +// CHECK:STDOUT: %.12: %.11 = assoc_entity element0, imports.%import_ref.10 [symbolic] +// CHECK:STDOUT: %ImplicitAs.type.3: type = interface_type @ImplicitAs, @ImplicitAs(%C.3) [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert, @ImplicitAs(%C.3) [template] // CHECK:STDOUT: %Convert.2: %Convert.type.2 = struct_value () [template] -// CHECK:STDOUT: %.15: type = assoc_entity_type %.14, %Convert.type.2 [template] -// CHECK:STDOUT: %.16: %.15 = assoc_entity element0, imports.%import_ref.10 [template] -// CHECK:STDOUT: %.17: %.12 = assoc_entity element0, imports.%import_ref.11 [symbolic] +// CHECK:STDOUT: %.13: type = assoc_entity_type %ImplicitAs.type.3, %Convert.type.2 [template] +// CHECK:STDOUT: %.14: %.13 = assoc_entity element0, imports.%import_ref.10 [template] +// CHECK:STDOUT: %.15: %.11 = assoc_entity element0, imports.%import_ref.11 [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -521,9 +521,9 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: import Core//prelude/types/bool // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.5 = import_ref Implicit//default, inst+104, unloaded -// CHECK:STDOUT: %import_ref.6: %ImplicitAs.type = import_ref Core//prelude/operators/as, inst+40, loaded [template = constants.%ImplicitAs] +// CHECK:STDOUT: %import_ref.6: %ImplicitAs.type.1 = import_ref Core//prelude/operators/as, inst+40, loaded [template = constants.%ImplicitAs] // CHECK:STDOUT: %import_ref.7 = import_ref Core//prelude/operators/as, inst+45, unloaded -// CHECK:STDOUT: %import_ref.8: @ImplicitAs.%.2 (%.12) = import_ref Core//prelude/operators/as, inst+63, loaded [symbolic = @ImplicitAs.%.3 (constants.%.17)] +// CHECK:STDOUT: %import_ref.8: @ImplicitAs.%.1 (%.11) = import_ref Core//prelude/operators/as, inst+63, loaded [symbolic = @ImplicitAs.%.2 (constants.%.15)] // CHECK:STDOUT: %import_ref.9 = import_ref Core//prelude/operators/as, inst+56, unloaded // CHECK:STDOUT: %import_ref.10 = import_ref Core//prelude/operators/as, inst+56, unloaded // CHECK:STDOUT: %import_ref.11 = import_ref Core//prelude/operators/as, inst+56, unloaded @@ -556,12 +556,12 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic = %Dest (constants.%Dest)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.1: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic = %.1 (constants.%.11)] -// CHECK:STDOUT: %Self: %.11 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] +// CHECK:STDOUT: %ImplicitAs.type: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.2)] +// CHECK:STDOUT: %Self: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] // CHECK:STDOUT: %Convert.type: type = fn_type @Convert, @ImplicitAs(%Dest) [symbolic = %Convert.type (constants.%Convert.type.1)] // CHECK:STDOUT: %Convert: @ImplicitAs.%Convert.type (%Convert.type.1) = struct_value () [symbolic = %Convert (constants.%Convert.1)] -// CHECK:STDOUT: %.2: type = assoc_entity_type @ImplicitAs.%.1 (%.11), @ImplicitAs.%Convert.type (%Convert.type.1) [symbolic = %.2 (constants.%.12)] -// CHECK:STDOUT: %.3: @ImplicitAs.%.2 (%.12) = assoc_entity element0, imports.%import_ref.10 [symbolic = %.3 (constants.%.13)] +// CHECK:STDOUT: %.1: type = assoc_entity_type @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2), @ImplicitAs.%Convert.type (%Convert.type.1) [symbolic = %.1 (constants.%.11)] +// CHECK:STDOUT: %.2: @ImplicitAs.%.1 (%.11) = assoc_entity element0, imports.%import_ref.10 [symbolic = %.2 (constants.%.12)] // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: !members: @@ -584,10 +584,10 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: // CHECK:STDOUT: fn @F() -> %C.4; // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @Convert(constants.%Dest: type, constants.%Self.1: @ImplicitAs.%.1 (%.11)) { +// CHECK:STDOUT: generic fn @Convert(constants.%Dest: type, constants.%Self.1: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2)) { // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic = %Dest (constants.%Dest)] -// CHECK:STDOUT: %.1: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic = %.1 (constants.%.11)] -// CHECK:STDOUT: %Self: %.11 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] +// CHECK:STDOUT: %ImplicitAs.type: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.2)] +// CHECK:STDOUT: %Self: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] // CHECK:STDOUT: // CHECK:STDOUT: fn[%self: @Convert.%Self (%Self.2)]() -> @Convert.%Dest (%Dest); // CHECK:STDOUT: } @@ -597,11 +597,11 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: %F.ref: %F.type = name_ref F, imports.%import_ref.4 [template = constants.%F] // CHECK:STDOUT: %.loc9_35.1: ref %C.4 = temporary_storage // CHECK:STDOUT: %F.call: init %C.4 = call %F.ref() to %.loc9_35.1 -// CHECK:STDOUT: %.loc9_37.1: type = interface_type @ImplicitAs, @ImplicitAs(constants.%C.3) [template = constants.%.14] -// CHECK:STDOUT: %.loc9_37.2: %.15 = specific_constant imports.%import_ref.8, @ImplicitAs(constants.%C.3) [template = constants.%.16] -// CHECK:STDOUT: %Convert.ref: %.15 = name_ref Convert, %.loc9_37.2 [template = constants.%.16] +// CHECK:STDOUT: %ImplicitAs.type: type = interface_type @ImplicitAs, @ImplicitAs(constants.%C.3) [template = constants.%ImplicitAs.type.3] +// CHECK:STDOUT: %.loc9_37.1: %.13 = specific_constant imports.%import_ref.8, @ImplicitAs(constants.%C.3) [template = constants.%.14] +// CHECK:STDOUT: %Convert.ref: %.13 = name_ref Convert, %.loc9_37.1 [template = constants.%.14] // CHECK:STDOUT: %.loc9_35.2: ref %C.4 = temporary %.loc9_35.1, %F.call -// CHECK:STDOUT: %.loc9_37.3: %C.3 = converted %F.call, [template = ] +// CHECK:STDOUT: %.loc9_37.2: %C.3 = converted %F.call, [template = ] // CHECK:STDOUT: assign file.%c_bad.var, // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -636,7 +636,7 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: // CHECK:STDOUT: specific @Convert(constants.%Dest, constants.%Self.1) { // CHECK:STDOUT: %Dest => constants.%Dest -// CHECK:STDOUT: %.1 => constants.%.11 +// CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.2 // CHECK:STDOUT: %Self => constants.%Self.1 // CHECK:STDOUT: } // CHECK:STDOUT: @@ -644,11 +644,11 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: %Dest => constants.%C.3 // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.1 => constants.%.14 +// CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.3 // CHECK:STDOUT: %Self => constants.%Self.2 // CHECK:STDOUT: %Convert.type => constants.%Convert.type.2 // CHECK:STDOUT: %Convert => constants.%Convert.2 -// CHECK:STDOUT: %.2 => constants.%.15 -// CHECK:STDOUT: %.3 => constants.%.16 +// CHECK:STDOUT: %.1 => constants.%.13 +// CHECK:STDOUT: %.2 => constants.%.14 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/tuple/access/fail_negative_indexing.carbon b/toolchain/check/testdata/tuple/access/fail_negative_indexing.carbon index a5ac1177430e6..7ba5b4a62db20 100644 --- a/toolchain/check/testdata/tuple/access/fail_negative_indexing.carbon +++ b/toolchain/check/testdata/tuple/access/fail_negative_indexing.carbon @@ -27,12 +27,12 @@ var b: i32 = a.(-10); // CHECK:STDOUT: %.6: i32 = int_literal 6 [template] // CHECK:STDOUT: %tuple: %.3 = tuple_value (%.5, %.6) [template] // CHECK:STDOUT: %.7: i32 = int_literal 10 [template] -// CHECK:STDOUT: %.8: type = interface_type @Negate [template] -// CHECK:STDOUT: %Self: %.8 = bind_symbolic_name Self, 0 [symbolic] +// CHECK:STDOUT: %Negate.type: type = interface_type @Negate [template] +// CHECK:STDOUT: %Self: %Negate.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %Op.type: type = fn_type @Op [template] // CHECK:STDOUT: %Op: %Op.type = struct_value () [template] -// CHECK:STDOUT: %.9: type = assoc_entity_type %.8, %Op.type [template] -// CHECK:STDOUT: %.10: %.9 = assoc_entity element0, imports.%import_ref.6 [template] +// CHECK:STDOUT: %.8: type = assoc_entity_type %Negate.type, %Op.type [template] +// CHECK:STDOUT: %.9: %.8 = assoc_entity element0, imports.%import_ref.6 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -49,9 +49,9 @@ var b: i32 = a.(-10); // CHECK:STDOUT: import Core//prelude/types/bool // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref Core//prelude/types, inst+4, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.2: type = import_ref Core//prelude/operators/arithmetic, inst+77, loaded [template = constants.%.8] +// CHECK:STDOUT: %import_ref.2: type = import_ref Core//prelude/operators/arithmetic, inst+77, loaded [template = constants.%Negate.type] // CHECK:STDOUT: %import_ref.3 = import_ref Core//prelude/operators/arithmetic, inst+79, unloaded -// CHECK:STDOUT: %import_ref.4: %.9 = import_ref Core//prelude/operators/arithmetic, inst+96, loaded [template = constants.%.10] +// CHECK:STDOUT: %import_ref.4: %.8 = import_ref Core//prelude/operators/arithmetic, inst+96, loaded [template = constants.%.9] // CHECK:STDOUT: %import_ref.5 = import_ref Core//prelude/operators/arithmetic, inst+91, unloaded // CHECK:STDOUT: %import_ref.6 = import_ref Core//prelude/operators/arithmetic, inst+91, unloaded // CHECK:STDOUT: } @@ -89,8 +89,8 @@ var b: i32 = a.(-10); // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32"; // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @Op(constants.%Self: %.8) { -// CHECK:STDOUT: %Self: %.8 = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self)] +// CHECK:STDOUT: generic fn @Op(constants.%Self: %Negate.type) { +// CHECK:STDOUT: %Self: %Negate.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self)] // CHECK:STDOUT: // CHECK:STDOUT: fn[%self: @Op.%Self (%Self)]() -> @Op.%Self (%Self); // CHECK:STDOUT: } @@ -109,7 +109,7 @@ var b: i32 = a.(-10); // CHECK:STDOUT: assign file.%a.var, %.loc11_28 // CHECK:STDOUT: %a.ref: ref %.3 = name_ref a, file.%a // CHECK:STDOUT: %.loc15: i32 = int_literal 10 [template = constants.%.7] -// CHECK:STDOUT: %Op.ref: %.9 = name_ref Op, imports.%import_ref.4 [template = constants.%.10] +// CHECK:STDOUT: %Op.ref: %.8 = name_ref Op, imports.%import_ref.4 [template = constants.%.9] // CHECK:STDOUT: assign file.%b.var, // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/tuple/access/fail_non_int_indexing.carbon b/toolchain/check/testdata/tuple/access/fail_non_int_indexing.carbon index 02d92525f6ee7..b40ab5e7c87d9 100644 --- a/toolchain/check/testdata/tuple/access/fail_non_int_indexing.carbon +++ b/toolchain/check/testdata/tuple/access/fail_non_int_indexing.carbon @@ -30,22 +30,22 @@ var b: i32 = a.(2.6); // CHECK:STDOUT: %.6: i32 = int_literal 6 [template] // CHECK:STDOUT: %tuple: %.3 = tuple_value (%.5, %.6) [template] // CHECK:STDOUT: %.7: f64 = float_literal 2.6000000000000001 [template] -// CHECK:STDOUT: %ImplicitAs.type: type = generic_interface_type @ImplicitAs [template] -// CHECK:STDOUT: %ImplicitAs: %ImplicitAs.type = struct_value () [template] +// CHECK:STDOUT: %ImplicitAs.type.1: type = generic_interface_type @ImplicitAs [template] +// CHECK:STDOUT: %ImplicitAs: %ImplicitAs.type.1 = struct_value () [template] // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic] -// CHECK:STDOUT: %.8: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic] -// CHECK:STDOUT: %Self.1: @ImplicitAs.%.1 (%.8) = bind_symbolic_name Self, 1 [symbolic] -// CHECK:STDOUT: %Self.2: %.8 = bind_symbolic_name Self, 1 [symbolic] +// CHECK:STDOUT: %ImplicitAs.type.2: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic] +// CHECK:STDOUT: %Self.1: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2) = bind_symbolic_name Self, 1 [symbolic] +// CHECK:STDOUT: %Self.2: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: %Convert.type.1: type = fn_type @Convert, @ImplicitAs(%Dest) [symbolic] // CHECK:STDOUT: %Convert.1: %Convert.type.1 = struct_value () [symbolic] -// CHECK:STDOUT: %.9: type = assoc_entity_type %.8, %Convert.type.1 [symbolic] -// CHECK:STDOUT: %.10: %.9 = assoc_entity element0, imports.%import_ref.6 [symbolic] -// CHECK:STDOUT: %.11: type = interface_type @ImplicitAs, @ImplicitAs(i32) [template] +// CHECK:STDOUT: %.8: type = assoc_entity_type %ImplicitAs.type.2, %Convert.type.1 [symbolic] +// CHECK:STDOUT: %.9: %.8 = assoc_entity element0, imports.%import_ref.6 [symbolic] +// CHECK:STDOUT: %ImplicitAs.type.3: type = interface_type @ImplicitAs, @ImplicitAs(i32) [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert, @ImplicitAs(i32) [template] // CHECK:STDOUT: %Convert.2: %Convert.type.2 = struct_value () [template] -// CHECK:STDOUT: %.12: type = assoc_entity_type %.11, %Convert.type.2 [template] -// CHECK:STDOUT: %.13: %.12 = assoc_entity element0, imports.%import_ref.6 [template] -// CHECK:STDOUT: %.14: %.9 = assoc_entity element0, imports.%import_ref.7 [symbolic] +// CHECK:STDOUT: %.10: type = assoc_entity_type %ImplicitAs.type.3, %Convert.type.2 [template] +// CHECK:STDOUT: %.11: %.10 = assoc_entity element0, imports.%import_ref.6 [template] +// CHECK:STDOUT: %.12: %.8 = assoc_entity element0, imports.%import_ref.7 [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -62,9 +62,9 @@ var b: i32 = a.(2.6); // CHECK:STDOUT: import Core//prelude/types/bool // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref Core//prelude/types, inst+4, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.2: %ImplicitAs.type = import_ref Core//prelude/operators/as, inst+40, loaded [template = constants.%ImplicitAs] +// CHECK:STDOUT: %import_ref.2: %ImplicitAs.type.1 = import_ref Core//prelude/operators/as, inst+40, loaded [template = constants.%ImplicitAs] // CHECK:STDOUT: %import_ref.3 = import_ref Core//prelude/operators/as, inst+45, unloaded -// CHECK:STDOUT: %import_ref.4: @ImplicitAs.%.2 (%.9) = import_ref Core//prelude/operators/as, inst+63, loaded [symbolic = @ImplicitAs.%.3 (constants.%.14)] +// CHECK:STDOUT: %import_ref.4: @ImplicitAs.%.1 (%.8) = import_ref Core//prelude/operators/as, inst+63, loaded [symbolic = @ImplicitAs.%.2 (constants.%.12)] // CHECK:STDOUT: %import_ref.5 = import_ref Core//prelude/operators/as, inst+56, unloaded // CHECK:STDOUT: %import_ref.6 = import_ref Core//prelude/operators/as, inst+56, unloaded // CHECK:STDOUT: %import_ref.7 = import_ref Core//prelude/operators/as, inst+56, unloaded @@ -98,12 +98,12 @@ var b: i32 = a.(2.6); // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic = %Dest (constants.%Dest)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.1: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic = %.1 (constants.%.8)] -// CHECK:STDOUT: %Self: %.8 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] +// CHECK:STDOUT: %ImplicitAs.type: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.2)] +// CHECK:STDOUT: %Self: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] // CHECK:STDOUT: %Convert.type: type = fn_type @Convert, @ImplicitAs(%Dest) [symbolic = %Convert.type (constants.%Convert.type.1)] // CHECK:STDOUT: %Convert: @ImplicitAs.%Convert.type (%Convert.type.1) = struct_value () [symbolic = %Convert (constants.%Convert.1)] -// CHECK:STDOUT: %.2: type = assoc_entity_type @ImplicitAs.%.1 (%.8), @ImplicitAs.%Convert.type (%Convert.type.1) [symbolic = %.2 (constants.%.9)] -// CHECK:STDOUT: %.3: @ImplicitAs.%.2 (%.9) = assoc_entity element0, imports.%import_ref.6 [symbolic = %.3 (constants.%.10)] +// CHECK:STDOUT: %.1: type = assoc_entity_type @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2), @ImplicitAs.%Convert.type (%Convert.type.1) [symbolic = %.1 (constants.%.8)] +// CHECK:STDOUT: %.2: @ImplicitAs.%.1 (%.8) = assoc_entity element0, imports.%import_ref.6 [symbolic = %.2 (constants.%.9)] // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: !members: @@ -115,10 +115,10 @@ var b: i32 = a.(2.6); // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32"; // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @Convert(constants.%Dest: type, constants.%Self.1: @ImplicitAs.%.1 (%.8)) { +// CHECK:STDOUT: generic fn @Convert(constants.%Dest: type, constants.%Self.1: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2)) { // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic = %Dest (constants.%Dest)] -// CHECK:STDOUT: %.1: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic = %.1 (constants.%.8)] -// CHECK:STDOUT: %Self: %.8 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] +// CHECK:STDOUT: %ImplicitAs.type: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.2)] +// CHECK:STDOUT: %Self: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] // CHECK:STDOUT: // CHECK:STDOUT: fn[%self: @Convert.%Self (%Self.2)]() -> @Convert.%Dest (%Dest); // CHECK:STDOUT: } @@ -137,10 +137,10 @@ var b: i32 = a.(2.6); // CHECK:STDOUT: assign file.%a.var, %.loc11_28 // CHECK:STDOUT: %a.ref: ref %.3 = name_ref a, file.%a // CHECK:STDOUT: %.loc18_17.1: f64 = float_literal 2.6000000000000001 [template = constants.%.7] -// CHECK:STDOUT: %.loc18_17.2: type = interface_type @ImplicitAs, @ImplicitAs(i32) [template = constants.%.11] -// CHECK:STDOUT: %.loc18_17.3: %.12 = specific_constant imports.%import_ref.4, @ImplicitAs(i32) [template = constants.%.13] -// CHECK:STDOUT: %Convert.ref: %.12 = name_ref Convert, %.loc18_17.3 [template = constants.%.13] -// CHECK:STDOUT: %.loc18_17.4: i32 = converted %.loc18_17.1, [template = ] +// CHECK:STDOUT: %ImplicitAs.type: type = interface_type @ImplicitAs, @ImplicitAs(i32) [template = constants.%ImplicitAs.type.3] +// CHECK:STDOUT: %.loc18_17.2: %.10 = specific_constant imports.%import_ref.4, @ImplicitAs(i32) [template = constants.%.11] +// CHECK:STDOUT: %Convert.ref: %.10 = name_ref Convert, %.loc18_17.2 [template = constants.%.11] +// CHECK:STDOUT: %.loc18_17.3: i32 = converted %.loc18_17.1, [template = ] // CHECK:STDOUT: assign file.%b.var, // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -159,7 +159,7 @@ var b: i32 = a.(2.6); // CHECK:STDOUT: // CHECK:STDOUT: specific @Convert(constants.%Dest, constants.%Self.1) { // CHECK:STDOUT: %Dest => constants.%Dest -// CHECK:STDOUT: %.1 => constants.%.8 +// CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.2 // CHECK:STDOUT: %Self => constants.%Self.1 // CHECK:STDOUT: } // CHECK:STDOUT: @@ -167,11 +167,11 @@ var b: i32 = a.(2.6); // CHECK:STDOUT: %Dest => i32 // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.1 => constants.%.11 +// CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.3 // CHECK:STDOUT: %Self => constants.%Self.2 // CHECK:STDOUT: %Convert.type => constants.%Convert.type.2 // CHECK:STDOUT: %Convert => constants.%Convert.2 -// CHECK:STDOUT: %.2 => constants.%.12 -// CHECK:STDOUT: %.3 => constants.%.13 +// CHECK:STDOUT: %.1 => constants.%.10 +// CHECK:STDOUT: %.2 => constants.%.11 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/tuple/fail_element_type_mismatch.carbon b/toolchain/check/testdata/tuple/fail_element_type_mismatch.carbon index 5799bf81b70d3..865ca9935f778 100644 --- a/toolchain/check/testdata/tuple/fail_element_type_mismatch.carbon +++ b/toolchain/check/testdata/tuple/fail_element_type_mismatch.carbon @@ -28,22 +28,22 @@ var x: (i32, i32) = (2, 65.89); // CHECK:STDOUT: %.5: i32 = int_literal 2 [template] // CHECK:STDOUT: %.6: f64 = float_literal 65.890000000000001 [template] // CHECK:STDOUT: %.7: type = tuple_type (i32, f64) [template] -// CHECK:STDOUT: %ImplicitAs.type: type = generic_interface_type @ImplicitAs [template] -// CHECK:STDOUT: %ImplicitAs: %ImplicitAs.type = struct_value () [template] +// CHECK:STDOUT: %ImplicitAs.type.1: type = generic_interface_type @ImplicitAs [template] +// CHECK:STDOUT: %ImplicitAs: %ImplicitAs.type.1 = struct_value () [template] // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic] -// CHECK:STDOUT: %.8: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic] -// CHECK:STDOUT: %Self.1: @ImplicitAs.%.1 (%.8) = bind_symbolic_name Self, 1 [symbolic] -// CHECK:STDOUT: %Self.2: %.8 = bind_symbolic_name Self, 1 [symbolic] +// CHECK:STDOUT: %ImplicitAs.type.2: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic] +// CHECK:STDOUT: %Self.1: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2) = bind_symbolic_name Self, 1 [symbolic] +// CHECK:STDOUT: %Self.2: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: %Convert.type.1: type = fn_type @Convert, @ImplicitAs(%Dest) [symbolic] // CHECK:STDOUT: %Convert.1: %Convert.type.1 = struct_value () [symbolic] -// CHECK:STDOUT: %.9: type = assoc_entity_type %.8, %Convert.type.1 [symbolic] -// CHECK:STDOUT: %.10: %.9 = assoc_entity element0, imports.%import_ref.6 [symbolic] -// CHECK:STDOUT: %.11: type = interface_type @ImplicitAs, @ImplicitAs(i32) [template] +// CHECK:STDOUT: %.8: type = assoc_entity_type %ImplicitAs.type.2, %Convert.type.1 [symbolic] +// CHECK:STDOUT: %.9: %.8 = assoc_entity element0, imports.%import_ref.6 [symbolic] +// CHECK:STDOUT: %ImplicitAs.type.3: type = interface_type @ImplicitAs, @ImplicitAs(i32) [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert, @ImplicitAs(i32) [template] // CHECK:STDOUT: %Convert.2: %Convert.type.2 = struct_value () [template] -// CHECK:STDOUT: %.12: type = assoc_entity_type %.11, %Convert.type.2 [template] -// CHECK:STDOUT: %.13: %.12 = assoc_entity element0, imports.%import_ref.6 [template] -// CHECK:STDOUT: %.14: %.9 = assoc_entity element0, imports.%import_ref.7 [symbolic] +// CHECK:STDOUT: %.10: type = assoc_entity_type %ImplicitAs.type.3, %Convert.type.2 [template] +// CHECK:STDOUT: %.11: %.10 = assoc_entity element0, imports.%import_ref.6 [template] +// CHECK:STDOUT: %.12: %.8 = assoc_entity element0, imports.%import_ref.7 [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -60,9 +60,9 @@ var x: (i32, i32) = (2, 65.89); // CHECK:STDOUT: import Core//prelude/types/bool // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref Core//prelude/types, inst+4, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.2: %ImplicitAs.type = import_ref Core//prelude/operators/as, inst+40, loaded [template = constants.%ImplicitAs] +// CHECK:STDOUT: %import_ref.2: %ImplicitAs.type.1 = import_ref Core//prelude/operators/as, inst+40, loaded [template = constants.%ImplicitAs] // CHECK:STDOUT: %import_ref.3 = import_ref Core//prelude/operators/as, inst+45, unloaded -// CHECK:STDOUT: %import_ref.4: @ImplicitAs.%.2 (%.9) = import_ref Core//prelude/operators/as, inst+63, loaded [symbolic = @ImplicitAs.%.3 (constants.%.14)] +// CHECK:STDOUT: %import_ref.4: @ImplicitAs.%.1 (%.8) = import_ref Core//prelude/operators/as, inst+63, loaded [symbolic = @ImplicitAs.%.2 (constants.%.12)] // CHECK:STDOUT: %import_ref.5 = import_ref Core//prelude/operators/as, inst+56, unloaded // CHECK:STDOUT: %import_ref.6 = import_ref Core//prelude/operators/as, inst+56, unloaded // CHECK:STDOUT: %import_ref.7 = import_ref Core//prelude/operators/as, inst+56, unloaded @@ -90,12 +90,12 @@ var x: (i32, i32) = (2, 65.89); // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic = %Dest (constants.%Dest)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.1: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic = %.1 (constants.%.8)] -// CHECK:STDOUT: %Self: %.8 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] +// CHECK:STDOUT: %ImplicitAs.type: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.2)] +// CHECK:STDOUT: %Self: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] // CHECK:STDOUT: %Convert.type: type = fn_type @Convert, @ImplicitAs(%Dest) [symbolic = %Convert.type (constants.%Convert.type.1)] // CHECK:STDOUT: %Convert: @ImplicitAs.%Convert.type (%Convert.type.1) = struct_value () [symbolic = %Convert (constants.%Convert.1)] -// CHECK:STDOUT: %.2: type = assoc_entity_type @ImplicitAs.%.1 (%.8), @ImplicitAs.%Convert.type (%Convert.type.1) [symbolic = %.2 (constants.%.9)] -// CHECK:STDOUT: %.3: @ImplicitAs.%.2 (%.9) = assoc_entity element0, imports.%import_ref.6 [symbolic = %.3 (constants.%.10)] +// CHECK:STDOUT: %.1: type = assoc_entity_type @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2), @ImplicitAs.%Convert.type (%Convert.type.1) [symbolic = %.1 (constants.%.8)] +// CHECK:STDOUT: %.2: @ImplicitAs.%.1 (%.8) = assoc_entity element0, imports.%import_ref.6 [symbolic = %.2 (constants.%.9)] // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: !members: @@ -107,10 +107,10 @@ var x: (i32, i32) = (2, 65.89); // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32"; // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @Convert(constants.%Dest: type, constants.%Self.1: @ImplicitAs.%.1 (%.8)) { +// CHECK:STDOUT: generic fn @Convert(constants.%Dest: type, constants.%Self.1: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2)) { // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic = %Dest (constants.%Dest)] -// CHECK:STDOUT: %.1: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic = %.1 (constants.%.8)] -// CHECK:STDOUT: %Self: %.8 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] +// CHECK:STDOUT: %ImplicitAs.type: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.2)] +// CHECK:STDOUT: %Self: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] // CHECK:STDOUT: // CHECK:STDOUT: fn[%self: @Convert.%Self (%Self.2)]() -> @Convert.%Dest (%Dest); // CHECK:STDOUT: } @@ -122,10 +122,10 @@ var x: (i32, i32) = (2, 65.89); // CHECK:STDOUT: %.loc17_30.1: %.7 = tuple_literal (%.loc17_22, %.loc17_25) // CHECK:STDOUT: %.loc17_30.2: ref i32 = tuple_access file.%x.var, element0 // CHECK:STDOUT: %.loc17_30.3: init i32 = initialize_from %.loc17_22 to %.loc17_30.2 [template = constants.%.5] -// CHECK:STDOUT: %.loc17_30.4: type = interface_type @ImplicitAs, @ImplicitAs(i32) [template = constants.%.11] -// CHECK:STDOUT: %.loc17_30.5: %.12 = specific_constant imports.%import_ref.4, @ImplicitAs(i32) [template = constants.%.13] -// CHECK:STDOUT: %Convert.ref: %.12 = name_ref Convert, %.loc17_30.5 [template = constants.%.13] -// CHECK:STDOUT: %.loc17_30.6: i32 = converted %.loc17_25, [template = ] +// CHECK:STDOUT: %ImplicitAs.type: type = interface_type @ImplicitAs, @ImplicitAs(i32) [template = constants.%ImplicitAs.type.3] +// CHECK:STDOUT: %.loc17_30.4: %.10 = specific_constant imports.%import_ref.4, @ImplicitAs(i32) [template = constants.%.11] +// CHECK:STDOUT: %Convert.ref: %.10 = name_ref Convert, %.loc17_30.4 [template = constants.%.11] +// CHECK:STDOUT: %.loc17_30.5: i32 = converted %.loc17_25, [template = ] // CHECK:STDOUT: assign file.%x.var, // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -144,7 +144,7 @@ var x: (i32, i32) = (2, 65.89); // CHECK:STDOUT: // CHECK:STDOUT: specific @Convert(constants.%Dest, constants.%Self.1) { // CHECK:STDOUT: %Dest => constants.%Dest -// CHECK:STDOUT: %.1 => constants.%.8 +// CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.2 // CHECK:STDOUT: %Self => constants.%Self.1 // CHECK:STDOUT: } // CHECK:STDOUT: @@ -152,11 +152,11 @@ var x: (i32, i32) = (2, 65.89); // CHECK:STDOUT: %Dest => i32 // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.1 => constants.%.11 +// CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.3 // CHECK:STDOUT: %Self => constants.%Self.2 // CHECK:STDOUT: %Convert.type => constants.%Convert.type.2 // CHECK:STDOUT: %Convert => constants.%Convert.2 -// CHECK:STDOUT: %.2 => constants.%.12 -// CHECK:STDOUT: %.3 => constants.%.13 +// CHECK:STDOUT: %.1 => constants.%.10 +// CHECK:STDOUT: %.2 => constants.%.11 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/tuple/fail_type_assign.carbon b/toolchain/check/testdata/tuple/fail_type_assign.carbon index d7a350e77d9c2..a3b005fc2e45e 100644 --- a/toolchain/check/testdata/tuple/fail_type_assign.carbon +++ b/toolchain/check/testdata/tuple/fail_type_assign.carbon @@ -24,22 +24,22 @@ var x: (i32, ) = (i32, ); // CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %.2: type = tuple_type (type) [template] // CHECK:STDOUT: %.3: type = tuple_type (i32) [template] -// CHECK:STDOUT: %ImplicitAs.type: type = generic_interface_type @ImplicitAs [template] -// CHECK:STDOUT: %ImplicitAs: %ImplicitAs.type = struct_value () [template] +// CHECK:STDOUT: %ImplicitAs.type.1: type = generic_interface_type @ImplicitAs [template] +// CHECK:STDOUT: %ImplicitAs: %ImplicitAs.type.1 = struct_value () [template] // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic] -// CHECK:STDOUT: %.4: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic] -// CHECK:STDOUT: %Self.1: @ImplicitAs.%.1 (%.4) = bind_symbolic_name Self, 1 [symbolic] -// CHECK:STDOUT: %Self.2: %.4 = bind_symbolic_name Self, 1 [symbolic] +// CHECK:STDOUT: %ImplicitAs.type.2: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic] +// CHECK:STDOUT: %Self.1: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2) = bind_symbolic_name Self, 1 [symbolic] +// CHECK:STDOUT: %Self.2: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: %Convert.type.1: type = fn_type @Convert, @ImplicitAs(%Dest) [symbolic] // CHECK:STDOUT: %Convert.1: %Convert.type.1 = struct_value () [symbolic] -// CHECK:STDOUT: %.5: type = assoc_entity_type %.4, %Convert.type.1 [symbolic] -// CHECK:STDOUT: %.6: %.5 = assoc_entity element0, imports.%import_ref.6 [symbolic] -// CHECK:STDOUT: %.7: type = interface_type @ImplicitAs, @ImplicitAs(i32) [template] +// CHECK:STDOUT: %.4: type = assoc_entity_type %ImplicitAs.type.2, %Convert.type.1 [symbolic] +// CHECK:STDOUT: %.5: %.4 = assoc_entity element0, imports.%import_ref.6 [symbolic] +// CHECK:STDOUT: %ImplicitAs.type.3: type = interface_type @ImplicitAs, @ImplicitAs(i32) [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert, @ImplicitAs(i32) [template] // CHECK:STDOUT: %Convert.2: %Convert.type.2 = struct_value () [template] -// CHECK:STDOUT: %.8: type = assoc_entity_type %.7, %Convert.type.2 [template] -// CHECK:STDOUT: %.9: %.8 = assoc_entity element0, imports.%import_ref.6 [template] -// CHECK:STDOUT: %.10: %.5 = assoc_entity element0, imports.%import_ref.7 [symbolic] +// CHECK:STDOUT: %.6: type = assoc_entity_type %ImplicitAs.type.3, %Convert.type.2 [template] +// CHECK:STDOUT: %.7: %.6 = assoc_entity element0, imports.%import_ref.6 [template] +// CHECK:STDOUT: %.8: %.4 = assoc_entity element0, imports.%import_ref.7 [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -56,9 +56,9 @@ var x: (i32, ) = (i32, ); // CHECK:STDOUT: import Core//prelude/types/bool // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref Core//prelude/types, inst+4, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.2: %ImplicitAs.type = import_ref Core//prelude/operators/as, inst+40, loaded [template = constants.%ImplicitAs] +// CHECK:STDOUT: %import_ref.2: %ImplicitAs.type.1 = import_ref Core//prelude/operators/as, inst+40, loaded [template = constants.%ImplicitAs] // CHECK:STDOUT: %import_ref.3 = import_ref Core//prelude/operators/as, inst+45, unloaded -// CHECK:STDOUT: %import_ref.4: @ImplicitAs.%.2 (%.5) = import_ref Core//prelude/operators/as, inst+63, loaded [symbolic = @ImplicitAs.%.3 (constants.%.10)] +// CHECK:STDOUT: %import_ref.4: @ImplicitAs.%.1 (%.4) = import_ref Core//prelude/operators/as, inst+63, loaded [symbolic = @ImplicitAs.%.2 (constants.%.8)] // CHECK:STDOUT: %import_ref.5 = import_ref Core//prelude/operators/as, inst+56, unloaded // CHECK:STDOUT: %import_ref.6 = import_ref Core//prelude/operators/as, inst+56, unloaded // CHECK:STDOUT: %import_ref.7 = import_ref Core//prelude/operators/as, inst+56, unloaded @@ -83,12 +83,12 @@ var x: (i32, ) = (i32, ); // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic = %Dest (constants.%Dest)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.1: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic = %.1 (constants.%.4)] -// CHECK:STDOUT: %Self: %.4 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] +// CHECK:STDOUT: %ImplicitAs.type: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.2)] +// CHECK:STDOUT: %Self: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] // CHECK:STDOUT: %Convert.type: type = fn_type @Convert, @ImplicitAs(%Dest) [symbolic = %Convert.type (constants.%Convert.type.1)] // CHECK:STDOUT: %Convert: @ImplicitAs.%Convert.type (%Convert.type.1) = struct_value () [symbolic = %Convert (constants.%Convert.1)] -// CHECK:STDOUT: %.2: type = assoc_entity_type @ImplicitAs.%.1 (%.4), @ImplicitAs.%Convert.type (%Convert.type.1) [symbolic = %.2 (constants.%.5)] -// CHECK:STDOUT: %.3: @ImplicitAs.%.2 (%.5) = assoc_entity element0, imports.%import_ref.6 [symbolic = %.3 (constants.%.6)] +// CHECK:STDOUT: %.1: type = assoc_entity_type @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2), @ImplicitAs.%Convert.type (%Convert.type.1) [symbolic = %.1 (constants.%.4)] +// CHECK:STDOUT: %.2: @ImplicitAs.%.1 (%.4) = assoc_entity element0, imports.%import_ref.6 [symbolic = %.2 (constants.%.5)] // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: !members: @@ -100,10 +100,10 @@ var x: (i32, ) = (i32, ); // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32"; // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @Convert(constants.%Dest: type, constants.%Self.1: @ImplicitAs.%.1 (%.4)) { +// CHECK:STDOUT: generic fn @Convert(constants.%Dest: type, constants.%Self.1: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2)) { // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic = %Dest (constants.%Dest)] -// CHECK:STDOUT: %.1: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic = %.1 (constants.%.4)] -// CHECK:STDOUT: %Self: %.4 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] +// CHECK:STDOUT: %ImplicitAs.type: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.2)] +// CHECK:STDOUT: %Self: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] // CHECK:STDOUT: // CHECK:STDOUT: fn[%self: @Convert.%Self (%Self.2)]() -> @Convert.%Dest (%Dest); // CHECK:STDOUT: } @@ -112,12 +112,12 @@ var x: (i32, ) = (i32, ); // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc17_24.1: %.2 = tuple_literal (%int.make_type_32) -// CHECK:STDOUT: %.loc17_24.2: type = interface_type @ImplicitAs, @ImplicitAs(i32) [template = constants.%.7] -// CHECK:STDOUT: %.loc17_24.3: %.8 = specific_constant imports.%import_ref.4, @ImplicitAs(i32) [template = constants.%.9] -// CHECK:STDOUT: %Convert.ref: %.8 = name_ref Convert, %.loc17_24.3 [template = constants.%.9] +// CHECK:STDOUT: %ImplicitAs.type: type = interface_type @ImplicitAs, @ImplicitAs(i32) [template = constants.%ImplicitAs.type.3] +// CHECK:STDOUT: %.loc17_24.2: %.6 = specific_constant imports.%import_ref.4, @ImplicitAs(i32) [template = constants.%.7] +// CHECK:STDOUT: %Convert.ref: %.6 = name_ref Convert, %.loc17_24.2 [template = constants.%.7] // CHECK:STDOUT: %.loc17_19.1: ref type = temporary_storage // CHECK:STDOUT: %.loc17_19.2: ref type = temporary %.loc17_19.1, %int.make_type_32 -// CHECK:STDOUT: %.loc17_24.4: i32 = converted %int.make_type_32, [template = ] +// CHECK:STDOUT: %.loc17_24.3: i32 = converted %int.make_type_32, [template = ] // CHECK:STDOUT: assign file.%x.var, // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -136,7 +136,7 @@ var x: (i32, ) = (i32, ); // CHECK:STDOUT: // CHECK:STDOUT: specific @Convert(constants.%Dest, constants.%Self.1) { // CHECK:STDOUT: %Dest => constants.%Dest -// CHECK:STDOUT: %.1 => constants.%.4 +// CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.2 // CHECK:STDOUT: %Self => constants.%Self.1 // CHECK:STDOUT: } // CHECK:STDOUT: @@ -144,11 +144,11 @@ var x: (i32, ) = (i32, ); // CHECK:STDOUT: %Dest => i32 // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.1 => constants.%.7 +// CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.3 // CHECK:STDOUT: %Self => constants.%Self.2 // CHECK:STDOUT: %Convert.type => constants.%Convert.type.2 // CHECK:STDOUT: %Convert => constants.%Convert.2 -// CHECK:STDOUT: %.2 => constants.%.8 -// CHECK:STDOUT: %.3 => constants.%.9 +// CHECK:STDOUT: %.1 => constants.%.6 +// CHECK:STDOUT: %.2 => constants.%.7 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/tuple/fail_value_as_type.carbon b/toolchain/check/testdata/tuple/fail_value_as_type.carbon index d23b492f971f7..c7b7de785d0a3 100644 --- a/toolchain/check/testdata/tuple/fail_value_as_type.carbon +++ b/toolchain/check/testdata/tuple/fail_value_as_type.carbon @@ -21,23 +21,23 @@ var x: (1, ); // CHECK:STDOUT: constants { // CHECK:STDOUT: %.1: i32 = int_literal 1 [template] // CHECK:STDOUT: %.2: type = tuple_type (i32) [template] -// CHECK:STDOUT: %ImplicitAs.type: type = generic_interface_type @ImplicitAs [template] +// CHECK:STDOUT: %ImplicitAs.type.1: type = generic_interface_type @ImplicitAs [template] // CHECK:STDOUT: %.3: type = tuple_type () [template] -// CHECK:STDOUT: %ImplicitAs: %ImplicitAs.type = struct_value () [template] +// CHECK:STDOUT: %ImplicitAs: %ImplicitAs.type.1 = struct_value () [template] // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic] -// CHECK:STDOUT: %.4: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic] -// CHECK:STDOUT: %Self.1: @ImplicitAs.%.1 (%.4) = bind_symbolic_name Self, 1 [symbolic] -// CHECK:STDOUT: %Self.2: %.4 = bind_symbolic_name Self, 1 [symbolic] +// CHECK:STDOUT: %ImplicitAs.type.2: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic] +// CHECK:STDOUT: %Self.1: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2) = bind_symbolic_name Self, 1 [symbolic] +// CHECK:STDOUT: %Self.2: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: %Convert.type.1: type = fn_type @Convert, @ImplicitAs(%Dest) [symbolic] // CHECK:STDOUT: %Convert.1: %Convert.type.1 = struct_value () [symbolic] -// CHECK:STDOUT: %.5: type = assoc_entity_type %.4, %Convert.type.1 [symbolic] -// CHECK:STDOUT: %.6: %.5 = assoc_entity element0, imports.%import_ref.5 [symbolic] -// CHECK:STDOUT: %.7: type = interface_type @ImplicitAs, @ImplicitAs(type) [template] +// CHECK:STDOUT: %.4: type = assoc_entity_type %ImplicitAs.type.2, %Convert.type.1 [symbolic] +// CHECK:STDOUT: %.5: %.4 = assoc_entity element0, imports.%import_ref.5 [symbolic] +// CHECK:STDOUT: %ImplicitAs.type.3: type = interface_type @ImplicitAs, @ImplicitAs(type) [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert, @ImplicitAs(type) [template] // CHECK:STDOUT: %Convert.2: %Convert.type.2 = struct_value () [template] -// CHECK:STDOUT: %.8: type = assoc_entity_type %.7, %Convert.type.2 [template] -// CHECK:STDOUT: %.9: %.8 = assoc_entity element0, imports.%import_ref.5 [template] -// CHECK:STDOUT: %.10: %.5 = assoc_entity element0, imports.%import_ref.6 [symbolic] +// CHECK:STDOUT: %.6: type = assoc_entity_type %ImplicitAs.type.3, %Convert.type.2 [template] +// CHECK:STDOUT: %.7: %.6 = assoc_entity element0, imports.%import_ref.5 [template] +// CHECK:STDOUT: %.8: %.4 = assoc_entity element0, imports.%import_ref.6 [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -52,9 +52,9 @@ var x: (1, ); // CHECK:STDOUT: import Core//prelude/operators/comparison // CHECK:STDOUT: import Core//prelude/types/bool // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.1: %ImplicitAs.type = import_ref Core//prelude/operators/as, inst+40, loaded [template = constants.%ImplicitAs] +// CHECK:STDOUT: %import_ref.1: %ImplicitAs.type.1 = import_ref Core//prelude/operators/as, inst+40, loaded [template = constants.%ImplicitAs] // CHECK:STDOUT: %import_ref.2 = import_ref Core//prelude/operators/as, inst+45, unloaded -// CHECK:STDOUT: %import_ref.3: @ImplicitAs.%.2 (%.5) = import_ref Core//prelude/operators/as, inst+63, loaded [symbolic = @ImplicitAs.%.3 (constants.%.10)] +// CHECK:STDOUT: %import_ref.3: @ImplicitAs.%.1 (%.4) = import_ref Core//prelude/operators/as, inst+63, loaded [symbolic = @ImplicitAs.%.2 (constants.%.8)] // CHECK:STDOUT: %import_ref.4 = import_ref Core//prelude/operators/as, inst+56, unloaded // CHECK:STDOUT: %import_ref.5 = import_ref Core//prelude/operators/as, inst+56, unloaded // CHECK:STDOUT: %import_ref.6 = import_ref Core//prelude/operators/as, inst+56, unloaded @@ -68,10 +68,10 @@ var x: (1, ); // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %.loc17_9: i32 = int_literal 1 [template = constants.%.1] // CHECK:STDOUT: %.loc17_12.1: %.2 = tuple_literal (%.loc17_9) -// CHECK:STDOUT: %.loc17_12.2: type = interface_type @ImplicitAs, @ImplicitAs(type) [template = constants.%.7] -// CHECK:STDOUT: %.loc17_12.3: %.8 = specific_constant imports.%import_ref.3, @ImplicitAs(type) [template = constants.%.9] -// CHECK:STDOUT: %Convert.ref: %.8 = name_ref Convert, %.loc17_12.3 [template = constants.%.9] -// CHECK:STDOUT: %.loc17_12.4: type = converted %.loc17_9, [template = ] +// CHECK:STDOUT: %ImplicitAs.type: type = interface_type @ImplicitAs, @ImplicitAs(type) [template = constants.%ImplicitAs.type.3] +// CHECK:STDOUT: %.loc17_12.2: %.6 = specific_constant imports.%import_ref.3, @ImplicitAs(type) [template = constants.%.7] +// CHECK:STDOUT: %Convert.ref: %.6 = name_ref Convert, %.loc17_12.2 [template = constants.%.7] +// CHECK:STDOUT: %.loc17_12.3: type = converted %.loc17_9, [template = ] // CHECK:STDOUT: %x.var: ref = var x // CHECK:STDOUT: %x: ref = bind_name x, %x.var // CHECK:STDOUT: } @@ -80,12 +80,12 @@ var x: (1, ); // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic = %Dest (constants.%Dest)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.1: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic = %.1 (constants.%.4)] -// CHECK:STDOUT: %Self: %.4 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] +// CHECK:STDOUT: %ImplicitAs.type: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.2)] +// CHECK:STDOUT: %Self: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] // CHECK:STDOUT: %Convert.type: type = fn_type @Convert, @ImplicitAs(%Dest) [symbolic = %Convert.type (constants.%Convert.type.1)] // CHECK:STDOUT: %Convert: @ImplicitAs.%Convert.type (%Convert.type.1) = struct_value () [symbolic = %Convert (constants.%Convert.1)] -// CHECK:STDOUT: %.2: type = assoc_entity_type @ImplicitAs.%.1 (%.4), @ImplicitAs.%Convert.type (%Convert.type.1) [symbolic = %.2 (constants.%.5)] -// CHECK:STDOUT: %.3: @ImplicitAs.%.2 (%.5) = assoc_entity element0, imports.%import_ref.5 [symbolic = %.3 (constants.%.6)] +// CHECK:STDOUT: %.1: type = assoc_entity_type @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2), @ImplicitAs.%Convert.type (%Convert.type.1) [symbolic = %.1 (constants.%.4)] +// CHECK:STDOUT: %.2: @ImplicitAs.%.1 (%.4) = assoc_entity element0, imports.%import_ref.5 [symbolic = %.2 (constants.%.5)] // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: !members: @@ -95,10 +95,10 @@ var x: (1, ); // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @Convert(constants.%Dest: type, constants.%Self.1: @ImplicitAs.%.1 (%.4)) { +// CHECK:STDOUT: generic fn @Convert(constants.%Dest: type, constants.%Self.1: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2)) { // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic = %Dest (constants.%Dest)] -// CHECK:STDOUT: %.1: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic = %.1 (constants.%.4)] -// CHECK:STDOUT: %Self: %.4 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] +// CHECK:STDOUT: %ImplicitAs.type: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.2)] +// CHECK:STDOUT: %Self: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] // CHECK:STDOUT: // CHECK:STDOUT: fn[%self: @Convert.%Self (%Self.2)]() -> @Convert.%Dest (%Dest); // CHECK:STDOUT: } @@ -117,7 +117,7 @@ var x: (1, ); // CHECK:STDOUT: // CHECK:STDOUT: specific @Convert(constants.%Dest, constants.%Self.1) { // CHECK:STDOUT: %Dest => constants.%Dest -// CHECK:STDOUT: %.1 => constants.%.4 +// CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.2 // CHECK:STDOUT: %Self => constants.%Self.1 // CHECK:STDOUT: } // CHECK:STDOUT: @@ -125,11 +125,11 @@ var x: (1, ); // CHECK:STDOUT: %Dest => type // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.1 => constants.%.7 +// CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.3 // CHECK:STDOUT: %Self => constants.%Self.2 // CHECK:STDOUT: %Convert.type => constants.%Convert.type.2 // CHECK:STDOUT: %Convert => constants.%Convert.2 -// CHECK:STDOUT: %.2 => constants.%.8 -// CHECK:STDOUT: %.3 => constants.%.9 +// CHECK:STDOUT: %.1 => constants.%.6 +// CHECK:STDOUT: %.2 => constants.%.7 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/tuple/import.carbon b/toolchain/check/testdata/tuple/import.carbon index 8c905e5f5a177..ccaa30163b10d 100644 --- a/toolchain/check/testdata/tuple/import.carbon +++ b/toolchain/check/testdata/tuple/import.carbon @@ -527,22 +527,22 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: %.10: i32 = int_literal 1 [template] // CHECK:STDOUT: %tuple.2: %.4 = tuple_value (%.10, %.9) [template] // CHECK:STDOUT: %C.4: type = class_type @C, @C(%tuple.2) [template] -// CHECK:STDOUT: %ImplicitAs.type: type = generic_interface_type @ImplicitAs [template] -// CHECK:STDOUT: %ImplicitAs: %ImplicitAs.type = struct_value () [template] +// CHECK:STDOUT: %ImplicitAs.type.1: type = generic_interface_type @ImplicitAs [template] +// CHECK:STDOUT: %ImplicitAs: %ImplicitAs.type.1 = struct_value () [template] // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic] -// CHECK:STDOUT: %.11: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic] -// CHECK:STDOUT: %Self.1: @ImplicitAs.%.1 (%.11) = bind_symbolic_name Self, 1 [symbolic] -// CHECK:STDOUT: %Self.2: %.11 = bind_symbolic_name Self, 1 [symbolic] +// CHECK:STDOUT: %ImplicitAs.type.2: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic] +// CHECK:STDOUT: %Self.1: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2) = bind_symbolic_name Self, 1 [symbolic] +// CHECK:STDOUT: %Self.2: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: %Convert.type.1: type = fn_type @Convert, @ImplicitAs(%Dest) [symbolic] // CHECK:STDOUT: %Convert.1: %Convert.type.1 = struct_value () [symbolic] -// CHECK:STDOUT: %.12: type = assoc_entity_type %.11, %Convert.type.1 [symbolic] -// CHECK:STDOUT: %.13: %.12 = assoc_entity element0, imports.%import_ref.10 [symbolic] -// CHECK:STDOUT: %.14: type = interface_type @ImplicitAs, @ImplicitAs(%C.3) [template] +// CHECK:STDOUT: %.11: type = assoc_entity_type %ImplicitAs.type.2, %Convert.type.1 [symbolic] +// CHECK:STDOUT: %.12: %.11 = assoc_entity element0, imports.%import_ref.10 [symbolic] +// CHECK:STDOUT: %ImplicitAs.type.3: type = interface_type @ImplicitAs, @ImplicitAs(%C.3) [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert, @ImplicitAs(%C.3) [template] // CHECK:STDOUT: %Convert.2: %Convert.type.2 = struct_value () [template] -// CHECK:STDOUT: %.15: type = assoc_entity_type %.14, %Convert.type.2 [template] -// CHECK:STDOUT: %.16: %.15 = assoc_entity element0, imports.%import_ref.10 [template] -// CHECK:STDOUT: %.17: %.12 = assoc_entity element0, imports.%import_ref.11 [symbolic] +// CHECK:STDOUT: %.13: type = assoc_entity_type %ImplicitAs.type.3, %Convert.type.2 [template] +// CHECK:STDOUT: %.14: %.13 = assoc_entity element0, imports.%import_ref.10 [template] +// CHECK:STDOUT: %.15: %.11 = assoc_entity element0, imports.%import_ref.11 [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -562,9 +562,9 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: import Core//prelude/types/bool // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.5 = import_ref Implicit//default, inst+108, unloaded -// CHECK:STDOUT: %import_ref.6: %ImplicitAs.type = import_ref Core//prelude/operators/as, inst+40, loaded [template = constants.%ImplicitAs] +// CHECK:STDOUT: %import_ref.6: %ImplicitAs.type.1 = import_ref Core//prelude/operators/as, inst+40, loaded [template = constants.%ImplicitAs] // CHECK:STDOUT: %import_ref.7 = import_ref Core//prelude/operators/as, inst+45, unloaded -// CHECK:STDOUT: %import_ref.8: @ImplicitAs.%.2 (%.12) = import_ref Core//prelude/operators/as, inst+63, loaded [symbolic = @ImplicitAs.%.3 (constants.%.17)] +// CHECK:STDOUT: %import_ref.8: @ImplicitAs.%.1 (%.11) = import_ref Core//prelude/operators/as, inst+63, loaded [symbolic = @ImplicitAs.%.2 (constants.%.15)] // CHECK:STDOUT: %import_ref.9 = import_ref Core//prelude/operators/as, inst+56, unloaded // CHECK:STDOUT: %import_ref.10 = import_ref Core//prelude/operators/as, inst+56, unloaded // CHECK:STDOUT: %import_ref.11 = import_ref Core//prelude/operators/as, inst+56, unloaded @@ -597,12 +597,12 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic = %Dest (constants.%Dest)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.1: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic = %.1 (constants.%.11)] -// CHECK:STDOUT: %Self: %.11 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] +// CHECK:STDOUT: %ImplicitAs.type: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.2)] +// CHECK:STDOUT: %Self: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] // CHECK:STDOUT: %Convert.type: type = fn_type @Convert, @ImplicitAs(%Dest) [symbolic = %Convert.type (constants.%Convert.type.1)] // CHECK:STDOUT: %Convert: @ImplicitAs.%Convert.type (%Convert.type.1) = struct_value () [symbolic = %Convert (constants.%Convert.1)] -// CHECK:STDOUT: %.2: type = assoc_entity_type @ImplicitAs.%.1 (%.11), @ImplicitAs.%Convert.type (%Convert.type.1) [symbolic = %.2 (constants.%.12)] -// CHECK:STDOUT: %.3: @ImplicitAs.%.2 (%.12) = assoc_entity element0, imports.%import_ref.10 [symbolic = %.3 (constants.%.13)] +// CHECK:STDOUT: %.1: type = assoc_entity_type @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2), @ImplicitAs.%Convert.type (%Convert.type.1) [symbolic = %.1 (constants.%.11)] +// CHECK:STDOUT: %.2: @ImplicitAs.%.1 (%.11) = assoc_entity element0, imports.%import_ref.10 [symbolic = %.2 (constants.%.12)] // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: !members: @@ -625,10 +625,10 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: // CHECK:STDOUT: fn @F() -> %C.4; // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @Convert(constants.%Dest: type, constants.%Self.1: @ImplicitAs.%.1 (%.11)) { +// CHECK:STDOUT: generic fn @Convert(constants.%Dest: type, constants.%Self.1: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2)) { // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic = %Dest (constants.%Dest)] -// CHECK:STDOUT: %.1: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic = %.1 (constants.%.11)] -// CHECK:STDOUT: %Self: %.11 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] +// CHECK:STDOUT: %ImplicitAs.type: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.2)] +// CHECK:STDOUT: %Self: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] // CHECK:STDOUT: // CHECK:STDOUT: fn[%self: @Convert.%Self (%Self.2)]() -> @Convert.%Dest (%Dest); // CHECK:STDOUT: } @@ -638,11 +638,11 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: %F.ref: %F.type = name_ref F, imports.%import_ref.4 [template = constants.%F] // CHECK:STDOUT: %.loc10_25.1: ref %C.4 = temporary_storage // CHECK:STDOUT: %F.call: init %C.4 = call %F.ref() to %.loc10_25.1 -// CHECK:STDOUT: %.loc10_27.1: type = interface_type @ImplicitAs, @ImplicitAs(constants.%C.3) [template = constants.%.14] -// CHECK:STDOUT: %.loc10_27.2: %.15 = specific_constant imports.%import_ref.8, @ImplicitAs(constants.%C.3) [template = constants.%.16] -// CHECK:STDOUT: %Convert.ref: %.15 = name_ref Convert, %.loc10_27.2 [template = constants.%.16] +// CHECK:STDOUT: %ImplicitAs.type: type = interface_type @ImplicitAs, @ImplicitAs(constants.%C.3) [template = constants.%ImplicitAs.type.3] +// CHECK:STDOUT: %.loc10_27.1: %.13 = specific_constant imports.%import_ref.8, @ImplicitAs(constants.%C.3) [template = constants.%.14] +// CHECK:STDOUT: %Convert.ref: %.13 = name_ref Convert, %.loc10_27.1 [template = constants.%.14] // CHECK:STDOUT: %.loc10_25.2: ref %C.4 = temporary %.loc10_25.1, %F.call -// CHECK:STDOUT: %.loc10_27.3: %C.3 = converted %F.call, [template = ] +// CHECK:STDOUT: %.loc10_27.2: %C.3 = converted %F.call, [template = ] // CHECK:STDOUT: assign file.%c_bad.var, // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -677,7 +677,7 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: // CHECK:STDOUT: specific @Convert(constants.%Dest, constants.%Self.1) { // CHECK:STDOUT: %Dest => constants.%Dest -// CHECK:STDOUT: %.1 => constants.%.11 +// CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.2 // CHECK:STDOUT: %Self => constants.%Self.1 // CHECK:STDOUT: } // CHECK:STDOUT: @@ -685,11 +685,11 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: %Dest => constants.%C.3 // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.1 => constants.%.14 +// CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.3 // CHECK:STDOUT: %Self => constants.%Self.2 // CHECK:STDOUT: %Convert.type => constants.%Convert.type.2 // CHECK:STDOUT: %Convert => constants.%Convert.2 -// CHECK:STDOUT: %.2 => constants.%.15 -// CHECK:STDOUT: %.3 => constants.%.16 +// CHECK:STDOUT: %.1 => constants.%.13 +// CHECK:STDOUT: %.2 => constants.%.14 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/var/fail_storage_is_literal.carbon b/toolchain/check/testdata/var/fail_storage_is_literal.carbon index b5fbeea73cb47..a737254807f6b 100644 --- a/toolchain/check/testdata/var/fail_storage_is_literal.carbon +++ b/toolchain/check/testdata/var/fail_storage_is_literal.carbon @@ -25,22 +25,22 @@ fn Main() { // CHECK:STDOUT: %.1: type = tuple_type () [template] // CHECK:STDOUT: %Main: %Main.type = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 1 [template] -// CHECK:STDOUT: %ImplicitAs.type: type = generic_interface_type @ImplicitAs [template] -// CHECK:STDOUT: %ImplicitAs: %ImplicitAs.type = struct_value () [template] +// CHECK:STDOUT: %ImplicitAs.type.1: type = generic_interface_type @ImplicitAs [template] +// CHECK:STDOUT: %ImplicitAs: %ImplicitAs.type.1 = struct_value () [template] // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic] -// CHECK:STDOUT: %.3: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic] -// CHECK:STDOUT: %Self.1: @ImplicitAs.%.1 (%.3) = bind_symbolic_name Self, 1 [symbolic] -// CHECK:STDOUT: %Self.2: %.3 = bind_symbolic_name Self, 1 [symbolic] +// CHECK:STDOUT: %ImplicitAs.type.2: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic] +// CHECK:STDOUT: %Self.1: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2) = bind_symbolic_name Self, 1 [symbolic] +// CHECK:STDOUT: %Self.2: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: %Convert.type.1: type = fn_type @Convert, @ImplicitAs(%Dest) [symbolic] // CHECK:STDOUT: %Convert.1: %Convert.type.1 = struct_value () [symbolic] -// CHECK:STDOUT: %.4: type = assoc_entity_type %.3, %Convert.type.1 [symbolic] -// CHECK:STDOUT: %.5: %.4 = assoc_entity element0, imports.%import_ref.5 [symbolic] -// CHECK:STDOUT: %.6: type = interface_type @ImplicitAs, @ImplicitAs(type) [template] +// CHECK:STDOUT: %.3: type = assoc_entity_type %ImplicitAs.type.2, %Convert.type.1 [symbolic] +// CHECK:STDOUT: %.4: %.3 = assoc_entity element0, imports.%import_ref.5 [symbolic] +// CHECK:STDOUT: %ImplicitAs.type.3: type = interface_type @ImplicitAs, @ImplicitAs(type) [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert, @ImplicitAs(type) [template] // CHECK:STDOUT: %Convert.2: %Convert.type.2 = struct_value () [template] -// CHECK:STDOUT: %.7: type = assoc_entity_type %.6, %Convert.type.2 [template] -// CHECK:STDOUT: %.8: %.7 = assoc_entity element0, imports.%import_ref.5 [template] -// CHECK:STDOUT: %.9: %.4 = assoc_entity element0, imports.%import_ref.6 [symbolic] +// CHECK:STDOUT: %.5: type = assoc_entity_type %ImplicitAs.type.3, %Convert.type.2 [template] +// CHECK:STDOUT: %.6: %.5 = assoc_entity element0, imports.%import_ref.5 [template] +// CHECK:STDOUT: %.7: %.3 = assoc_entity element0, imports.%import_ref.6 [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -55,9 +55,9 @@ fn Main() { // CHECK:STDOUT: import Core//prelude/operators/comparison // CHECK:STDOUT: import Core//prelude/types/bool // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.1: %ImplicitAs.type = import_ref Core//prelude/operators/as, inst+40, loaded [template = constants.%ImplicitAs] +// CHECK:STDOUT: %import_ref.1: %ImplicitAs.type.1 = import_ref Core//prelude/operators/as, inst+40, loaded [template = constants.%ImplicitAs] // CHECK:STDOUT: %import_ref.2 = import_ref Core//prelude/operators/as, inst+45, unloaded -// CHECK:STDOUT: %import_ref.3: @ImplicitAs.%.2 (%.4) = import_ref Core//prelude/operators/as, inst+63, loaded [symbolic = @ImplicitAs.%.3 (constants.%.9)] +// CHECK:STDOUT: %import_ref.3: @ImplicitAs.%.1 (%.3) = import_ref Core//prelude/operators/as, inst+63, loaded [symbolic = @ImplicitAs.%.2 (constants.%.7)] // CHECK:STDOUT: %import_ref.4 = import_ref Core//prelude/operators/as, inst+56, unloaded // CHECK:STDOUT: %import_ref.5 = import_ref Core//prelude/operators/as, inst+56, unloaded // CHECK:STDOUT: %import_ref.6 = import_ref Core//prelude/operators/as, inst+56, unloaded @@ -76,12 +76,12 @@ fn Main() { // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic = %Dest (constants.%Dest)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.1: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic = %.1 (constants.%.3)] -// CHECK:STDOUT: %Self: %.3 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] +// CHECK:STDOUT: %ImplicitAs.type: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.2)] +// CHECK:STDOUT: %Self: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] // CHECK:STDOUT: %Convert.type: type = fn_type @Convert, @ImplicitAs(%Dest) [symbolic = %Convert.type (constants.%Convert.type.1)] // CHECK:STDOUT: %Convert: @ImplicitAs.%Convert.type (%Convert.type.1) = struct_value () [symbolic = %Convert (constants.%Convert.1)] -// CHECK:STDOUT: %.2: type = assoc_entity_type @ImplicitAs.%.1 (%.3), @ImplicitAs.%Convert.type (%Convert.type.1) [symbolic = %.2 (constants.%.4)] -// CHECK:STDOUT: %.3: @ImplicitAs.%.2 (%.4) = assoc_entity element0, imports.%import_ref.5 [symbolic = %.3 (constants.%.5)] +// CHECK:STDOUT: %.1: type = assoc_entity_type @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2), @ImplicitAs.%Convert.type (%Convert.type.1) [symbolic = %.1 (constants.%.3)] +// CHECK:STDOUT: %.2: @ImplicitAs.%.1 (%.3) = assoc_entity element0, imports.%import_ref.5 [symbolic = %.2 (constants.%.4)] // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: !members: @@ -94,10 +94,10 @@ fn Main() { // CHECK:STDOUT: fn @Main() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %.loc18_10.1: i32 = int_literal 1 [template = constants.%.2] -// CHECK:STDOUT: %.loc18_10.2: type = interface_type @ImplicitAs, @ImplicitAs(type) [template = constants.%.6] -// CHECK:STDOUT: %.loc18_10.3: %.7 = specific_constant imports.%import_ref.3, @ImplicitAs(type) [template = constants.%.8] -// CHECK:STDOUT: %Convert.ref: %.7 = name_ref Convert, %.loc18_10.3 [template = constants.%.8] -// CHECK:STDOUT: %.loc18_10.4: type = converted %.loc18_10.1, [template = ] +// CHECK:STDOUT: %ImplicitAs.type: type = interface_type @ImplicitAs, @ImplicitAs(type) [template = constants.%ImplicitAs.type.3] +// CHECK:STDOUT: %.loc18_10.2: %.5 = specific_constant imports.%import_ref.3, @ImplicitAs(type) [template = constants.%.6] +// CHECK:STDOUT: %Convert.ref: %.5 = name_ref Convert, %.loc18_10.2 [template = constants.%.6] +// CHECK:STDOUT: %.loc18_10.3: type = converted %.loc18_10.1, [template = ] // CHECK:STDOUT: %x.var: ref = var x // CHECK:STDOUT: %x: ref = bind_name x, %x.var // CHECK:STDOUT: %.loc18_14: i32 = int_literal 1 [template = constants.%.2] @@ -105,10 +105,10 @@ fn Main() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @Convert(constants.%Dest: type, constants.%Self.1: @ImplicitAs.%.1 (%.3)) { +// CHECK:STDOUT: generic fn @Convert(constants.%Dest: type, constants.%Self.1: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2)) { // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic = %Dest (constants.%Dest)] -// CHECK:STDOUT: %.1: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic = %.1 (constants.%.3)] -// CHECK:STDOUT: %Self: %.3 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] +// CHECK:STDOUT: %ImplicitAs.type: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.2)] +// CHECK:STDOUT: %Self: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] // CHECK:STDOUT: // CHECK:STDOUT: fn[%self: @Convert.%Self (%Self.2)]() -> @Convert.%Dest (%Dest); // CHECK:STDOUT: } @@ -127,7 +127,7 @@ fn Main() { // CHECK:STDOUT: // CHECK:STDOUT: specific @Convert(constants.%Dest, constants.%Self.1) { // CHECK:STDOUT: %Dest => constants.%Dest -// CHECK:STDOUT: %.1 => constants.%.3 +// CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.2 // CHECK:STDOUT: %Self => constants.%Self.1 // CHECK:STDOUT: } // CHECK:STDOUT: @@ -135,11 +135,11 @@ fn Main() { // CHECK:STDOUT: %Dest => type // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.1 => constants.%.6 +// CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.3 // CHECK:STDOUT: %Self => constants.%Self.2 // CHECK:STDOUT: %Convert.type => constants.%Convert.type.2 // CHECK:STDOUT: %Convert => constants.%Convert.2 -// CHECK:STDOUT: %.2 => constants.%.7 -// CHECK:STDOUT: %.3 => constants.%.8 +// CHECK:STDOUT: %.1 => constants.%.5 +// CHECK:STDOUT: %.2 => constants.%.6 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/where_expr/constraints.carbon b/toolchain/check/testdata/where_expr/constraints.carbon index 2bc1215497868..4ef130096e262 100644 --- a/toolchain/check/testdata/where_expr/constraints.carbon +++ b/toolchain/check/testdata/where_expr/constraints.carbon @@ -82,28 +82,28 @@ fn NotEmptyStruct() { // CHECK:STDOUT: --- state_constraints.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: type = interface_type @J [template] -// CHECK:STDOUT: %Self.1: %.1 = bind_symbolic_name Self, 0 [symbolic] -// CHECK:STDOUT: %.2: type = interface_type @I [template] -// CHECK:STDOUT: %Self.2: %.2 = bind_symbolic_name Self, 0 [symbolic] -// CHECK:STDOUT: %.3: type = assoc_entity_type %.2, type [template] -// CHECK:STDOUT: %.4: %.3 = assoc_entity element0, @I.%Member [template] -// CHECK:STDOUT: %.5: type = tuple_type () [template] -// CHECK:STDOUT: %.6: type = assoc_entity_type %.2, %.1 [template] -// CHECK:STDOUT: %.7: %.6 = assoc_entity element1, @I.%Second [template] -// CHECK:STDOUT: %.Self.1: %.2 = bind_symbolic_name .Self, 0 [symbolic] -// CHECK:STDOUT: %.8: type = struct_type {} [template] -// CHECK:STDOUT: %T: %.2 = bind_symbolic_name T, 0 [symbolic] +// CHECK:STDOUT: %J.type: type = interface_type @J [template] +// CHECK:STDOUT: %Self.1: %J.type = bind_symbolic_name Self, 0 [symbolic] +// CHECK:STDOUT: %I.type: type = interface_type @I [template] +// CHECK:STDOUT: %Self.2: %I.type = bind_symbolic_name Self, 0 [symbolic] +// CHECK:STDOUT: %.1: type = assoc_entity_type %I.type, type [template] +// CHECK:STDOUT: %.2: %.1 = assoc_entity element0, @I.%Member [template] +// CHECK:STDOUT: %.3: type = tuple_type () [template] +// CHECK:STDOUT: %.4: type = assoc_entity_type %I.type, %J.type [template] +// CHECK:STDOUT: %.5: %.4 = assoc_entity element1, @I.%Second [template] +// CHECK:STDOUT: %.Self.1: %I.type = bind_symbolic_name .Self, 0 [symbolic] +// CHECK:STDOUT: %.6: type = struct_type {} [template] +// CHECK:STDOUT: %T: %I.type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %Equal.type: type = fn_type @Equal [template] // CHECK:STDOUT: %Equal: %Equal.type = struct_value () [template] -// CHECK:STDOUT: %U: %.2 = bind_symbolic_name U, 0 [symbolic] +// CHECK:STDOUT: %U: %I.type = bind_symbolic_name U, 0 [symbolic] // CHECK:STDOUT: %EqualEqual.type: type = fn_type @EqualEqual [template] // CHECK:STDOUT: %EqualEqual: %EqualEqual.type = struct_value () [template] -// CHECK:STDOUT: %.Self.2: %.1 = bind_symbolic_name .Self, 0 [symbolic] -// CHECK:STDOUT: %V: %.1 = bind_symbolic_name V, 0 [symbolic] +// CHECK:STDOUT: %.Self.2: %J.type = bind_symbolic_name .Self, 0 [symbolic] +// CHECK:STDOUT: %V: %J.type = bind_symbolic_name V, 0 [symbolic] // CHECK:STDOUT: %Impls.type: type = fn_type @Impls [template] // CHECK:STDOUT: %Impls: %Impls.type = struct_value () [template] -// CHECK:STDOUT: %W: %.2 = bind_symbolic_name W, 0 [symbolic] +// CHECK:STDOUT: %W: %I.type = bind_symbolic_name W, 0 [symbolic] // CHECK:STDOUT: %And.type: type = fn_type @And [template] // CHECK:STDOUT: %And: %And.type = struct_value () [template] // CHECK:STDOUT: } @@ -132,71 +132,71 @@ fn NotEmptyStruct() { // CHECK:STDOUT: .And = %And.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %J.decl: type = interface_decl @J [template = constants.%.1] {} {} -// CHECK:STDOUT: %I.decl: type = interface_decl @I [template = constants.%.2] {} {} +// CHECK:STDOUT: %J.decl: type = interface_decl @J [template = constants.%J.type] {} {} +// CHECK:STDOUT: %I.decl: type = interface_decl @I [template = constants.%I.type] {} {} // CHECK:STDOUT: %Equal.decl: %Equal.type = fn_decl @Equal [template = constants.%Equal] { -// CHECK:STDOUT: %T.patt: %.2 = symbolic_binding_pattern T, 0 +// CHECK:STDOUT: %T.patt: %I.type = symbolic_binding_pattern T, 0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [template = constants.%.2] -// CHECK:STDOUT: %.Self: %.2 = bind_symbolic_name .Self, 0 [symbolic = constants.%.Self.1] -// CHECK:STDOUT: %.Self.ref: %.2 = name_ref .Self, %.Self [symbolic = constants.%.Self.1] -// CHECK:STDOUT: %Member.ref: %.3 = name_ref Member, @I.%.loc7 [template = constants.%.4] -// CHECK:STDOUT: %.loc11_33: %.8 = struct_literal () -// CHECK:STDOUT: %.loc11_16: type = where_expr %.Self [template = constants.%.2] { +// CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [template = constants.%I.type] +// CHECK:STDOUT: %.Self: %I.type = bind_symbolic_name .Self, 0 [symbolic = constants.%.Self.1] +// CHECK:STDOUT: %.Self.ref: %I.type = name_ref .Self, %.Self [symbolic = constants.%.Self.1] +// CHECK:STDOUT: %Member.ref: %.1 = name_ref Member, @I.%.loc7 [template = constants.%.2] +// CHECK:STDOUT: %.loc11_33: %.6 = struct_literal () +// CHECK:STDOUT: %.loc11_16: type = where_expr %.Self [template = constants.%I.type] { // CHECK:STDOUT: requirement_rewrite %Member.ref, %.loc11_33 // CHECK:STDOUT: } -// CHECK:STDOUT: %T.param: %.2 = param T, runtime_param -// CHECK:STDOUT: %T.loc11: %.2 = bind_symbolic_name T, 0, %T.param [symbolic = %T.1 (constants.%T)] +// CHECK:STDOUT: %T.param: %I.type = param T, runtime_param +// CHECK:STDOUT: %T.loc11: %I.type = bind_symbolic_name T, 0, %T.param [symbolic = %T.1 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: %EqualEqual.decl: %EqualEqual.type = fn_decl @EqualEqual [template = constants.%EqualEqual] { -// CHECK:STDOUT: %U.patt: %.2 = symbolic_binding_pattern U, 0 +// CHECK:STDOUT: %U.patt: %I.type = symbolic_binding_pattern U, 0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [template = constants.%.2] -// CHECK:STDOUT: %.Self: %.2 = bind_symbolic_name .Self, 0 [symbolic = constants.%.Self.1] -// CHECK:STDOUT: %.Self.ref: %.2 = name_ref .Self, %.Self [symbolic = constants.%.Self.1] -// CHECK:STDOUT: %.loc13_37: %.5 = tuple_literal () -// CHECK:STDOUT: %.loc13_21: type = where_expr %.Self [template = constants.%.2] { +// CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [template = constants.%I.type] +// CHECK:STDOUT: %.Self: %I.type = bind_symbolic_name .Self, 0 [symbolic = constants.%.Self.1] +// CHECK:STDOUT: %.Self.ref: %I.type = name_ref .Self, %.Self [symbolic = constants.%.Self.1] +// CHECK:STDOUT: %.loc13_37: %.3 = tuple_literal () +// CHECK:STDOUT: %.loc13_21: type = where_expr %.Self [template = constants.%I.type] { // CHECK:STDOUT: requirement_equivalent %.Self.ref, %.loc13_37 // CHECK:STDOUT: } -// CHECK:STDOUT: %U.param: %.2 = param U, runtime_param -// CHECK:STDOUT: %U.loc13: %.2 = bind_symbolic_name U, 0, %U.param [symbolic = %U.1 (constants.%U)] +// CHECK:STDOUT: %U.param: %I.type = param U, runtime_param +// CHECK:STDOUT: %U.loc13: %I.type = bind_symbolic_name U, 0, %U.param [symbolic = %U.1 (constants.%U)] // CHECK:STDOUT: } // CHECK:STDOUT: %Impls.decl: %Impls.type = fn_decl @Impls [template = constants.%Impls] { -// CHECK:STDOUT: %V.patt: %.1 = symbolic_binding_pattern V, 0 +// CHECK:STDOUT: %V.patt: %J.type = symbolic_binding_pattern V, 0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %J.ref: type = name_ref J, file.%J.decl [template = constants.%.1] -// CHECK:STDOUT: %.Self: %.1 = bind_symbolic_name .Self, 0 [symbolic = constants.%.Self.2] -// CHECK:STDOUT: %.Self.ref: %.1 = name_ref .Self, %.Self [symbolic = constants.%.Self.2] -// CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [template = constants.%.2] -// CHECK:STDOUT: %.loc15: type = where_expr %.Self [template = constants.%.1] { +// CHECK:STDOUT: %J.ref: type = name_ref J, file.%J.decl [template = constants.%J.type] +// CHECK:STDOUT: %.Self: %J.type = bind_symbolic_name .Self, 0 [symbolic = constants.%.Self.2] +// CHECK:STDOUT: %.Self.ref: %J.type = name_ref .Self, %.Self [symbolic = constants.%.Self.2] +// CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [template = constants.%I.type] +// CHECK:STDOUT: %.loc15: type = where_expr %.Self [template = constants.%J.type] { // CHECK:STDOUT: requirement_impls %.Self.ref, %I.ref // CHECK:STDOUT: } -// CHECK:STDOUT: %V.param: %.1 = param V, runtime_param -// CHECK:STDOUT: %V.loc15: %.1 = bind_symbolic_name V, 0, %V.param [symbolic = %V.1 (constants.%V)] +// CHECK:STDOUT: %V.param: %J.type = param V, runtime_param +// CHECK:STDOUT: %V.loc15: %J.type = bind_symbolic_name V, 0, %V.param [symbolic = %V.1 (constants.%V)] // CHECK:STDOUT: } // CHECK:STDOUT: %And.decl: %And.type = fn_decl @And [template = constants.%And] { -// CHECK:STDOUT: %W.patt: %.2 = symbolic_binding_pattern W, 0 +// CHECK:STDOUT: %W.patt: %I.type = symbolic_binding_pattern W, 0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %I.ref.loc17_12: type = name_ref I, file.%I.decl [template = constants.%.2] -// CHECK:STDOUT: %.Self: %.2 = bind_symbolic_name .Self, 0 [symbolic = constants.%.Self.1] -// CHECK:STDOUT: %.Self.ref.loc17_20: %.2 = name_ref .Self, %.Self [symbolic = constants.%.Self.1] -// CHECK:STDOUT: %Second.ref.loc17_20: %.6 = name_ref Second, @I.%.loc8 [template = constants.%.7] -// CHECK:STDOUT: %I.ref.loc17_34: type = name_ref I, file.%I.decl [template = constants.%.2] -// CHECK:STDOUT: %.Self.ref.loc17_40: %.2 = name_ref .Self, %.Self [symbolic = constants.%.Self.1] -// CHECK:STDOUT: %Member.ref: %.3 = name_ref Member, @I.%.loc7 [template = constants.%.4] -// CHECK:STDOUT: %.Self.ref.loc17_50: %.2 = name_ref .Self, %.Self [symbolic = constants.%.Self.1] -// CHECK:STDOUT: %Second.ref.loc17_50: %.6 = name_ref Second, @I.%.loc8 [template = constants.%.7] -// CHECK:STDOUT: %.loc17: type = where_expr %.Self [template = constants.%.2] { +// CHECK:STDOUT: %I.ref.loc17_12: type = name_ref I, file.%I.decl [template = constants.%I.type] +// CHECK:STDOUT: %.Self: %I.type = bind_symbolic_name .Self, 0 [symbolic = constants.%.Self.1] +// CHECK:STDOUT: %.Self.ref.loc17_20: %I.type = name_ref .Self, %.Self [symbolic = constants.%.Self.1] +// CHECK:STDOUT: %Second.ref.loc17_20: %.4 = name_ref Second, @I.%.loc8 [template = constants.%.5] +// CHECK:STDOUT: %I.ref.loc17_34: type = name_ref I, file.%I.decl [template = constants.%I.type] +// CHECK:STDOUT: %.Self.ref.loc17_40: %I.type = name_ref .Self, %.Self [symbolic = constants.%.Self.1] +// CHECK:STDOUT: %Member.ref: %.1 = name_ref Member, @I.%.loc7 [template = constants.%.2] +// CHECK:STDOUT: %.Self.ref.loc17_50: %I.type = name_ref .Self, %.Self [symbolic = constants.%.Self.1] +// CHECK:STDOUT: %Second.ref.loc17_50: %.4 = name_ref Second, @I.%.loc8 [template = constants.%.5] +// CHECK:STDOUT: %.loc17: type = where_expr %.Self [template = constants.%I.type] { // CHECK:STDOUT: requirement_impls %Second.ref.loc17_20, %I.ref.loc17_34 // CHECK:STDOUT: requirement_rewrite %Member.ref, %Second.ref.loc17_50 // CHECK:STDOUT: } -// CHECK:STDOUT: %W.param: %.2 = param W, runtime_param -// CHECK:STDOUT: %W.loc17: %.2 = bind_symbolic_name W, 0, %W.param [symbolic = %W.1 (constants.%W)] +// CHECK:STDOUT: %W.param: %I.type = param W, runtime_param +// CHECK:STDOUT: %W.loc17: %I.type = bind_symbolic_name W, 0, %W.param [symbolic = %W.1 (constants.%W)] // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @J { -// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self, 0 [symbolic = constants.%Self.1] +// CHECK:STDOUT: %Self: %J.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self.1] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -204,12 +204,12 @@ fn NotEmptyStruct() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @I { -// CHECK:STDOUT: %Self: %.2 = bind_symbolic_name Self, 0 [symbolic = constants.%Self.2] +// CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self.2] // CHECK:STDOUT: %Member: type = assoc_const_decl Member [template] -// CHECK:STDOUT: %.loc7: %.3 = assoc_entity element0, %Member [template = constants.%.4] -// CHECK:STDOUT: %J.ref: type = name_ref J, file.%J.decl [template = constants.%.1] -// CHECK:STDOUT: %Second: %.1 = assoc_const_decl Second [template] -// CHECK:STDOUT: %.loc8: %.6 = assoc_entity element1, %Second [template = constants.%.7] +// CHECK:STDOUT: %.loc7: %.1 = assoc_entity element0, %Member [template = constants.%.2] +// CHECK:STDOUT: %J.ref: type = name_ref J, file.%J.decl [template = constants.%J.type] +// CHECK:STDOUT: %Second: %J.type = assoc_const_decl Second [template] +// CHECK:STDOUT: %.loc8: %.4 = assoc_entity element1, %Second [template = constants.%.5] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -218,28 +218,28 @@ fn NotEmptyStruct() { // CHECK:STDOUT: witness = (%Member, %Second) // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @Equal(%T.loc11: %.2) { -// CHECK:STDOUT: %T.1: %.2 = bind_symbolic_name T, 0 [symbolic = %T.1 (constants.%T)] +// CHECK:STDOUT: generic fn @Equal(%T.loc11: %I.type) { +// CHECK:STDOUT: %T.1: %I.type = bind_symbolic_name T, 0 [symbolic = %T.1 (constants.%T)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%T.loc11: %.2); +// CHECK:STDOUT: fn(%T.loc11: %I.type); // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @EqualEqual(%U.loc13: %.2) { -// CHECK:STDOUT: %U.1: %.2 = bind_symbolic_name U, 0 [symbolic = %U.1 (constants.%U)] +// CHECK:STDOUT: generic fn @EqualEqual(%U.loc13: %I.type) { +// CHECK:STDOUT: %U.1: %I.type = bind_symbolic_name U, 0 [symbolic = %U.1 (constants.%U)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%U.loc13: %.2); +// CHECK:STDOUT: fn(%U.loc13: %I.type); // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @Impls(%V.loc15: %.1) { -// CHECK:STDOUT: %V.1: %.1 = bind_symbolic_name V, 0 [symbolic = %V.1 (constants.%V)] +// CHECK:STDOUT: generic fn @Impls(%V.loc15: %J.type) { +// CHECK:STDOUT: %V.1: %J.type = bind_symbolic_name V, 0 [symbolic = %V.1 (constants.%V)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%V.loc15: %.1); +// CHECK:STDOUT: fn(%V.loc15: %J.type); // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @And(%W.loc17: %.2) { -// CHECK:STDOUT: %W.1: %.2 = bind_symbolic_name W, 0 [symbolic = %W.1 (constants.%W)] +// CHECK:STDOUT: generic fn @And(%W.loc17: %I.type) { +// CHECK:STDOUT: %W.1: %I.type = bind_symbolic_name W, 0 [symbolic = %W.1 (constants.%W)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%W.loc17: %.2); +// CHECK:STDOUT: fn(%W.loc17: %I.type); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Equal(constants.%T) { @@ -261,21 +261,21 @@ fn NotEmptyStruct() { // CHECK:STDOUT: --- todo_check_constraints.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: type = interface_type @I [template] -// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self, 0 [symbolic] -// CHECK:STDOUT: %.Self: %.1 = bind_symbolic_name .Self, 0 [symbolic] -// CHECK:STDOUT: %.2: type = tuple_type () [template] -// CHECK:STDOUT: %.3: type = assoc_entity_type %.1, type [template] -// CHECK:STDOUT: %.4: %.3 = assoc_entity element0, imports.%import_ref.12 [template] -// CHECK:STDOUT: %.5: i32 = int_literal 2 [template] -// CHECK:STDOUT: %X: %.1 = bind_symbolic_name X, 0 [symbolic] +// CHECK:STDOUT: %I.type: type = interface_type @I [template] +// CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic] +// CHECK:STDOUT: %.Self: %I.type = bind_symbolic_name .Self, 0 [symbolic] +// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %.2: type = assoc_entity_type %I.type, type [template] +// CHECK:STDOUT: %.3: %.2 = assoc_entity element0, imports.%import_ref.12 [template] +// CHECK:STDOUT: %.4: i32 = int_literal 2 [template] +// CHECK:STDOUT: %X: %I.type = bind_symbolic_name X, 0 [symbolic] // CHECK:STDOUT: %TypeMismatch.type: type = fn_type @TypeMismatch [template] // CHECK:STDOUT: %TypeMismatch: %TypeMismatch.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %import_ref.1 = import_ref Main//state_constraints, inst+3, unloaded -// CHECK:STDOUT: %import_ref.2: type = import_ref Main//state_constraints, inst+7, loaded [template = constants.%.1] +// CHECK:STDOUT: %import_ref.2: type = import_ref Main//state_constraints, inst+7, loaded [template = constants.%I.type] // CHECK:STDOUT: %import_ref.3 = import_ref Main//state_constraints, inst+34, unloaded // CHECK:STDOUT: %import_ref.4 = import_ref Main//state_constraints, inst+48, unloaded // CHECK:STDOUT: %import_ref.5 = import_ref Main//state_constraints, inst+63, unloaded @@ -291,7 +291,7 @@ fn NotEmptyStruct() { // CHECK:STDOUT: import Core//prelude/types/bool // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.7 = import_ref Main//state_constraints, inst+9, unloaded -// CHECK:STDOUT: %import_ref.8: %.3 = import_ref Main//state_constraints, inst+13, loaded [template = constants.%.4] +// CHECK:STDOUT: %import_ref.8: %.2 = import_ref Main//state_constraints, inst+13, loaded [template = constants.%.3] // CHECK:STDOUT: %import_ref.9 = import_ref Main//state_constraints, inst+19, unloaded // CHECK:STDOUT: %import_ref.10 = import_ref Main//state_constraints, inst+11, unloaded // CHECK:STDOUT: %import_ref.11 = import_ref Main//state_constraints, inst+17, unloaded @@ -312,18 +312,18 @@ fn NotEmptyStruct() { // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %default.import = import // CHECK:STDOUT: %TypeMismatch.decl: %TypeMismatch.type = fn_decl @TypeMismatch [template = constants.%TypeMismatch] { -// CHECK:STDOUT: %X.patt: %.1 = symbolic_binding_pattern X, 0 +// CHECK:STDOUT: %X.patt: %I.type = symbolic_binding_pattern X, 0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %I.ref: type = name_ref I, imports.%import_ref.2 [template = constants.%.1] -// CHECK:STDOUT: %.Self: %.1 = bind_symbolic_name .Self, 0 [symbolic = constants.%.Self] -// CHECK:STDOUT: %.Self.ref: %.1 = name_ref .Self, %.Self [symbolic = constants.%.Self] -// CHECK:STDOUT: %Member.ref: %.3 = name_ref Member, imports.%import_ref.8 [template = constants.%.4] -// CHECK:STDOUT: %.loc8_39: i32 = int_literal 2 [template = constants.%.5] -// CHECK:STDOUT: %.loc8_23: type = where_expr %.Self [template = constants.%.1] { +// CHECK:STDOUT: %I.ref: type = name_ref I, imports.%import_ref.2 [template = constants.%I.type] +// CHECK:STDOUT: %.Self: %I.type = bind_symbolic_name .Self, 0 [symbolic = constants.%.Self] +// CHECK:STDOUT: %.Self.ref: %I.type = name_ref .Self, %.Self [symbolic = constants.%.Self] +// CHECK:STDOUT: %Member.ref: %.2 = name_ref Member, imports.%import_ref.8 [template = constants.%.3] +// CHECK:STDOUT: %.loc8_39: i32 = int_literal 2 [template = constants.%.4] +// CHECK:STDOUT: %.loc8_23: type = where_expr %.Self [template = constants.%I.type] { // CHECK:STDOUT: requirement_rewrite %Member.ref, %.loc8_39 // CHECK:STDOUT: } -// CHECK:STDOUT: %X.param: %.1 = param X, runtime_param -// CHECK:STDOUT: %X.loc8: %.1 = bind_symbolic_name X, 0, %X.param [symbolic = %X.1 (constants.%X)] +// CHECK:STDOUT: %X.param: %I.type = param X, runtime_param +// CHECK:STDOUT: %X.loc8: %I.type = bind_symbolic_name X, 0, %X.param [symbolic = %X.1 (constants.%X)] // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -335,10 +335,10 @@ fn NotEmptyStruct() { // CHECK:STDOUT: witness = (imports.%import_ref.10, imports.%import_ref.11) // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @TypeMismatch(%X.loc8: %.1) { -// CHECK:STDOUT: %X.1: %.1 = bind_symbolic_name X, 0 [symbolic = %X.1 (constants.%X)] +// CHECK:STDOUT: generic fn @TypeMismatch(%X.loc8: %I.type) { +// CHECK:STDOUT: %X.1: %I.type = bind_symbolic_name X, 0 [symbolic = %X.1 (constants.%X)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%X.loc8: %.1); +// CHECK:STDOUT: fn(%X.loc8: %I.type); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @TypeMismatch(constants.%X) { @@ -351,33 +351,33 @@ fn NotEmptyStruct() { // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %.1: type = struct_type {} [template] // CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] -// CHECK:STDOUT: %.3: type = interface_type @J [template] -// CHECK:STDOUT: %Self.1: %.3 = bind_symbolic_name Self, 0 [symbolic] -// CHECK:STDOUT: %.4: type = tuple_type () [template] -// CHECK:STDOUT: %.5: = interface_witness () [template] +// CHECK:STDOUT: %J.type: type = interface_type @J [template] +// CHECK:STDOUT: %Self.1: %J.type = bind_symbolic_name Self, 0 [symbolic] +// CHECK:STDOUT: %.3: type = tuple_type () [template] +// CHECK:STDOUT: %.4: = interface_witness () [template] // CHECK:STDOUT: %DoesNotImplI.type: type = fn_type @DoesNotImplI [template] // CHECK:STDOUT: %DoesNotImplI: %DoesNotImplI.type = struct_value () [template] // CHECK:STDOUT: %Impls.type: type = fn_type @Impls [template] // CHECK:STDOUT: %Impls: %Impls.type = struct_value () [template] -// CHECK:STDOUT: %V: %.3 = bind_symbolic_name V, 0 [symbolic] -// CHECK:STDOUT: %ImplicitAs.type: type = generic_interface_type @ImplicitAs [template] -// CHECK:STDOUT: %ImplicitAs: %ImplicitAs.type = struct_value () [template] +// CHECK:STDOUT: %V: %J.type = bind_symbolic_name V, 0 [symbolic] +// CHECK:STDOUT: %ImplicitAs.type.1: type = generic_interface_type @ImplicitAs [template] +// CHECK:STDOUT: %ImplicitAs: %ImplicitAs.type.1 = struct_value () [template] // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic] -// CHECK:STDOUT: %.6: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic] -// CHECK:STDOUT: %Self.2: @ImplicitAs.%.1 (%.6) = bind_symbolic_name Self, 1 [symbolic] -// CHECK:STDOUT: %Self.3: %.6 = bind_symbolic_name Self, 1 [symbolic] +// CHECK:STDOUT: %ImplicitAs.type.2: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic] +// CHECK:STDOUT: %Self.2: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2) = bind_symbolic_name Self, 1 [symbolic] +// CHECK:STDOUT: %Self.3: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: %Convert.type.1: type = fn_type @Convert, @ImplicitAs(%Dest) [symbolic] // CHECK:STDOUT: %Convert.1: %Convert.type.1 = struct_value () [symbolic] -// CHECK:STDOUT: %.7: type = assoc_entity_type %.6, %Convert.type.1 [symbolic] -// CHECK:STDOUT: %.8: %.7 = assoc_entity element0, imports.%import_ref.12 [symbolic] -// CHECK:STDOUT: %.9: type = interface_type @ImplicitAs, @ImplicitAs(%.3) [template] -// CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert, @ImplicitAs(%.3) [template] +// CHECK:STDOUT: %.5: type = assoc_entity_type %ImplicitAs.type.2, %Convert.type.1 [symbolic] +// CHECK:STDOUT: %.6: %.5 = assoc_entity element0, imports.%import_ref.12 [symbolic] +// CHECK:STDOUT: %ImplicitAs.type.3: type = interface_type @ImplicitAs, @ImplicitAs(%J.type) [template] +// CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert, @ImplicitAs(%J.type) [template] // CHECK:STDOUT: %Convert.2: %Convert.type.2 = struct_value () [template] -// CHECK:STDOUT: %.10: type = assoc_entity_type %.9, %Convert.type.2 [template] -// CHECK:STDOUT: %.11: %.10 = assoc_entity element0, imports.%import_ref.12 [template] -// CHECK:STDOUT: %.12: %.7 = assoc_entity element0, imports.%import_ref.13 [symbolic] -// CHECK:STDOUT: %.Self: %.3 = bind_symbolic_name .Self, 0 [symbolic] -// CHECK:STDOUT: %Y: %.3 = bind_symbolic_name Y, 0 [symbolic] +// CHECK:STDOUT: %.7: type = assoc_entity_type %ImplicitAs.type.3, %Convert.type.2 [template] +// CHECK:STDOUT: %.8: %.7 = assoc_entity element0, imports.%import_ref.12 [template] +// CHECK:STDOUT: %.9: %.5 = assoc_entity element0, imports.%import_ref.13 [symbolic] +// CHECK:STDOUT: %.Self: %J.type = bind_symbolic_name .Self, 0 [symbolic] +// CHECK:STDOUT: %Y: %J.type = bind_symbolic_name Y, 0 [symbolic] // CHECK:STDOUT: %EmptyStruct.type: type = fn_type @EmptyStruct [template] // CHECK:STDOUT: %EmptyStruct: %EmptyStruct.type = struct_value () [template] // CHECK:STDOUT: %NotEmptyStruct.type: type = fn_type @NotEmptyStruct [template] @@ -385,7 +385,7 @@ fn NotEmptyStruct() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { -// CHECK:STDOUT: %import_ref.1: type = import_ref Main//state_constraints, inst+3, loaded [template = constants.%.3] +// CHECK:STDOUT: %import_ref.1: type = import_ref Main//state_constraints, inst+3, loaded [template = constants.%J.type] // CHECK:STDOUT: %import_ref.2 = import_ref Main//state_constraints, inst+7, unloaded // CHECK:STDOUT: %import_ref.3 = import_ref Main//state_constraints, inst+34, unloaded // CHECK:STDOUT: %import_ref.4 = import_ref Main//state_constraints, inst+48, unloaded @@ -403,9 +403,9 @@ fn NotEmptyStruct() { // CHECK:STDOUT: import Core//prelude/types/bool // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.7 = import_ref Main//state_constraints, inst+5, unloaded -// CHECK:STDOUT: %import_ref.8: %ImplicitAs.type = import_ref Core//prelude/operators/as, inst+40, loaded [template = constants.%ImplicitAs] +// CHECK:STDOUT: %import_ref.8: %ImplicitAs.type.1 = import_ref Core//prelude/operators/as, inst+40, loaded [template = constants.%ImplicitAs] // CHECK:STDOUT: %import_ref.9 = import_ref Core//prelude/operators/as, inst+45, unloaded -// CHECK:STDOUT: %import_ref.10: @ImplicitAs.%.2 (%.7) = import_ref Core//prelude/operators/as, inst+63, loaded [symbolic = @ImplicitAs.%.3 (constants.%.12)] +// CHECK:STDOUT: %import_ref.10: @ImplicitAs.%.1 (%.5) = import_ref Core//prelude/operators/as, inst+63, loaded [symbolic = @ImplicitAs.%.2 (constants.%.9)] // CHECK:STDOUT: %import_ref.11 = import_ref Core//prelude/operators/as, inst+56, unloaded // CHECK:STDOUT: %import_ref.12 = import_ref Core//prelude/operators/as, inst+56, unloaded // CHECK:STDOUT: %import_ref.13 = import_ref Core//prelude/operators/as, inst+56, unloaded @@ -430,21 +430,21 @@ fn NotEmptyStruct() { // CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {} {} // CHECK:STDOUT: impl_decl @impl [template] {} { // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %J.ref: type = name_ref J, imports.%import_ref.1 [template = constants.%.3] +// CHECK:STDOUT: %J.ref: type = name_ref J, imports.%import_ref.1 [template = constants.%J.type] // CHECK:STDOUT: } // CHECK:STDOUT: %DoesNotImplI.decl: %DoesNotImplI.type = fn_decl @DoesNotImplI [template = constants.%DoesNotImplI] {} {} // CHECK:STDOUT: %EmptyStruct.decl: %EmptyStruct.type = fn_decl @EmptyStruct [template = constants.%EmptyStruct] { -// CHECK:STDOUT: %Y.patt: %.3 = symbolic_binding_pattern Y, 0 +// CHECK:STDOUT: %Y.patt: %J.type = symbolic_binding_pattern Y, 0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %J.ref: type = name_ref J, imports.%import_ref.1 [template = constants.%.3] -// CHECK:STDOUT: %.Self: %.3 = bind_symbolic_name .Self, 0 [symbolic = constants.%.Self] -// CHECK:STDOUT: %.Self.ref: %.3 = name_ref .Self, %.Self [symbolic = constants.%.Self] +// CHECK:STDOUT: %J.ref: type = name_ref J, imports.%import_ref.1 [template = constants.%J.type] +// CHECK:STDOUT: %.Self: %J.type = bind_symbolic_name .Self, 0 [symbolic = constants.%.Self] +// CHECK:STDOUT: %.Self.ref: %J.type = name_ref .Self, %.Self [symbolic = constants.%.Self] // CHECK:STDOUT: %.loc26_38: %.1 = struct_literal () -// CHECK:STDOUT: %.loc26_22: type = where_expr %.Self [template = constants.%.3] { +// CHECK:STDOUT: %.loc26_22: type = where_expr %.Self [template = constants.%J.type] { // CHECK:STDOUT: requirement_equivalent %.Self.ref, %.loc26_38 // CHECK:STDOUT: } -// CHECK:STDOUT: %Y.param: %.3 = param Y, runtime_param -// CHECK:STDOUT: %Y.loc26: %.3 = bind_symbolic_name Y, 0, %Y.param [symbolic = %Y.1 (constants.%Y)] +// CHECK:STDOUT: %Y.param: %J.type = param Y, runtime_param +// CHECK:STDOUT: %Y.loc26: %J.type = bind_symbolic_name Y, 0, %Y.param [symbolic = %Y.1 (constants.%Y)] // CHECK:STDOUT: } // CHECK:STDOUT: %NotEmptyStruct.decl: %NotEmptyStruct.type = fn_decl @NotEmptyStruct [template = constants.%NotEmptyStruct] {} {} // CHECK:STDOUT: } @@ -459,12 +459,12 @@ fn NotEmptyStruct() { // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic = %Dest (constants.%Dest)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.1: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic = %.1 (constants.%.6)] -// CHECK:STDOUT: %Self: %.6 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.3)] +// CHECK:STDOUT: %ImplicitAs.type: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.2)] +// CHECK:STDOUT: %Self: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.3)] // CHECK:STDOUT: %Convert.type: type = fn_type @Convert, @ImplicitAs(%Dest) [symbolic = %Convert.type (constants.%Convert.type.1)] // CHECK:STDOUT: %Convert: @ImplicitAs.%Convert.type (%Convert.type.1) = struct_value () [symbolic = %Convert (constants.%Convert.1)] -// CHECK:STDOUT: %.2: type = assoc_entity_type @ImplicitAs.%.1 (%.6), @ImplicitAs.%Convert.type (%Convert.type.1) [symbolic = %.2 (constants.%.7)] -// CHECK:STDOUT: %.3: @ImplicitAs.%.2 (%.7) = assoc_entity element0, imports.%import_ref.12 [symbolic = %.3 (constants.%.8)] +// CHECK:STDOUT: %.1: type = assoc_entity_type @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2), @ImplicitAs.%Convert.type (%Convert.type.1) [symbolic = %.1 (constants.%.5)] +// CHECK:STDOUT: %.2: @ImplicitAs.%.1 (%.5) = assoc_entity element0, imports.%import_ref.12 [symbolic = %.2 (constants.%.6)] // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: !members: @@ -475,7 +475,7 @@ fn NotEmptyStruct() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl: %C.ref as %J.ref { -// CHECK:STDOUT: %.loc8: = interface_witness () [template = constants.%.5] +// CHECK:STDOUT: %.loc8: = interface_witness () [template = constants.%.4] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: witness = %.loc8 @@ -492,41 +492,41 @@ fn NotEmptyStruct() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Impls.ref: %Impls.type = name_ref Impls, imports.%import_ref.5 [template = constants.%Impls] // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %.loc23_8.1: type = interface_type @ImplicitAs, @ImplicitAs(constants.%.3) [template = constants.%.9] -// CHECK:STDOUT: %.loc23_8.2: %.10 = specific_constant imports.%import_ref.10, @ImplicitAs(constants.%.3) [template = constants.%.11] -// CHECK:STDOUT: %Convert.ref: %.10 = name_ref Convert, %.loc23_8.2 [template = constants.%.11] -// CHECK:STDOUT: %.loc23_8.3: %.3 = converted %C.ref, [template = ] +// CHECK:STDOUT: %ImplicitAs.type: type = interface_type @ImplicitAs, @ImplicitAs(constants.%J.type) [template = constants.%ImplicitAs.type.3] +// CHECK:STDOUT: %.loc23_8.1: %.7 = specific_constant imports.%import_ref.10, @ImplicitAs(constants.%J.type) [template = constants.%.8] +// CHECK:STDOUT: %Convert.ref: %.7 = name_ref Convert, %.loc23_8.1 [template = constants.%.8] +// CHECK:STDOUT: %.loc23_8.2: %J.type = converted %C.ref, [template = ] // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @Impls(constants.%V: %.3) { -// CHECK:STDOUT: %V.2: %.3 = bind_symbolic_name V, 0 [symbolic = %V.2 (constants.%V)] +// CHECK:STDOUT: generic fn @Impls(constants.%V: %J.type) { +// CHECK:STDOUT: %V.2: %J.type = bind_symbolic_name V, 0 [symbolic = %V.2 (constants.%V)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%V.1: %.3); +// CHECK:STDOUT: fn(%V.1: %J.type); // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @Convert(constants.%Dest: type, constants.%Self.2: @ImplicitAs.%.1 (%.6)) { +// CHECK:STDOUT: generic fn @Convert(constants.%Dest: type, constants.%Self.2: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2)) { // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic = %Dest (constants.%Dest)] -// CHECK:STDOUT: %.1: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic = %.1 (constants.%.6)] -// CHECK:STDOUT: %Self: %.6 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.3)] +// CHECK:STDOUT: %ImplicitAs.type: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.2)] +// CHECK:STDOUT: %Self: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.3)] // CHECK:STDOUT: // CHECK:STDOUT: fn[%self: @Convert.%Self (%Self.3)]() -> @Convert.%Dest (%Dest); // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @EmptyStruct(%Y.loc26: %.3) { -// CHECK:STDOUT: %Y.1: %.3 = bind_symbolic_name Y, 0 [symbolic = %Y.1 (constants.%Y)] +// CHECK:STDOUT: generic fn @EmptyStruct(%Y.loc26: %J.type) { +// CHECK:STDOUT: %Y.1: %J.type = bind_symbolic_name Y, 0 [symbolic = %Y.1 (constants.%Y)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%Y.loc26: %.3); +// CHECK:STDOUT: fn(%Y.loc26: %J.type); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @NotEmptyStruct() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %EmptyStruct.ref: %EmptyStruct.type = name_ref EmptyStruct, file.%EmptyStruct.decl [template = constants.%EmptyStruct] // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %.loc39_14.1: type = interface_type @ImplicitAs, @ImplicitAs(constants.%.3) [template = constants.%.9] -// CHECK:STDOUT: %.loc39_14.2: %.10 = specific_constant imports.%import_ref.10, @ImplicitAs(constants.%.3) [template = constants.%.11] -// CHECK:STDOUT: %Convert.ref: %.10 = name_ref Convert, %.loc39_14.2 [template = constants.%.11] -// CHECK:STDOUT: %.loc39_14.3: %.3 = converted %C.ref, [template = ] +// CHECK:STDOUT: %ImplicitAs.type: type = interface_type @ImplicitAs, @ImplicitAs(constants.%J.type) [template = constants.%ImplicitAs.type.3] +// CHECK:STDOUT: %.loc39_14.1: %.7 = specific_constant imports.%import_ref.10, @ImplicitAs(constants.%J.type) [template = constants.%.8] +// CHECK:STDOUT: %Convert.ref: %.7 = name_ref Convert, %.loc39_14.1 [template = constants.%.8] +// CHECK:STDOUT: %.loc39_14.2: %J.type = converted %C.ref, [template = ] // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -548,20 +548,20 @@ fn NotEmptyStruct() { // CHECK:STDOUT: // CHECK:STDOUT: specific @Convert(constants.%Dest, constants.%Self.2) { // CHECK:STDOUT: %Dest => constants.%Dest -// CHECK:STDOUT: %.1 => constants.%.6 +// CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.2 // CHECK:STDOUT: %Self => constants.%Self.2 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @ImplicitAs(constants.%.3) { -// CHECK:STDOUT: %Dest => constants.%.3 +// CHECK:STDOUT: specific @ImplicitAs(constants.%J.type) { +// CHECK:STDOUT: %Dest => constants.%J.type // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.1 => constants.%.9 +// CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.3 // CHECK:STDOUT: %Self => constants.%Self.3 // CHECK:STDOUT: %Convert.type => constants.%Convert.type.2 // CHECK:STDOUT: %Convert => constants.%Convert.2 -// CHECK:STDOUT: %.2 => constants.%.10 -// CHECK:STDOUT: %.3 => constants.%.11 +// CHECK:STDOUT: %.1 => constants.%.7 +// CHECK:STDOUT: %.2 => constants.%.8 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @EmptyStruct(constants.%Y) { diff --git a/toolchain/check/testdata/where_expr/no_prelude/designator.carbon b/toolchain/check/testdata/where_expr/no_prelude/designator.carbon index fa4891132c837..bc985aa13e7e4 100644 --- a/toolchain/check/testdata/where_expr/no_prelude/designator.carbon +++ b/toolchain/check/testdata/where_expr/no_prelude/designator.carbon @@ -89,17 +89,17 @@ class D { // CHECK:STDOUT: --- success.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: type = interface_type @I [template] -// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self, 0 [symbolic] -// CHECK:STDOUT: %.2: type = assoc_entity_type %.1, type [template] -// CHECK:STDOUT: %.3: %.2 = assoc_entity element0, @I.%Member [template] -// CHECK:STDOUT: %.Self.1: %.1 = bind_symbolic_name .Self, 0 [symbolic] -// CHECK:STDOUT: %.4: type = tuple_type () [template] -// CHECK:STDOUT: %T: %.1 = bind_symbolic_name T, 0 [symbolic] +// CHECK:STDOUT: %I.type: type = interface_type @I [template] +// CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic] +// CHECK:STDOUT: %.1: type = assoc_entity_type %I.type, type [template] +// CHECK:STDOUT: %.2: %.1 = assoc_entity element0, @I.%Member [template] +// CHECK:STDOUT: %.Self.1: %I.type = bind_symbolic_name .Self, 0 [symbolic] +// CHECK:STDOUT: %.3: type = tuple_type () [template] +// CHECK:STDOUT: %T: %I.type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %PeriodSelf.type: type = fn_type @PeriodSelf [template] // CHECK:STDOUT: %PeriodSelf: %PeriodSelf.type = struct_value () [template] -// CHECK:STDOUT: %.5: type = struct_type {} [template] -// CHECK:STDOUT: %U: %.1 = bind_symbolic_name U, 0 [symbolic] +// CHECK:STDOUT: %.4: type = struct_type {} [template] +// CHECK:STDOUT: %U: %I.type = bind_symbolic_name U, 0 [symbolic] // CHECK:STDOUT: %PeriodMember.type: type = fn_type @PeriodMember [template] // CHECK:STDOUT: %PeriodMember: %PeriodMember.type = struct_value () [template] // CHECK:STDOUT: %.Self.2: type = bind_symbolic_name .Self, 0 [symbolic] @@ -115,40 +115,40 @@ class D { // CHECK:STDOUT: .PeriodMember = %PeriodMember.decl // CHECK:STDOUT: .TypeSelfImpls = %TypeSelfImpls.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %I.decl: type = interface_decl @I [template = constants.%.1] {} {} +// CHECK:STDOUT: %I.decl: type = interface_decl @I [template = constants.%I.type] {} {} // CHECK:STDOUT: %PeriodSelf.decl: %PeriodSelf.type = fn_decl @PeriodSelf [template = constants.%PeriodSelf] { -// CHECK:STDOUT: %T.patt: %.1 = symbolic_binding_pattern T, 0 +// CHECK:STDOUT: %T.patt: %I.type = symbolic_binding_pattern T, 0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [template = constants.%.1] -// CHECK:STDOUT: %.Self: %.1 = bind_symbolic_name .Self, 0 [symbolic = constants.%.Self.1] -// CHECK:STDOUT: %.Self.ref: %.1 = name_ref .Self, %.Self [symbolic = constants.%.Self.1] -// CHECK:STDOUT: %.loc8_37: %.4 = tuple_literal () -// CHECK:STDOUT: %.loc8_21: type = where_expr %.Self [template = constants.%.1] { +// CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [template = constants.%I.type] +// CHECK:STDOUT: %.Self: %I.type = bind_symbolic_name .Self, 0 [symbolic = constants.%.Self.1] +// CHECK:STDOUT: %.Self.ref: %I.type = name_ref .Self, %.Self [symbolic = constants.%.Self.1] +// CHECK:STDOUT: %.loc8_37: %.3 = tuple_literal () +// CHECK:STDOUT: %.loc8_21: type = where_expr %.Self [template = constants.%I.type] { // CHECK:STDOUT: requirement_equivalent %.Self.ref, %.loc8_37 // CHECK:STDOUT: } -// CHECK:STDOUT: %T.param: %.1 = param T, runtime_param -// CHECK:STDOUT: %T.loc8: %.1 = bind_symbolic_name T, 0, %T.param [symbolic = %T.1 (constants.%T)] +// CHECK:STDOUT: %T.param: %I.type = param T, runtime_param +// CHECK:STDOUT: %T.loc8: %I.type = bind_symbolic_name T, 0, %T.param [symbolic = %T.1 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: %PeriodMember.decl: %PeriodMember.type = fn_decl @PeriodMember [template = constants.%PeriodMember] { -// CHECK:STDOUT: %U.patt: %.1 = symbolic_binding_pattern U, 0 +// CHECK:STDOUT: %U.patt: %I.type = symbolic_binding_pattern U, 0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [template = constants.%.1] -// CHECK:STDOUT: %.Self: %.1 = bind_symbolic_name .Self, 0 [symbolic = constants.%.Self.1] -// CHECK:STDOUT: %.Self.ref: %.1 = name_ref .Self, %.Self [symbolic = constants.%.Self.1] -// CHECK:STDOUT: %Member.ref: %.2 = name_ref Member, @I.%.loc5 [template = constants.%.3] -// CHECK:STDOUT: %.loc10_40: %.5 = struct_literal () -// CHECK:STDOUT: %.loc10_23: type = where_expr %.Self [template = constants.%.1] { +// CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [template = constants.%I.type] +// CHECK:STDOUT: %.Self: %I.type = bind_symbolic_name .Self, 0 [symbolic = constants.%.Self.1] +// CHECK:STDOUT: %.Self.ref: %I.type = name_ref .Self, %.Self [symbolic = constants.%.Self.1] +// CHECK:STDOUT: %Member.ref: %.1 = name_ref Member, @I.%.loc5 [template = constants.%.2] +// CHECK:STDOUT: %.loc10_40: %.4 = struct_literal () +// CHECK:STDOUT: %.loc10_23: type = where_expr %.Self [template = constants.%I.type] { // CHECK:STDOUT: requirement_rewrite %Member.ref, %.loc10_40 // CHECK:STDOUT: } -// CHECK:STDOUT: %U.param: %.1 = param U, runtime_param -// CHECK:STDOUT: %U.loc10: %.1 = bind_symbolic_name U, 0, %U.param [symbolic = %U.1 (constants.%U)] +// CHECK:STDOUT: %U.param: %I.type = param U, runtime_param +// CHECK:STDOUT: %U.loc10: %I.type = bind_symbolic_name U, 0, %U.param [symbolic = %U.1 (constants.%U)] // CHECK:STDOUT: } // CHECK:STDOUT: %TypeSelfImpls.decl: %TypeSelfImpls.type = fn_decl @TypeSelfImpls [template = constants.%TypeSelfImpls] { // CHECK:STDOUT: %V.patt: type = symbolic_binding_pattern V, 0 // CHECK:STDOUT: } { // CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self, 0 [symbolic = constants.%.Self.2] // CHECK:STDOUT: %.Self.ref: type = name_ref .Self, %.Self [symbolic = constants.%.Self.2] -// CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [template = constants.%.1] +// CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [template = constants.%I.type] // CHECK:STDOUT: %.loc12: type = where_expr %.Self [template = type] { // CHECK:STDOUT: requirement_impls %.Self.ref, %I.ref // CHECK:STDOUT: } @@ -158,9 +158,9 @@ class D { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @I { -// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self, 0 [symbolic = constants.%Self] +// CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self] // CHECK:STDOUT: %Member: type = assoc_const_decl Member [template] -// CHECK:STDOUT: %.loc5: %.2 = assoc_entity element0, %Member [template = constants.%.3] +// CHECK:STDOUT: %.loc5: %.1 = assoc_entity element0, %Member [template = constants.%.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -168,16 +168,16 @@ class D { // CHECK:STDOUT: witness = (%Member) // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @PeriodSelf(%T.loc8: %.1) { -// CHECK:STDOUT: %T.1: %.1 = bind_symbolic_name T, 0 [symbolic = %T.1 (constants.%T)] +// CHECK:STDOUT: generic fn @PeriodSelf(%T.loc8: %I.type) { +// CHECK:STDOUT: %T.1: %I.type = bind_symbolic_name T, 0 [symbolic = %T.1 (constants.%T)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%T.loc8: %.1); +// CHECK:STDOUT: fn(%T.loc8: %I.type); // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @PeriodMember(%U.loc10: %.1) { -// CHECK:STDOUT: %U.1: %.1 = bind_symbolic_name U, 0 [symbolic = %U.1 (constants.%U)] +// CHECK:STDOUT: generic fn @PeriodMember(%U.loc10: %I.type) { +// CHECK:STDOUT: %U.1: %I.type = bind_symbolic_name U, 0 [symbolic = %U.1 (constants.%U)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%U.loc10: %.1); +// CHECK:STDOUT: fn(%U.loc10: %I.type); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @TypeSelfImpls(%V.loc12: type) { @@ -201,14 +201,14 @@ class D { // CHECK:STDOUT: --- fail_wrong_member.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: type = interface_type @J [template] -// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self, 0 [symbolic] -// CHECK:STDOUT: %.2: type = assoc_entity_type %.1, type [template] -// CHECK:STDOUT: %.3: %.2 = assoc_entity element0, @J.%Member [template] -// CHECK:STDOUT: %.Self: %.1 = bind_symbolic_name .Self, 0 [symbolic] -// CHECK:STDOUT: %.4: type = tuple_type () [template] -// CHECK:STDOUT: %.5: type = struct_type {} [template] -// CHECK:STDOUT: %W: %.1 = bind_symbolic_name W, 0 [symbolic] +// CHECK:STDOUT: %J.type: type = interface_type @J [template] +// CHECK:STDOUT: %Self: %J.type = bind_symbolic_name Self, 0 [symbolic] +// CHECK:STDOUT: %.1: type = assoc_entity_type %J.type, type [template] +// CHECK:STDOUT: %.2: %.1 = assoc_entity element0, @J.%Member [template] +// CHECK:STDOUT: %.Self: %J.type = bind_symbolic_name .Self, 0 [symbolic] +// CHECK:STDOUT: %.3: type = tuple_type () [template] +// CHECK:STDOUT: %.4: type = struct_type {} [template] +// CHECK:STDOUT: %W: %J.type = bind_symbolic_name W, 0 [symbolic] // CHECK:STDOUT: %PeriodMismatch.type: type = fn_type @PeriodMismatch [template] // CHECK:STDOUT: %PeriodMismatch: %PeriodMismatch.type = struct_value () [template] // CHECK:STDOUT: } @@ -218,27 +218,27 @@ class D { // CHECK:STDOUT: .J = %J.decl // CHECK:STDOUT: .PeriodMismatch = %PeriodMismatch.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %J.decl: type = interface_decl @J [template = constants.%.1] {} {} +// CHECK:STDOUT: %J.decl: type = interface_decl @J [template = constants.%J.type] {} {} // CHECK:STDOUT: %PeriodMismatch.decl: %PeriodMismatch.type = fn_decl @PeriodMismatch [template = constants.%PeriodMismatch] { -// CHECK:STDOUT: %W.patt: %.1 = symbolic_binding_pattern W, 0 +// CHECK:STDOUT: %W.patt: %J.type = symbolic_binding_pattern W, 0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %J.ref: type = name_ref J, file.%J.decl [template = constants.%.1] -// CHECK:STDOUT: %.Self: %.1 = bind_symbolic_name .Self, 0 [symbolic = constants.%.Self] -// CHECK:STDOUT: %.Self.ref: %.1 = name_ref .Self, %.Self [symbolic = constants.%.Self] +// CHECK:STDOUT: %J.ref: type = name_ref J, file.%J.decl [template = constants.%J.type] +// CHECK:STDOUT: %.Self: %J.type = bind_symbolic_name .Self, 0 [symbolic = constants.%.Self] +// CHECK:STDOUT: %.Self.ref: %J.type = name_ref .Self, %.Self [symbolic = constants.%.Self] // CHECK:STDOUT: %Mismatch.ref: = name_ref Mismatch, [template = ] -// CHECK:STDOUT: %.loc12_44: %.5 = struct_literal () -// CHECK:STDOUT: %.loc12_25: type = where_expr %.Self [template = constants.%.1] { +// CHECK:STDOUT: %.loc12_44: %.4 = struct_literal () +// CHECK:STDOUT: %.loc12_25: type = where_expr %.Self [template = constants.%J.type] { // CHECK:STDOUT: requirement_rewrite %Mismatch.ref, %.loc12_44 // CHECK:STDOUT: } -// CHECK:STDOUT: %W.param: %.1 = param W, runtime_param -// CHECK:STDOUT: %W.loc12: %.1 = bind_symbolic_name W, 0, %W.param [symbolic = %W.1 (constants.%W)] +// CHECK:STDOUT: %W.param: %J.type = param W, runtime_param +// CHECK:STDOUT: %W.loc12: %J.type = bind_symbolic_name W, 0, %W.param [symbolic = %W.1 (constants.%W)] // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @J { -// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self, 0 [symbolic = constants.%Self] +// CHECK:STDOUT: %Self: %J.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self] // CHECK:STDOUT: %Member: type = assoc_const_decl Member [template] -// CHECK:STDOUT: %.loc5: %.2 = assoc_entity element0, %Member [template = constants.%.3] +// CHECK:STDOUT: %.loc5: %.1 = assoc_entity element0, %Member [template = constants.%.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -246,10 +246,10 @@ class D { // CHECK:STDOUT: witness = (%Member) // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @PeriodMismatch(%W.loc12: %.1) { -// CHECK:STDOUT: %W.1: %.1 = bind_symbolic_name W, 0 [symbolic = %W.1 (constants.%W)] +// CHECK:STDOUT: generic fn @PeriodMismatch(%W.loc12: %J.type) { +// CHECK:STDOUT: %W.1: %J.type = bind_symbolic_name W, 0 [symbolic = %W.1 (constants.%W)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%W.loc12: %.1); +// CHECK:STDOUT: fn(%W.loc12: %J.type); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @PeriodMismatch(constants.%W) { diff --git a/toolchain/check/testdata/where_expr/no_prelude/non_generic.carbon b/toolchain/check/testdata/where_expr/no_prelude/non_generic.carbon index 9d92b96134c37..f85818cce67d7 100644 --- a/toolchain/check/testdata/where_expr/no_prelude/non_generic.carbon +++ b/toolchain/check/testdata/where_expr/no_prelude/non_generic.carbon @@ -16,13 +16,13 @@ fn NotGenericF(U: I where .T = {}) {} // CHECK:STDOUT: --- non_generic.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: type = interface_type @I [template] -// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self, 0 [symbolic] -// CHECK:STDOUT: %.2: type = assoc_entity_type %.1, type [template] -// CHECK:STDOUT: %.3: %.2 = assoc_entity element0, @I.%T [template] -// CHECK:STDOUT: %.Self: %.1 = bind_symbolic_name .Self, 0 [symbolic] -// CHECK:STDOUT: %.4: type = tuple_type () [template] -// CHECK:STDOUT: %.5: type = struct_type {} [template] +// CHECK:STDOUT: %I.type: type = interface_type @I [template] +// CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic] +// CHECK:STDOUT: %.1: type = assoc_entity_type %I.type, type [template] +// CHECK:STDOUT: %.2: %.1 = assoc_entity element0, @I.%T [template] +// CHECK:STDOUT: %.Self: %I.type = bind_symbolic_name .Self, 0 [symbolic] +// CHECK:STDOUT: %.3: type = tuple_type () [template] +// CHECK:STDOUT: %.4: type = struct_type {} [template] // CHECK:STDOUT: %NotGenericF.type: type = fn_type @NotGenericF [template] // CHECK:STDOUT: %NotGenericF: %NotGenericF.type = struct_value () [template] // CHECK:STDOUT: } @@ -32,27 +32,27 @@ fn NotGenericF(U: I where .T = {}) {} // CHECK:STDOUT: .I = %I.decl // CHECK:STDOUT: .NotGenericF = %NotGenericF.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %I.decl: type = interface_decl @I [template = constants.%.1] {} {} +// CHECK:STDOUT: %I.decl: type = interface_decl @I [template = constants.%I.type] {} {} // CHECK:STDOUT: %NotGenericF.decl: %NotGenericF.type = fn_decl @NotGenericF [template = constants.%NotGenericF] { -// CHECK:STDOUT: %U.patt: %.1 = binding_pattern U +// CHECK:STDOUT: %U.patt: %I.type = binding_pattern U // CHECK:STDOUT: } { -// CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [template = constants.%.1] -// CHECK:STDOUT: %.Self: %.1 = bind_symbolic_name .Self, 0 [symbolic = constants.%.Self] -// CHECK:STDOUT: %.Self.ref: %.1 = name_ref .Self, %.Self [symbolic = constants.%.Self] -// CHECK:STDOUT: %T.ref: %.2 = name_ref T, @I.%.loc11 [template = constants.%.3] -// CHECK:STDOUT: %.loc14_33: %.5 = struct_literal () -// CHECK:STDOUT: %.loc14_21: type = where_expr %.Self [template = constants.%.1] { +// CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [template = constants.%I.type] +// CHECK:STDOUT: %.Self: %I.type = bind_symbolic_name .Self, 0 [symbolic = constants.%.Self] +// CHECK:STDOUT: %.Self.ref: %I.type = name_ref .Self, %.Self [symbolic = constants.%.Self] +// CHECK:STDOUT: %T.ref: %.1 = name_ref T, @I.%.loc11 [template = constants.%.2] +// CHECK:STDOUT: %.loc14_33: %.4 = struct_literal () +// CHECK:STDOUT: %.loc14_21: type = where_expr %.Self [template = constants.%I.type] { // CHECK:STDOUT: requirement_rewrite %T.ref, %.loc14_33 // CHECK:STDOUT: } -// CHECK:STDOUT: %U.param: %.1 = param U, runtime_param0 -// CHECK:STDOUT: %U: %.1 = bind_name U, %U.param +// CHECK:STDOUT: %U.param: %I.type = param U, runtime_param0 +// CHECK:STDOUT: %U: %I.type = bind_name U, %U.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @I { -// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self, 0 [symbolic = constants.%Self] +// CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self] // CHECK:STDOUT: %T: type = assoc_const_decl T [template] -// CHECK:STDOUT: %.loc11: %.2 = assoc_entity element0, %T [template = constants.%.3] +// CHECK:STDOUT: %.loc11: %.1 = assoc_entity element0, %T [template = constants.%.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -60,7 +60,7 @@ fn NotGenericF(U: I where .T = {}) {} // CHECK:STDOUT: witness = (%T) // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @NotGenericF(%U: %.1) { +// CHECK:STDOUT: fn @NotGenericF(%U: %I.type) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/while/fail_bad_condition.carbon b/toolchain/check/testdata/while/fail_bad_condition.carbon index 73e00324100d6..5ccb16bd6fb5c 100644 --- a/toolchain/check/testdata/while/fail_bad_condition.carbon +++ b/toolchain/check/testdata/while/fail_bad_condition.carbon @@ -26,22 +26,22 @@ fn While() { // CHECK:STDOUT: %While: %While.type = struct_value () [template] // CHECK:STDOUT: %.2: type = ptr_type String [template] // CHECK:STDOUT: %.3: String = string_literal "Hello" [template] -// CHECK:STDOUT: %ImplicitAs.type: type = generic_interface_type @ImplicitAs [template] -// CHECK:STDOUT: %ImplicitAs: %ImplicitAs.type = struct_value () [template] +// CHECK:STDOUT: %ImplicitAs.type.1: type = generic_interface_type @ImplicitAs [template] +// CHECK:STDOUT: %ImplicitAs: %ImplicitAs.type.1 = struct_value () [template] // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic] -// CHECK:STDOUT: %.4: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic] -// CHECK:STDOUT: %Self.1: @ImplicitAs.%.1 (%.4) = bind_symbolic_name Self, 1 [symbolic] -// CHECK:STDOUT: %Self.2: %.4 = bind_symbolic_name Self, 1 [symbolic] +// CHECK:STDOUT: %ImplicitAs.type.2: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic] +// CHECK:STDOUT: %Self.1: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2) = bind_symbolic_name Self, 1 [symbolic] +// CHECK:STDOUT: %Self.2: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: %Convert.type.1: type = fn_type @Convert, @ImplicitAs(%Dest) [symbolic] // CHECK:STDOUT: %Convert.1: %Convert.type.1 = struct_value () [symbolic] -// CHECK:STDOUT: %.5: type = assoc_entity_type %.4, %Convert.type.1 [symbolic] -// CHECK:STDOUT: %.6: %.5 = assoc_entity element0, imports.%import_ref.5 [symbolic] -// CHECK:STDOUT: %.7: type = interface_type @ImplicitAs, @ImplicitAs(bool) [template] +// CHECK:STDOUT: %.4: type = assoc_entity_type %ImplicitAs.type.2, %Convert.type.1 [symbolic] +// CHECK:STDOUT: %.5: %.4 = assoc_entity element0, imports.%import_ref.5 [symbolic] +// CHECK:STDOUT: %ImplicitAs.type.3: type = interface_type @ImplicitAs, @ImplicitAs(bool) [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert, @ImplicitAs(bool) [template] // CHECK:STDOUT: %Convert.2: %Convert.type.2 = struct_value () [template] -// CHECK:STDOUT: %.8: type = assoc_entity_type %.7, %Convert.type.2 [template] -// CHECK:STDOUT: %.9: %.8 = assoc_entity element0, imports.%import_ref.5 [template] -// CHECK:STDOUT: %.10: %.5 = assoc_entity element0, imports.%import_ref.6 [symbolic] +// CHECK:STDOUT: %.6: type = assoc_entity_type %ImplicitAs.type.3, %Convert.type.2 [template] +// CHECK:STDOUT: %.7: %.6 = assoc_entity element0, imports.%import_ref.5 [template] +// CHECK:STDOUT: %.8: %.4 = assoc_entity element0, imports.%import_ref.6 [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -56,9 +56,9 @@ fn While() { // CHECK:STDOUT: import Core//prelude/operators/comparison // CHECK:STDOUT: import Core//prelude/types/bool // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.1: %ImplicitAs.type = import_ref Core//prelude/operators/as, inst+40, loaded [template = constants.%ImplicitAs] +// CHECK:STDOUT: %import_ref.1: %ImplicitAs.type.1 = import_ref Core//prelude/operators/as, inst+40, loaded [template = constants.%ImplicitAs] // CHECK:STDOUT: %import_ref.2 = import_ref Core//prelude/operators/as, inst+45, unloaded -// CHECK:STDOUT: %import_ref.3: @ImplicitAs.%.2 (%.5) = import_ref Core//prelude/operators/as, inst+63, loaded [symbolic = @ImplicitAs.%.3 (constants.%.10)] +// CHECK:STDOUT: %import_ref.3: @ImplicitAs.%.1 (%.4) = import_ref Core//prelude/operators/as, inst+63, loaded [symbolic = @ImplicitAs.%.2 (constants.%.8)] // CHECK:STDOUT: %import_ref.4 = import_ref Core//prelude/operators/as, inst+56, unloaded // CHECK:STDOUT: %import_ref.5 = import_ref Core//prelude/operators/as, inst+56, unloaded // CHECK:STDOUT: %import_ref.6 = import_ref Core//prelude/operators/as, inst+56, unloaded @@ -77,12 +77,12 @@ fn While() { // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic = %Dest (constants.%Dest)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.1: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic = %.1 (constants.%.4)] -// CHECK:STDOUT: %Self: %.4 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] +// CHECK:STDOUT: %ImplicitAs.type: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.2)] +// CHECK:STDOUT: %Self: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] // CHECK:STDOUT: %Convert.type: type = fn_type @Convert, @ImplicitAs(%Dest) [symbolic = %Convert.type (constants.%Convert.type.1)] // CHECK:STDOUT: %Convert: @ImplicitAs.%Convert.type (%Convert.type.1) = struct_value () [symbolic = %Convert (constants.%Convert.1)] -// CHECK:STDOUT: %.2: type = assoc_entity_type @ImplicitAs.%.1 (%.4), @ImplicitAs.%Convert.type (%Convert.type.1) [symbolic = %.2 (constants.%.5)] -// CHECK:STDOUT: %.3: @ImplicitAs.%.2 (%.5) = assoc_entity element0, imports.%import_ref.5 [symbolic = %.3 (constants.%.6)] +// CHECK:STDOUT: %.1: type = assoc_entity_type @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2), @ImplicitAs.%Convert.type (%Convert.type.1) [symbolic = %.1 (constants.%.4)] +// CHECK:STDOUT: %.2: @ImplicitAs.%.1 (%.4) = assoc_entity element0, imports.%import_ref.5 [symbolic = %.2 (constants.%.5)] // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: !members: @@ -98,10 +98,10 @@ fn While() { // CHECK:STDOUT: // CHECK:STDOUT: !while.cond: // CHECK:STDOUT: %.loc18_10: String = string_literal "Hello" [template = constants.%.3] -// CHECK:STDOUT: %.loc18_17.1: type = interface_type @ImplicitAs, @ImplicitAs(bool) [template = constants.%.7] -// CHECK:STDOUT: %.loc18_17.2: %.8 = specific_constant imports.%import_ref.3, @ImplicitAs(bool) [template = constants.%.9] -// CHECK:STDOUT: %Convert.ref: %.8 = name_ref Convert, %.loc18_17.2 [template = constants.%.9] -// CHECK:STDOUT: %.loc18_17.3: bool = converted %.loc18_10, [template = ] +// CHECK:STDOUT: %ImplicitAs.type: type = interface_type @ImplicitAs, @ImplicitAs(bool) [template = constants.%ImplicitAs.type.3] +// CHECK:STDOUT: %.loc18_17.1: %.6 = specific_constant imports.%import_ref.3, @ImplicitAs(bool) [template = constants.%.7] +// CHECK:STDOUT: %Convert.ref: %.6 = name_ref Convert, %.loc18_17.1 [template = constants.%.7] +// CHECK:STDOUT: %.loc18_17.2: bool = converted %.loc18_10, [template = ] // CHECK:STDOUT: if br !while.body else br !while.done // CHECK:STDOUT: // CHECK:STDOUT: !while.body: @@ -111,10 +111,10 @@ fn While() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @Convert(constants.%Dest: type, constants.%Self.1: @ImplicitAs.%.1 (%.4)) { +// CHECK:STDOUT: generic fn @Convert(constants.%Dest: type, constants.%Self.1: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2)) { // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic = %Dest (constants.%Dest)] -// CHECK:STDOUT: %.1: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic = %.1 (constants.%.4)] -// CHECK:STDOUT: %Self: %.4 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] +// CHECK:STDOUT: %ImplicitAs.type: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.2)] +// CHECK:STDOUT: %Self: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] // CHECK:STDOUT: // CHECK:STDOUT: fn[%self: @Convert.%Self (%Self.2)]() -> @Convert.%Dest (%Dest); // CHECK:STDOUT: } @@ -133,7 +133,7 @@ fn While() { // CHECK:STDOUT: // CHECK:STDOUT: specific @Convert(constants.%Dest, constants.%Self.1) { // CHECK:STDOUT: %Dest => constants.%Dest -// CHECK:STDOUT: %.1 => constants.%.4 +// CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.2 // CHECK:STDOUT: %Self => constants.%Self.1 // CHECK:STDOUT: } // CHECK:STDOUT: @@ -141,11 +141,11 @@ fn While() { // CHECK:STDOUT: %Dest => bool // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.1 => constants.%.7 +// CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.3 // CHECK:STDOUT: %Self => constants.%Self.2 // CHECK:STDOUT: %Convert.type => constants.%Convert.type.2 // CHECK:STDOUT: %Convert => constants.%Convert.2 -// CHECK:STDOUT: %.2 => constants.%.8 -// CHECK:STDOUT: %.3 => constants.%.9 +// CHECK:STDOUT: %.1 => constants.%.6 +// CHECK:STDOUT: %.2 => constants.%.7 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/sem_ir/inst_namer.cpp b/toolchain/sem_ir/inst_namer.cpp index 01419b942371c..6fe9ddaf69f95 100644 --- a/toolchain/sem_ir/inst_namer.cpp +++ b/toolchain/sem_ir/inst_namer.cpp @@ -523,6 +523,12 @@ auto InstNamer::CollectNamesInBlock(ScopeId scope_id, CollectNamesInBlock(interface_scope_id, inst.decl_block_id); continue; } + case CARBON_KIND(InterfaceType inst): { + const auto& interface_info = + sem_ir_.interfaces().Get(inst.interface_id); + add_inst_name_id(interface_info.name_id, ".type"); + continue; + } case CARBON_KIND(NameRef inst): { add_inst_name_id(inst.name_id, ".ref"); continue;