From ce080b35493ec235ca1527dffc8d92a925bfc227 Mon Sep 17 00:00:00 2001 From: Richard Smith Date: Tue, 19 May 2026 11:01:54 -0700 Subject: [PATCH] Support unqualified lookup into extended interfaces from classes and impls (#7217) When a class extends an interface, referring to a member name of the interface as an unqualified name should refer to the class's corresponding associated entity value, not to the associated entity itself. Similarly, in an `impl`, unqualified names of associated entities should refer to the `impl`'s corresponding value for that entity. To support this, we treat `impl`s as `extend`ing their implemented facet type, and we make lookups into an extended facet type use the `Self` type of the extending `impl` or `class` if lookup finds an associated entity. We already did the latter if the extending entity was an interface; this extends the existing support for these other cases. --- toolchain/check/class.cpp | 8 +- toolchain/check/decl_name_stack.cpp | 1 + toolchain/check/eval_inst.cpp | 3 +- toolchain/check/handle_function.cpp | 24 +- toolchain/check/handle_impl.cpp | 2 + toolchain/check/handle_interface.cpp | 2 +- toolchain/check/handle_let_and_var.cpp | 5 +- toolchain/check/handle_namespace.cpp | 9 +- toolchain/check/import_ref.cpp | 5 +- toolchain/check/modifiers.cpp | 4 +- toolchain/check/name_lookup.cpp | 13 +- .../testdata/class/generic/member_type.carbon | 5 + .../facet/call_combined_impl_witness.carbon | 3 + .../convert_class_type_to_facet_type.carbon | 1 + ...t_class_type_to_generic_facet_value.carbon | 2 + ...rt_class_value_to_facet_value_value.carbon | 1 + ..._value_to_generic_facet_value_value.carbon | 4 + .../convert_facet_value_to_itself.carbon | 1 + ..._facet_value_to_narrowed_facet_type.carbon | 1 + ...t_facet_value_value_to_blanket_impl.carbon | 1 + ..._value_to_generic_facet_value_value.carbon | 3 + ...convert_facet_value_value_to_itself.carbon | 1 + .../testdata/facet/convert_interface.carbon | 1 + ...t_class_type_to_generic_facet_value.carbon | 1 + ...l_convert_type_erased_type_to_facet.carbon | 1 + ...uction_uses_runtime_type_conversion.carbon | 1 + toolchain/check/testdata/for/actual.carbon | 1 + .../builtin/call_from_operator.carbon | 5 + .../testdata/function/builtin/method.carbon | 1 + .../declaration/name_poisoning.carbon | 7 +- .../call_method_on_generic_facet.carbon | 2 + .../testdata/function/generic/deduce.carbon | 3 + .../generic/deduce_nested_facet_value.carbon | 3 + .../generic/dot_self_symbolic_type.carbon | 1 + .../testdata/generic/template/convert.carbon | 1 + .../testdata/impl/assoc_const_self.carbon | 6 + toolchain/check/testdata/impl/basic.carbon | 1 + toolchain/check/testdata/impl/compound.carbon | 5 + .../check/testdata/impl/declaration.carbon | 1 + toolchain/check/testdata/impl/empty.carbon | 1 + .../check/testdata/impl/error_recovery.carbon | 1 + .../check/testdata/impl/extend_impl.carbon | 1 + .../testdata/impl/extend_impl_generic.carbon | 2 + .../check/testdata/impl/fail_alias.carbon | 2 + .../testdata/impl/fail_call_invalid.carbon | 2 + .../impl/fail_extend_impl_forall.carbon | 12 +- .../impl/fail_extend_impl_scope.carbon | 4 + .../impl/fail_extend_impl_type_as.carbon | 2 + .../testdata/impl/fail_impl_as_scope.carbon | 8 + .../impl/fail_impl_bad_assoc_const.carbon | 1 + .../impl/fail_impl_bad_assoc_fn.carbon | 17 + .../impl/fail_impl_bad_interface.carbon | 4 + .../testdata/impl/fail_impl_bad_type.carbon | 1 + .../testdata/impl/fail_redefinition.carbon | 2 + .../impl/fail_self_type_mismatch.carbon | 3 + .../check/testdata/impl/forward_decls.carbon | 13 + .../impl/generic_redeclaration.carbon | 10 + toolchain/check/testdata/impl/impl_as.carbon | 2 + .../testdata/impl/impl_assoc_const.carbon | 2 + .../impl/impl_assoc_const_with_prelude.carbon | 2 + .../check/testdata/impl/impl_forall.carbon | 1 + .../check/testdata/impl/impl_thunk.carbon | 10 + .../testdata/impl/import_builtin_call.carbon | 1 + .../testdata/impl/import_compound.carbon | 2 + .../testdata/impl/import_extend_impl.carbon | 1 + .../check/testdata/impl/import_generic.carbon | 20 + .../impl/import_interface_assoc_const.carbon | 13 + .../check/testdata/impl/import_self.carbon | 2 + .../testdata/impl/import_self_specific.carbon | 4 + .../check/testdata/impl/import_thunk.carbon | 3 + .../testdata/impl/import_use_generic.carbon | 1 + .../check/testdata/impl/incomplete.carbon | 8 + .../check/testdata/impl/interface_args.carbon | 11 + .../check/testdata/impl/lookup/alias.carbon | 1 + .../impl/lookup/canonical_query_self.carbon | 2 + .../lookup/fail_todo_undefined_impl.carbon | 1 + .../check/testdata/impl/lookup/generic.carbon | 7 + .../testdata/impl/lookup/impl_forall.carbon | 1 + .../check/testdata/impl/lookup/import.carbon | 8 + .../impl/lookup/instance_method.carbon | 1 + ...g_generic_inside_rewrite_constraint.carbon | 4 + ...pecialization_with_symbolic_rewrite.carbon | 7 + .../testdata/impl/lookup/specific_args.carbon | 2 + .../testdata/impl/lookup/transitive.carbon | 1 + .../testdata/impl/multiple_extend.carbon | 8 + .../name_lookup_in_impl_definition.carbon | 97 +- .../check/testdata/impl/name_poisoning.carbon | 24 +- .../impl/no_definition_in_impl_file.carbon | 1 + .../check/testdata/impl/self_in_class.carbon | 1 + .../testdata/impl/self_in_signature.carbon | 6 + .../impl/todo_impl_with_unrelated_fn.carbon | 1 + .../testdata/impl/use_assoc_entity.carbon | 4493 ++--------------- .../testdata/interface/as_type_of_type.carbon | 1 + .../interface/compound_member_access.carbon | 2 + .../testdata/interface/default_fn.carbon | 1 + .../check/testdata/interface/final.carbon | 2 + .../check/testdata/interface/generic.carbon | 2 + .../testdata/interface/generic_import.carbon | 1 + .../testdata/interface/generic_method.carbon | 7 + .../interface/generic_vs_params.carbon | 5 + .../testdata/interface/incomplete.carbon | 1 + .../check/testdata/interface/local.carbon | 1 + .../testdata/let/compile_time_bindings.carbon | 1 + .../testdata/operators/overloaded/eq.carbon | 2 + .../overloaded/fail_assign_non_ref.carbon | 2 + .../operators/overloaded/implicit_as.carbon | 2 + .../operators/overloaded/index.carbon | 1 + .../overloaded/index_with_prelude.carbon | 22 +- .../operators/overloaded/ordered.carbon | 1 + .../return/import_convert_function.carbon | 8 + .../lower/testdata/impl/import_facet.carbon | 6 +- toolchain/sem_ir/name_scope.h | 44 +- 112 files changed, 962 insertions(+), 4125 deletions(-) diff --git a/toolchain/check/class.cpp b/toolchain/check/class.cpp index 1d215dddbeef..eb7b85375945 100644 --- a/toolchain/check/class.cpp +++ b/toolchain/check/class.cpp @@ -41,9 +41,13 @@ auto StartClassDefinition(Context& context, SemIR::Class& class_info, definition_id, SemIR::NameId::None, class_info.parent_scope_id); // Introduce `Self`. + auto self_type_inst_id = + context.types().GetTypeInstId(class_info.self_type_id); context.name_scopes().AddRequiredName( - class_info.scope_id, SemIR::NameId::SelfType, - context.types().GetTypeInstId(class_info.self_type_id)); + class_info.scope_id, SemIR::NameId::SelfType, self_type_inst_id); + context.name_scopes() + .Get(class_info.scope_id) + .set_self_type_id(self_type_inst_id); } // Checks that the specified finished adapter definition is valid and builds and diff --git a/toolchain/check/decl_name_stack.cpp b/toolchain/check/decl_name_stack.cpp index eebe454341cc..521ad41f41d0 100644 --- a/toolchain/check/decl_name_stack.cpp +++ b/toolchain/check/decl_name_stack.cpp @@ -140,6 +140,7 @@ auto DeclNameStack::AddName(NameContext name_context, SemIR::InstId target_id, return; case NameContext::State::Unresolved: + case NameContext::State::Poisoned: if (!name_context.parent_scope_id.has_value()) { AddNameToLookup(*context_, name_context.name_id, target_id, name_context.initial_scope_index); diff --git a/toolchain/check/eval_inst.cpp b/toolchain/check/eval_inst.cpp index 9a58f6d19e24..ba9545d45503 100644 --- a/toolchain/check/eval_inst.cpp +++ b/toolchain/check/eval_inst.cpp @@ -389,7 +389,8 @@ auto EvalConstantInst(Context& context, SemIR::InstId inst_id, auto index = static_cast(inst.index.index); CARBON_CHECK(index < elements.size(), "Access out of bounds."); auto element = elements[index]; - if (element.has_value()) { + if (element.has_value() && + element != SemIR::InstId::ImplWitnessTablePlaceholder) { LoadImportRef(context, element); return ConstantEvalResult::Existing(GetConstantValueInSpecific( context.sem_ir(), witness.specific_id, element)); diff --git a/toolchain/check/handle_function.cpp b/toolchain/check/handle_function.cpp index 19382314dd1b..120faad239da 100644 --- a/toolchain/check/handle_function.cpp +++ b/toolchain/check/handle_function.cpp @@ -184,9 +184,15 @@ static auto TryMergeRedecl(Context& context, Parse::AnyFunctionDeclId node_id, SemIR::FunctionDecl& function_decl, SemIR::Function& function_info, bool is_definition) -> void { + // Diagnose if we are declaring a poisoned name. However, don't diagnose at + // impl scope: if the name was referenced before being declared, we will have + // produced an error already. if (name_context.state == DeclNameStack::NameContext::State::Poisoned) { - DiagnosePoisonedName(context, name_context.name_id_for_new_inst(), - name_context.poisoning_loc_id, name_context.loc_id); + if (!context.name_scopes().InstIs( + name_context.parent_scope_id)) { + DiagnosePoisonedName(context, name_context.name_id_for_new_inst(), + name_context.poisoning_loc_id, name_context.loc_id); + } return; } @@ -200,8 +206,7 @@ static auto TryMergeRedecl(Context& context, Parse::AnyFunctionDeclId node_id, auto prev_import_ir_id = SemIR::ImportIRId::None; CARBON_KIND_SWITCH(context.insts().Get(prev_id)) { case CARBON_KIND(SemIR::AssociatedEntity assoc_entity): { - // This is a function in an interface definition scope (see - // NameScope::is_interface_definition()). + // This is a function in an interface definition scope. auto function_decl = context.insts().GetAs(assoc_entity.decl_id); prev_function_id = function_decl.function_id; @@ -260,7 +265,7 @@ static auto MaybeAddToNameLookup(Context& context, const KeywordModifierSet& modifier_set, SemIR::NameScopeId parent_scope_id, SemIR::InstId decl_id) -> void { - if (name_context.state == DeclNameStack::NameContext::State::Poisoned || + if (name_context.state != DeclNameStack::NameContext::State::Poisoned && name_context.prev_inst_id().has_value()) { return; } @@ -269,12 +274,11 @@ static auto MaybeAddToNameLookup(Context& context, // function. auto lookup_result_id = decl_id; if (parent_scope_id.has_value() && !name_context.has_qualifiers) { - const auto& parent_scope = context.name_scopes().Get(parent_scope_id); - if (parent_scope.is_interface_definition()) { - auto interface_decl = context.insts().GetAs( - parent_scope.inst_id()); + if (auto interface_decl = + context.name_scopes().TryGetInstAs( + parent_scope_id)) { lookup_result_id = - BuildAssociatedEntity(context, interface_decl.interface_id, decl_id); + BuildAssociatedEntity(context, interface_decl->interface_id, decl_id); } } diff --git a/toolchain/check/handle_impl.cpp b/toolchain/check/handle_impl.cpp index 8bf7e8ae28f8..2a88e301441f 100644 --- a/toolchain/check/handle_impl.cpp +++ b/toolchain/check/handle_impl.cpp @@ -370,6 +370,8 @@ auto HandleParseNode(Context& context, Parse::ImplDefinitionStartId node_id) impl.scope_id = context.name_scopes().Add(impl_decl_id, SemIR::NameId::None, context.decl_name_stack().PeekParentScopeId()); + context.name_scopes().Get(impl.scope_id).set_self_type_id(impl.self_id); + context.name_scopes().Get(impl.scope_id).AddExtendedScope(impl.constraint_id); context.scope_stack().PushForEntity( impl_decl_id, impl.scope_id, diff --git a/toolchain/check/handle_interface.cpp b/toolchain/check/handle_interface.cpp index 9345a5214800..84a7289e3b86 100644 --- a/toolchain/check/handle_interface.cpp +++ b/toolchain/check/handle_interface.cpp @@ -183,7 +183,7 @@ auto HandleParseNode(Context& context, // Set on the name scope that `M` is replaced by `Self.M`. context.name_scopes() .Get(interface_info.scope_with_self_id) - .set_is_interface_definition(); + .set_self_type_id(interface_info.self_param_id); // Start the definition of interface-with-self. StartGenericDefinition(context, interface_info.generic_with_self_id); diff --git a/toolchain/check/handle_let_and_var.cpp b/toolchain/check/handle_let_and_var.cpp index ca44a7eec349..8947a6b2a2a5 100644 --- a/toolchain/check/handle_let_and_var.cpp +++ b/toolchain/check/handle_let_and_var.cpp @@ -144,9 +144,8 @@ auto HandleParseNode(Context& context, Parse::VariablePatternId node_id) // start of the initializer, if any). static auto EndFullPattern(Context& context) -> void { EndSubpattern(context, context.node_stack()); - auto scope_id = context.scope_stack().PeekNameScopeId(); - if (scope_id.has_value() && - context.name_scopes().Get(scope_id).is_interface_definition()) { + if (context.name_scopes().InstIs( + context.scope_stack().PeekNameScopeId())) { // Don't emit NameBindingDecl for an associated constant, because it will // always be empty. context.pattern_block_stack().PopAndDiscard(); diff --git a/toolchain/check/handle_namespace.cpp b/toolchain/check/handle_namespace.cpp index dc5b16fb8b8a..85c2cbfafcf6 100644 --- a/toolchain/check/handle_namespace.cpp +++ b/toolchain/check/handle_namespace.cpp @@ -29,12 +29,6 @@ auto HandleParseNode(Context& context, Parse::NamespaceStartId /*node_id*/) return true; } -static auto IsNamespaceScope(Context& context, SemIR::NameScopeId name_scope_id) - -> bool { - auto [_, inst] = context.name_scopes().GetInstIfValid(name_scope_id); - return inst && inst->Is(); -} - auto HandleParseNode(Context& context, Parse::NamespaceId node_id) -> bool { auto name_context = context.decl_name_stack().FinishName( PopNameComponentWithoutParams(context, Lex::TokenKind::Namespace)); @@ -100,7 +94,8 @@ auto HandleParseNode(Context& context, Parse::NamespaceId node_id) -> bool { namespace_inst.name_scope_id = context.name_scopes().Add( namespace_id, name_context.name_id_for_new_inst(), name_context.parent_scope_id); - if (!IsNamespaceScope(context, name_context.parent_scope_id)) { + if (!context.name_scopes().InstIs( + name_context.parent_scope_id)) { CARBON_DIAGNOSTIC(NamespaceDeclNotAtTopLevel, Error, "`namespace` declaration not at top level"); context.emitter().Emit(node_id, NamespaceDeclNotAtTopLevel); diff --git a/toolchain/check/import_ref.cpp b/toolchain/check/import_ref.cpp index 395d4cf1028f..0e900dbed479 100644 --- a/toolchain/check/import_ref.cpp +++ b/toolchain/check/import_ref.cpp @@ -1925,6 +1925,8 @@ static auto ImportClassDefinition(ImportContext& context, context, import_scope, new_scope, new_class.first_owning_decl_id, SemIR::NameId::None, new_class.parent_scope_id); new_class.body_block_id = context.local_context().inst_block_stack().Pop(); + new_scope.set_self_type_id( + context.local_types().GetTypeInstId(new_class.self_type_id)); if (import_class.base_id.has_value()) { new_class.base_id = base_id; @@ -2643,6 +2645,7 @@ static auto ImportImplDefinition(ImportContext& context, auto& new_scope = context.local_name_scopes().Get(new_impl.scope_id); new_scope.Set(new_impl.first_owning_decl_id, SemIR::NameId::None, new_impl.parent_scope_id); + new_scope.set_self_type_id(new_impl.self_id); // Import the contents of the definition scope, if we might need it. Name // lookup is never performed into this scope by a user of the impl, so // this is only necessary in the same library that defined the impl, in @@ -3090,7 +3093,7 @@ static auto TryResolveTypedInst(ImportRefResolver& resolver, InitializeNameScopeAndImportRefs(resolver, import_scope, new_scope, decl_id, SemIR::NameId::None, local_interface.scope_without_self_id); - new_scope.set_is_interface_definition(); + new_scope.set_self_type_id(local_interface.self_param_id); local_interface.associated_entities_id = AddAssociatedEntities(resolver, local_interface.scope_with_self_id, import_interface.associated_entities_id); diff --git a/toolchain/check/modifiers.cpp b/toolchain/check/modifiers.cpp index ce993e6aa8a3..fd940fcf0cc1 100644 --- a/toolchain/check/modifiers.cpp +++ b/toolchain/check/modifiers.cpp @@ -227,8 +227,8 @@ auto RequireDefaultFinalOnlyInInterfaces(Context& context, DeclIntroducerState& introducer, SemIR::NameScopeId parent_scope_id) -> void { - if (parent_scope_id.has_value() && - context.name_scopes().Get(parent_scope_id).is_interface_definition()) { + if (context.name_scopes().InstIs( + parent_scope_id)) { // Both `default` and `final` allowed in an interface definition. return; } diff --git a/toolchain/check/name_lookup.cpp b/toolchain/check/name_lookup.cpp index 36691c578e54..278e0351b658 100644 --- a/toolchain/check/name_lookup.cpp +++ b/toolchain/check/name_lookup.cpp @@ -119,10 +119,10 @@ auto LookupUnqualifiedName(Context& context, SemIR::LocId loc_id, .self_const_id = SemIR::ConstantId::None}, /*required=*/false); non_lexical_result.scope_result.is_found()) { - // In an interface definition, replace associated entity `M` with - // `Self.M` (where the `Self` is the `Self` of the interface). + // If the scope has a `Self` type, replace associated entity `M` with + // `Self.M`. const auto& scope = context.name_scopes().Get(lookup_scope_id); - if (scope.is_interface_definition()) { + if (scope.self_type_id().has_value()) { SemIR::InstId target_inst_id = non_lexical_result.scope_result.target_inst_id(); if (auto assoc_type = @@ -130,13 +130,8 @@ auto LookupUnqualifiedName(Context& context, SemIR::LocId loc_id, SemIR::GetTypeOfInstInSpecific( context.sem_ir(), non_lexical_result.specific_id, target_inst_id))) { - auto interface_decl = - context.insts().GetAs( - scope.inst_id()); - const auto& interface = - context.interfaces().Get(interface_decl.interface_id); SemIR::InstId result_inst_id = GetAssociatedValue( - context, loc_id, interface.self_param_id, + context, loc_id, scope.self_type_id(), SemIR::GetConstantValueInSpecific(context.sem_ir(), non_lexical_result.specific_id, target_inst_id), diff --git a/toolchain/check/testdata/class/generic/member_type.carbon b/toolchain/check/testdata/class/generic/member_type.carbon index 30accf2352cc..facabef7ee4c 100644 --- a/toolchain/check/testdata/class/generic/member_type.carbon +++ b/toolchain/check/testdata/class/generic/member_type.carbon @@ -587,6 +587,9 @@ fn Test() -> i32 { // CHECK:STDOUT: .T = // CHECK:STDOUT: .T = // CHECK:STDOUT: .F = @Inner.WithSelf.%assoc0.loc6_28.1 +// CHECK:STDOUT: .C = +// CHECK:STDOUT: .Inner = +// CHECK:STDOUT: .D = // CHECK:STDOUT: witness = (@Inner.WithSelf.%Inner.WithSelf.F.decl) // CHECK:STDOUT: // CHECK:STDOUT: !requires: @@ -630,6 +633,7 @@ fn Test() -> i32 { // CHECK:STDOUT: .T = // CHECK:STDOUT: .F = %C.as.Inner.impl.F.decl // CHECK:STDOUT: .Inner = +// CHECK:STDOUT: extend %Inner.ref // CHECK:STDOUT: witness = %Inner.impl_witness.loc10_19.1 // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -655,6 +659,7 @@ fn Test() -> i32 { // CHECK:STDOUT: !members: // CHECK:STDOUT: .D = // CHECK:STDOUT: .F = %D.as.Inner.impl.F.decl +// CHECK:STDOUT: extend %Inner.ref // CHECK:STDOUT: witness = %Inner.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/facet/call_combined_impl_witness.carbon b/toolchain/check/testdata/facet/call_combined_impl_witness.carbon index 34c283a5fb1f..ca5703ba89f2 100644 --- a/toolchain/check/testdata/facet/call_combined_impl_witness.carbon +++ b/toolchain/check/testdata/facet/call_combined_impl_witness.carbon @@ -261,6 +261,7 @@ fn F() { // CHECK:STDOUT: %Empty.impl_witness: = impl_witness %Empty.impl_witness_table [concrete = constants.%Empty.impl_witness] // CHECK:STDOUT: // CHECK:STDOUT: !members: +// CHECK:STDOUT: extend %Empty.ref // CHECK:STDOUT: witness = %Empty.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: @@ -271,6 +272,7 @@ fn F() { // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .AA = %C.as.A.impl.AA.decl +// CHECK:STDOUT: extend %A.ref // CHECK:STDOUT: witness = %A.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: @@ -281,6 +283,7 @@ fn F() { // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .BB = %C.as.B.impl.BB.decl +// CHECK:STDOUT: extend %B.ref // CHECK:STDOUT: witness = %B.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/facet/convert_class_type_to_facet_type.carbon b/toolchain/check/testdata/facet/convert_class_type_to_facet_type.carbon index 3957fc68995e..c5d05228a44e 100644 --- a/toolchain/check/testdata/facet/convert_class_type_to_facet_type.carbon +++ b/toolchain/check/testdata/facet/convert_class_type_to_facet_type.carbon @@ -95,6 +95,7 @@ fn F() { // CHECK:STDOUT: %Animal.impl_witness: = impl_witness %Animal.impl_witness_table [concrete = constants.%Animal.impl_witness] // CHECK:STDOUT: // CHECK:STDOUT: !members: +// CHECK:STDOUT: extend %Animal.ref // CHECK:STDOUT: witness = %Animal.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/facet/convert_class_type_to_generic_facet_value.carbon b/toolchain/check/testdata/facet/convert_class_type_to_generic_facet_value.carbon index 2c637cd6e8bb..25f61b25c393 100644 --- a/toolchain/check/testdata/facet/convert_class_type_to_generic_facet_value.carbon +++ b/toolchain/check/testdata/facet/convert_class_type_to_generic_facet_value.carbon @@ -223,6 +223,7 @@ fn G() { // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %ImplsGeneric.as.Generic.impl.F.decl +// CHECK:STDOUT: extend %Generic.type // CHECK:STDOUT: witness = %Generic.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: @@ -556,6 +557,7 @@ fn G() { // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %ImplsGeneric.as.Generic.impl.F.decl +// CHECK:STDOUT: extend %Generic.type // CHECK:STDOUT: witness = %Generic.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/facet/convert_class_value_to_facet_value_value.carbon b/toolchain/check/testdata/facet/convert_class_value_to_facet_value_value.carbon index 31db64f9d642..864d37c74336 100644 --- a/toolchain/check/testdata/facet/convert_class_value_to_facet_value_value.carbon +++ b/toolchain/check/testdata/facet/convert_class_value_to_facet_value_value.carbon @@ -117,6 +117,7 @@ fn F() { // CHECK:STDOUT: %Animal.impl_witness: = impl_witness %Animal.impl_witness_table [concrete = constants.%Animal.impl_witness] // CHECK:STDOUT: // CHECK:STDOUT: !members: +// CHECK:STDOUT: extend %Animal.ref // CHECK:STDOUT: witness = %Animal.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/facet/convert_class_value_to_generic_facet_value_value.carbon b/toolchain/check/testdata/facet/convert_class_value_to_generic_facet_value_value.carbon index b94bc9cafaca..1eb6f3fae372 100644 --- a/toolchain/check/testdata/facet/convert_class_value_to_generic_facet_value_value.carbon +++ b/toolchain/check/testdata/facet/convert_class_value_to_generic_facet_value_value.carbon @@ -272,6 +272,7 @@ fn B() { // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %ImplsGeneric.as.Generic.impl.F.decl +// CHECK:STDOUT: extend %Generic.type // CHECK:STDOUT: witness = %Generic.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: @@ -633,6 +634,7 @@ fn B() { // CHECK:STDOUT: %I.impl_witness.loc7_38.1: = impl_witness %I.impl_witness_table, @C.as.I.impl(constants.%T.67d) [symbolic = %I.impl_witness.loc7_38.2 (constants.%I.impl_witness.1cb)] // CHECK:STDOUT: // CHECK:STDOUT: !members: +// CHECK:STDOUT: extend %I.type.loc7_36.1 // CHECK:STDOUT: witness = %I.impl_witness.loc7_38.1 // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -895,6 +897,7 @@ fn B() { // CHECK:STDOUT: %I.impl_witness.loc7_38.1: = impl_witness %I.impl_witness_table, @C.as.I.impl(constants.%T.67d) [symbolic = %I.impl_witness.loc7_38.2 (constants.%I.impl_witness)] // CHECK:STDOUT: // CHECK:STDOUT: !members: +// CHECK:STDOUT: extend %I.type.loc7_36.1 // CHECK:STDOUT: witness = %I.impl_witness.loc7_38.1 // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -1107,6 +1110,7 @@ fn B() { // CHECK:STDOUT: %I.impl_witness.loc7_38.1: = impl_witness %I.impl_witness_table, @C.as.I.impl(constants.%T.67d) [symbolic = %I.impl_witness.loc7_38.2 (constants.%I.impl_witness)] // CHECK:STDOUT: // CHECK:STDOUT: !members: +// CHECK:STDOUT: extend %I.ref // CHECK:STDOUT: witness = %I.impl_witness.loc7_38.1 // CHECK:STDOUT: } // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/facet/convert_facet_value_to_itself.carbon b/toolchain/check/testdata/facet/convert_facet_value_to_itself.carbon index 6fc8b3ef440d..6cf3c1033f3f 100644 --- a/toolchain/check/testdata/facet/convert_facet_value_to_itself.carbon +++ b/toolchain/check/testdata/facet/convert_facet_value_to_itself.carbon @@ -112,6 +112,7 @@ fn F() { // CHECK:STDOUT: %Animal.impl_witness: = impl_witness %Animal.impl_witness_table [concrete = constants.%Animal.impl_witness] // CHECK:STDOUT: // CHECK:STDOUT: !members: +// CHECK:STDOUT: extend %Animal.ref // CHECK:STDOUT: witness = %Animal.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/facet/convert_facet_value_to_narrowed_facet_type.carbon b/toolchain/check/testdata/facet/convert_facet_value_to_narrowed_facet_type.carbon index e0ab0b711746..0235a16860e1 100644 --- a/toolchain/check/testdata/facet/convert_facet_value_to_narrowed_facet_type.carbon +++ b/toolchain/check/testdata/facet/convert_facet_value_to_narrowed_facet_type.carbon @@ -700,6 +700,7 @@ fn CallsWithTypeExplicit(U:! type) { // CHECK:STDOUT: %Eats.impl_witness.loc7_36.1: = impl_witness %Eats.impl_witness_table, @A.as_type.as.Eats.impl(constants.%A) [symbolic = %Eats.impl_witness.loc7_36.2 (constants.%Eats.impl_witness.149)] // CHECK:STDOUT: // CHECK:STDOUT: !members: +// CHECK:STDOUT: extend %Eats.ref // CHECK:STDOUT: witness = %Eats.impl_witness.loc7_36.1 // CHECK:STDOUT: } // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/facet/convert_facet_value_value_to_blanket_impl.carbon b/toolchain/check/testdata/facet/convert_facet_value_value_to_blanket_impl.carbon index d76f939bba4f..18c536230606 100644 --- a/toolchain/check/testdata/facet/convert_facet_value_value_to_blanket_impl.carbon +++ b/toolchain/check/testdata/facet/convert_facet_value_value_to_blanket_impl.carbon @@ -159,6 +159,7 @@ fn HandleAnimal[T:! Animal](a: T) { Feed(a); } // CHECK:STDOUT: %Eats.impl_witness.loc18_36.1: = impl_witness %Eats.impl_witness_table, @A.as_type.as.Eats.impl(constants.%A) [symbolic = %Eats.impl_witness.loc18_36.2 (constants.%Eats.impl_witness.149e03.1)] // CHECK:STDOUT: // CHECK:STDOUT: !members: +// CHECK:STDOUT: extend %Eats.ref // CHECK:STDOUT: witness = %Eats.impl_witness.loc18_36.1 // CHECK:STDOUT: } // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/facet/convert_facet_value_value_to_generic_facet_value_value.carbon b/toolchain/check/testdata/facet/convert_facet_value_value_to_generic_facet_value_value.carbon index 85258e7f37f0..1fe6a619ce11 100644 --- a/toolchain/check/testdata/facet/convert_facet_value_value_to_generic_facet_value_value.carbon +++ b/toolchain/check/testdata/facet/convert_facet_value_value_to_generic_facet_value_value.carbon @@ -313,6 +313,7 @@ fn F() { // CHECK:STDOUT: %Edible.impl_witness: = impl_witness %Edible.impl_witness_table [concrete = constants.%Edible.impl_witness] // CHECK:STDOUT: // CHECK:STDOUT: !members: +// CHECK:STDOUT: extend %Edible.ref // CHECK:STDOUT: witness = %Edible.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: @@ -332,6 +333,7 @@ fn F() { // CHECK:STDOUT: %Eats.impl_witness.loc26_51.1: = impl_witness %Eats.impl_witness_table, @T.as_type.as.Eats.impl(constants.%T.998, constants.%U) [symbolic = %Eats.impl_witness.loc26_51.2 (constants.%Eats.impl_witness.e8df35.1)] // CHECK:STDOUT: // CHECK:STDOUT: !members: +// CHECK:STDOUT: extend %Eats.type.loc26_49.1 // CHECK:STDOUT: witness = %Eats.impl_witness.loc26_51.1 // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -341,6 +343,7 @@ fn F() { // CHECK:STDOUT: %Animal.impl_witness: = impl_witness %Animal.impl_witness_table [concrete = constants.%Animal.impl_witness] // CHECK:STDOUT: // CHECK:STDOUT: !members: +// CHECK:STDOUT: extend %Animal.ref // CHECK:STDOUT: witness = %Animal.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/facet/convert_facet_value_value_to_itself.carbon b/toolchain/check/testdata/facet/convert_facet_value_value_to_itself.carbon index 5fb91b6ac994..f89385c4653d 100644 --- a/toolchain/check/testdata/facet/convert_facet_value_value_to_itself.carbon +++ b/toolchain/check/testdata/facet/convert_facet_value_value_to_itself.carbon @@ -142,6 +142,7 @@ fn F() { // CHECK:STDOUT: %Animal.impl_witness: = impl_witness %Animal.impl_witness_table [concrete = constants.%Animal.impl_witness] // CHECK:STDOUT: // CHECK:STDOUT: !members: +// CHECK:STDOUT: extend %Animal.ref // CHECK:STDOUT: witness = %Animal.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/facet/convert_interface.carbon b/toolchain/check/testdata/facet/convert_interface.carbon index 9dd77af8827f..de814ce142c1 100644 --- a/toolchain/check/testdata/facet/convert_interface.carbon +++ b/toolchain/check/testdata/facet/convert_interface.carbon @@ -99,6 +99,7 @@ fn G() { F(Animal); } // CHECK:STDOUT: %Eats.impl_witness: = impl_witness %Eats.impl_witness_table [concrete = constants.%Eats.impl_witness] // CHECK:STDOUT: // CHECK:STDOUT: !members: +// CHECK:STDOUT: extend %Eats.ref // CHECK:STDOUT: witness = %Eats.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/facet/fail_convert_class_type_to_generic_facet_value.carbon b/toolchain/check/testdata/facet/fail_convert_class_type_to_generic_facet_value.carbon index 8e45d5fd047a..e5fdd9b0317a 100644 --- a/toolchain/check/testdata/facet/fail_convert_class_type_to_generic_facet_value.carbon +++ b/toolchain/check/testdata/facet/fail_convert_class_type_to_generic_facet_value.carbon @@ -166,6 +166,7 @@ fn G() { // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %ImplsGeneric.as.Generic.impl.F.decl +// CHECK:STDOUT: extend %Generic.type // CHECK:STDOUT: witness = %Generic.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/facet/fail_convert_type_erased_type_to_facet.carbon b/toolchain/check/testdata/facet/fail_convert_type_erased_type_to_facet.carbon index 6e4f9eda207e..8c94ba0b73ee 100644 --- a/toolchain/check/testdata/facet/fail_convert_type_erased_type_to_facet.carbon +++ b/toolchain/check/testdata/facet/fail_convert_type_erased_type_to_facet.carbon @@ -57,6 +57,7 @@ fn F() { // CHECK:STDOUT: .inst{{[0-9A-F]+}}.loc18_21: = impl_witness .inst{{[0-9A-F]+}}.loc18_21 [concrete = constants.%Animal.impl_witness] // CHECK:STDOUT: // CHECK:STDOUT: !members: +// CHECK:STDOUT: extend .inst{{[0-9A-F]+}}.loc18_14 // CHECK:STDOUT: witness = .inst{{[0-9A-F]+}}.loc18_21 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/facet/fail_deduction_uses_runtime_type_conversion.carbon b/toolchain/check/testdata/facet/fail_deduction_uses_runtime_type_conversion.carbon index 952a4e5189ca..61c8411f7aeb 100644 --- a/toolchain/check/testdata/facet/fail_deduction_uses_runtime_type_conversion.carbon +++ b/toolchain/check/testdata/facet/fail_deduction_uses_runtime_type_conversion.carbon @@ -205,6 +205,7 @@ fn G(holds_to: HoldsType((RuntimeConvertTo, )), from:! RuntimeConvertFrom) { // CHECK:STDOUT: !members: // CHECK:STDOUT: .RuntimeConvertTo = // CHECK:STDOUT: .Convert = %RuntimeConvertFrom.as.ImplicitAs.impl.Convert.decl +// CHECK:STDOUT: extend %ImplicitAs.type // CHECK:STDOUT: witness = %ImplicitAs.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/for/actual.carbon b/toolchain/check/testdata/for/actual.carbon index 38c292b0b09b..84cbd2b6e072 100644 --- a/toolchain/check/testdata/for/actual.carbon +++ b/toolchain/check/testdata/for/actual.carbon @@ -377,6 +377,7 @@ fn Read(y:! Core.IntLiteral()) { // CHECK:STDOUT: .N = // CHECK:STDOUT: .NewCursor = %IntRange.as.Iterate.impl.NewCursor.decl // CHECK:STDOUT: .Next = %IntRange.as.Iterate.impl.Next.decl +// CHECK:STDOUT: extend %.loc9_24 // CHECK:STDOUT: witness = %Iterate.impl_witness.loc9_87.1 // CHECK:STDOUT: } // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/function/builtin/call_from_operator.carbon b/toolchain/check/testdata/function/builtin/call_from_operator.carbon index 415e5f40f24e..435117911af5 100644 --- a/toolchain/check/testdata/function/builtin/call_from_operator.carbon +++ b/toolchain/check/testdata/function/builtin/call_from_operator.carbon @@ -389,6 +389,7 @@ var arr: array(i32, (1 as i32) + (2 as i32)) = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: .T = // CHECK:STDOUT: .T = // CHECK:STDOUT: .Convert = @ImplicitAs.WithSelf.%assoc0.loc16_32.1 +// CHECK:STDOUT: .IntLiteral = // CHECK:STDOUT: witness = (@ImplicitAs.WithSelf.%ImplicitAs.WithSelf.Convert.decl) // CHECK:STDOUT: // CHECK:STDOUT: !requires: @@ -420,6 +421,7 @@ var arr: array(i32, (1 as i32) + (2 as i32)) = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Op = %i32.builtin.as.AddWith.impl.Op.decl +// CHECK:STDOUT: extend %AddWith.type // CHECK:STDOUT: witness = %AddWith.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: @@ -443,6 +445,7 @@ var arr: array(i32, (1 as i32) + (2 as i32)) = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Convert = %Core.IntLiteral.as.As.impl.Convert.decl +// CHECK:STDOUT: extend %As.type // CHECK:STDOUT: witness = %As.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: @@ -466,6 +469,7 @@ var arr: array(i32, (1 as i32) + (2 as i32)) = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Convert = %Core.IntLiteral.as.ImplicitAs.impl.Convert.decl +// CHECK:STDOUT: extend %ImplicitAs.type // CHECK:STDOUT: witness = %ImplicitAs.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: @@ -493,6 +497,7 @@ var arr: array(i32, (1 as i32) + (2 as i32)) = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: !members: // CHECK:STDOUT: .IntLiteral = // CHECK:STDOUT: .Convert = %i32.builtin.as.ImplicitAs.impl.Convert.decl +// CHECK:STDOUT: extend %ImplicitAs.type // CHECK:STDOUT: witness = %ImplicitAs.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/function/builtin/method.carbon b/toolchain/check/testdata/function/builtin/method.carbon index 0abfc4c53596..5091c9bbe72c 100644 --- a/toolchain/check/testdata/function/builtin/method.carbon +++ b/toolchain/check/testdata/function/builtin/method.carbon @@ -256,6 +256,7 @@ var arr: array(i32, (1 as i32).(I.F)(2)); // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %i32.as.I.impl.F.decl +// CHECK:STDOUT: extend %I.ref // CHECK:STDOUT: witness = %I.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/function/declaration/name_poisoning.carbon b/toolchain/check/testdata/function/declaration/name_poisoning.carbon index 697752fb7728..f6e8ea125fc1 100644 --- a/toolchain/check/testdata/function/declaration/name_poisoning.carbon +++ b/toolchain/check/testdata/function/declaration/name_poisoning.carbon @@ -95,12 +95,7 @@ alias N.F2 = F1; // CHECK:STDERR: fn N.F1(); -// Failure: `N.F1` used after declaration failed. -// TODO: #4622 - Allow defining a poisoned name so it would be found if used after it's declared. -// CHECK:STDERR: fail_use_declaration_after_poison.carbon:[[@LINE+4]]:14: error: member name `F1` not found in `N` [MemberNameNotFoundInInstScope] -// CHECK:STDERR: alias N.F3 = N.F1; -// CHECK:STDERR: ^~~~ -// CHECK:STDERR: +// Don't produce an additional diagnostic here. alias N.F3 = N.F1; // --- fail_poison_multiple_scopes.carbon diff --git a/toolchain/check/testdata/function/generic/call_method_on_generic_facet.carbon b/toolchain/check/testdata/function/generic/call_method_on_generic_facet.carbon index 2421a86aabbd..4c2e9a1a0e1e 100644 --- a/toolchain/check/testdata/function/generic/call_method_on_generic_facet.carbon +++ b/toolchain/check/testdata/function/generic/call_method_on_generic_facet.carbon @@ -216,6 +216,7 @@ fn G() { // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %ImplsGeneric.as.Generic.impl.F.decl +// CHECK:STDOUT: extend %Generic.type // CHECK:STDOUT: witness = %Generic.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: @@ -226,6 +227,7 @@ fn G() { // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .G = %ImplsGeneric.as.Other.impl.G.decl +// CHECK:STDOUT: extend %Other.ref // CHECK:STDOUT: witness = %Other.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/function/generic/deduce.carbon b/toolchain/check/testdata/function/generic/deduce.carbon index a1ea32f7db13..530f73c69975 100644 --- a/toolchain/check/testdata/function/generic/deduce.carbon +++ b/toolchain/check/testdata/function/generic/deduce.carbon @@ -1785,6 +1785,7 @@ fn F() { // CHECK:STDOUT: %Z.impl_witness: = impl_witness %Z.impl_witness_table [concrete = constants.%Z.impl_witness.c05] // CHECK:STDOUT: // CHECK:STDOUT: !members: +// CHECK:STDOUT: extend %Z.ref // CHECK:STDOUT: witness = %Z.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: @@ -1800,6 +1801,7 @@ fn F() { // CHECK:STDOUT: %Z.impl_witness.loc9_35.1: = impl_witness %Z.impl_witness_table, @DD.as.Z.impl(constants.%E) [symbolic = %Z.impl_witness.loc9_35.2 (constants.%Z.impl_witness.437)] // CHECK:STDOUT: // CHECK:STDOUT: !members: +// CHECK:STDOUT: extend %Z.ref // CHECK:STDOUT: witness = %Z.impl_witness.loc9_35.1 // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -1820,6 +1822,7 @@ fn F() { // CHECK:STDOUT: %Z.impl_witness.loc12_39.1: = impl_witness %Z.impl_witness_table, @CC.as.Z.impl(constants.%E) [symbolic = %Z.impl_witness.loc12_39.2 (constants.%Z.impl_witness.40e)] // CHECK:STDOUT: // CHECK:STDOUT: !members: +// CHECK:STDOUT: extend %Z.ref // CHECK:STDOUT: witness = %Z.impl_witness.loc12_39.1 // CHECK:STDOUT: } // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/function/generic/deduce_nested_facet_value.carbon b/toolchain/check/testdata/function/generic/deduce_nested_facet_value.carbon index 2016da0a03c5..0adf0af2f3ed 100644 --- a/toolchain/check/testdata/function/generic/deduce_nested_facet_value.carbon +++ b/toolchain/check/testdata/function/generic/deduce_nested_facet_value.carbon @@ -193,6 +193,7 @@ fn F() { // CHECK:STDOUT: %Y.impl_witness: = impl_witness %Y.impl_witness_table [concrete = constants.%Y.impl_witness] // CHECK:STDOUT: // CHECK:STDOUT: !members: +// CHECK:STDOUT: extend %Y.ref // CHECK:STDOUT: witness = %Y.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: @@ -201,6 +202,7 @@ fn F() { // CHECK:STDOUT: %W.impl_witness: = impl_witness %W.impl_witness_table [concrete = constants.%W.impl_witness] // CHECK:STDOUT: // CHECK:STDOUT: !members: +// CHECK:STDOUT: extend %W.ref // CHECK:STDOUT: witness = %W.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: @@ -219,6 +221,7 @@ fn F() { // CHECK:STDOUT: %Z.impl_witness.loc19_36.1: = impl_witness %Z.impl_witness_table, @CC.as.Z.impl(constants.%E) [symbolic = %Z.impl_witness.loc19_36.2 (constants.%Z.impl_witness.228)] // CHECK:STDOUT: // CHECK:STDOUT: !members: +// CHECK:STDOUT: extend %Z.ref // CHECK:STDOUT: witness = %Z.impl_witness.loc19_36.1 // CHECK:STDOUT: } // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/generic/dot_self_symbolic_type.carbon b/toolchain/check/testdata/generic/dot_self_symbolic_type.carbon index b4ac49cc6c65..600e5cc1f9a4 100644 --- a/toolchain/check/testdata/generic/dot_self_symbolic_type.carbon +++ b/toolchain/check/testdata/generic/dot_self_symbolic_type.carbon @@ -407,6 +407,7 @@ fn H(T:! type) { // CHECK:STDOUT: %B.impl_witness.loc9_64.1: = impl_witness %B.impl_witness_table, @BB.as_type.as.B.impl(constants.%AA, constants.%BB.0b1) [symbolic = %B.impl_witness.loc9_64.2 (constants.%B.impl_witness.94a)] // CHECK:STDOUT: // CHECK:STDOUT: !members: +// CHECK:STDOUT: extend %B.type.loc9_62.1 // CHECK:STDOUT: witness = %B.impl_witness.loc9_64.1 // CHECK:STDOUT: } // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/generic/template/convert.carbon b/toolchain/check/testdata/generic/template/convert.carbon index de9c92b34462..12306f837e13 100644 --- a/toolchain/check/testdata/generic/template/convert.carbon +++ b/toolchain/check/testdata/generic/template/convert.carbon @@ -226,6 +226,7 @@ fn Test(d: D) -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Convert = %C.as.ImplicitAs.impl.Convert.decl +// CHECK:STDOUT: extend %ImplicitAs.type // CHECK:STDOUT: witness = %ImplicitAs.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/impl/assoc_const_self.carbon b/toolchain/check/testdata/impl/assoc_const_self.carbon index 269c6811fcc4..940007761995 100644 --- a/toolchain/check/testdata/impl/assoc_const_self.carbon +++ b/toolchain/check/testdata/impl/assoc_const_self.carbon @@ -224,6 +224,7 @@ fn CallF() { // CHECK:STDOUT: %impl_witness_assoc_constant: %empty_struct_type = impl_witness_assoc_constant constants.%empty_struct [concrete = constants.%empty_struct] // CHECK:STDOUT: // CHECK:STDOUT: !members: +// CHECK:STDOUT: extend %.loc8_14 // CHECK:STDOUT: witness = %I.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: @@ -240,6 +241,7 @@ fn CallF() { // CHECK:STDOUT: %impl_witness_assoc_constant: %i32 = impl_witness_assoc_constant constants.%int_0.6a9 [concrete = constants.%int_0.6a9] // CHECK:STDOUT: // CHECK:STDOUT: !members: +// CHECK:STDOUT: extend %.loc10_15.1 // CHECK:STDOUT: witness = %I.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: @@ -361,6 +363,7 @@ fn CallF() { // CHECK:STDOUT: %impl_witness_assoc_constant: = impl_witness_assoc_constant [concrete = ] // CHECK:STDOUT: // CHECK:STDOUT: !members: +// CHECK:STDOUT: extend %.loc15_14.1 // CHECK:STDOUT: witness = %I.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: @@ -513,6 +516,7 @@ fn CallF() { // CHECK:STDOUT: !members: // CHECK:STDOUT: .C = // CHECK:STDOUT: .Convert = %empty_tuple.type.as.ImplicitAs.impl.Convert.decl +// CHECK:STDOUT: extend %ImplicitAs.type // CHECK:STDOUT: witness = %ImplicitAs.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: @@ -529,6 +533,7 @@ fn CallF() { // CHECK:STDOUT: %impl_witness_assoc_constant: = impl_witness_assoc_constant [concrete = ] // CHECK:STDOUT: // CHECK:STDOUT: !members: +// CHECK:STDOUT: extend %.loc18_13.1 // CHECK:STDOUT: witness = %I.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: @@ -697,6 +702,7 @@ fn CallF() { // CHECK:STDOUT: // CHECK:STDOUT: impl @empty_struct_type.as..impl: %.loc15_7.2 as { // CHECK:STDOUT: !members: +// CHECK:STDOUT: extend // CHECK:STDOUT: witness = // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/impl/basic.carbon b/toolchain/check/testdata/impl/basic.carbon index 6e21d9a2f6fb..a1f324d557a1 100644 --- a/toolchain/check/testdata/impl/basic.carbon +++ b/toolchain/check/testdata/impl/basic.carbon @@ -134,6 +134,7 @@ final impl C(invalid) as I {} // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %C.as.Simple.impl.F.decl +// CHECK:STDOUT: extend %Simple.ref // CHECK:STDOUT: witness = %Simple.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/impl/compound.carbon b/toolchain/check/testdata/impl/compound.carbon index 2a048bd3ca57..99ef872eac7d 100644 --- a/toolchain/check/testdata/impl/compound.carbon +++ b/toolchain/check/testdata/impl/compound.carbon @@ -289,6 +289,7 @@ fn InstanceCallFail() { // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F1 = %struct_type.a.as.NonInstance1.impl.F1.decl +// CHECK:STDOUT: extend %NonInstance1.ref // CHECK:STDOUT: witness = %NonInstance1.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: @@ -459,6 +460,7 @@ fn InstanceCallFail() { // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F2 = %struct_type.b.as.NonInstance2.impl.F2.decl +// CHECK:STDOUT: extend %NonInstance2.ref // CHECK:STDOUT: witness = %NonInstance2.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: @@ -673,6 +675,7 @@ fn InstanceCallFail() { // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F3 = %struct_type.c.as.NonInstance3.impl.F3.decl +// CHECK:STDOUT: extend %NonInstance3.ref // CHECK:STDOUT: witness = %NonInstance3.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: @@ -872,6 +875,7 @@ fn InstanceCallFail() { // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .G1 = %struct_type.d.as.Instance1.impl.G1.decl +// CHECK:STDOUT: extend %Instance1.ref // CHECK:STDOUT: witness = %Instance1.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: @@ -1023,6 +1027,7 @@ fn InstanceCallFail() { // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .G2 = %struct_type.e.as.Instance2.impl.G2.decl +// CHECK:STDOUT: extend %Instance2.ref // CHECK:STDOUT: witness = %Instance2.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/impl/declaration.carbon b/toolchain/check/testdata/impl/declaration.carbon index 941aab161a63..814b2024116e 100644 --- a/toolchain/check/testdata/impl/declaration.carbon +++ b/toolchain/check/testdata/impl/declaration.carbon @@ -73,6 +73,7 @@ impl i32 as I {} // CHECK:STDOUT: %I.impl_witness: = impl_witness %I.impl_witness_table [concrete = constants.%I.impl_witness] // CHECK:STDOUT: // CHECK:STDOUT: !members: +// CHECK:STDOUT: extend %I.ref.loc17 // CHECK:STDOUT: witness = %I.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/impl/empty.carbon b/toolchain/check/testdata/impl/empty.carbon index f77a92cf27df..4775ab433109 100644 --- a/toolchain/check/testdata/impl/empty.carbon +++ b/toolchain/check/testdata/impl/empty.carbon @@ -69,6 +69,7 @@ impl i32 as Empty { // CHECK:STDOUT: %Empty.impl_witness: = impl_witness %Empty.impl_witness_table [concrete = constants.%Empty.impl_witness] // CHECK:STDOUT: // CHECK:STDOUT: !members: +// CHECK:STDOUT: extend %Empty.ref // CHECK:STDOUT: witness = %Empty.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/impl/error_recovery.carbon b/toolchain/check/testdata/impl/error_recovery.carbon index 2b7f8caeef20..740db16a4659 100644 --- a/toolchain/check/testdata/impl/error_recovery.carbon +++ b/toolchain/check/testdata/impl/error_recovery.carbon @@ -154,6 +154,7 @@ impl C as I { // CHECK:STDOUT: %I.impl_witness: = impl_witness %I.impl_witness_table [concrete = constants.%I.impl_witness] // CHECK:STDOUT: // CHECK:STDOUT: !members: +// CHECK:STDOUT: extend %I.ref // CHECK:STDOUT: witness = %I.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/impl/extend_impl.carbon b/toolchain/check/testdata/impl/extend_impl.carbon index 0f8152217140..9c8f27605d41 100644 --- a/toolchain/check/testdata/impl/extend_impl.carbon +++ b/toolchain/check/testdata/impl/extend_impl.carbon @@ -130,6 +130,7 @@ extend impl nonexistent* as I {} // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %C.as.HasF.impl.F.decl +// CHECK:STDOUT: extend %HasF.ref // CHECK:STDOUT: witness = %HasF.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/impl/extend_impl_generic.carbon b/toolchain/check/testdata/impl/extend_impl_generic.carbon index c007733d2fef..abec39117366 100644 --- a/toolchain/check/testdata/impl/extend_impl_generic.carbon +++ b/toolchain/check/testdata/impl/extend_impl_generic.carbon @@ -241,6 +241,7 @@ class X(U:! type) { // CHECK:STDOUT: !members: // CHECK:STDOUT: .Param = // CHECK:STDOUT: .F = %C.as.HasF.impl.F.decl +// CHECK:STDOUT: extend %HasF.type // CHECK:STDOUT: witness = %HasF.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: @@ -577,6 +578,7 @@ class X(U:! type) { // CHECK:STDOUT: !members: // CHECK:STDOUT: .U = // CHECK:STDOUT: .F = %X.as.I.impl.F.decl +// CHECK:STDOUT: extend %I.type.loc9_21.2 // CHECK:STDOUT: witness = %I.impl_witness.loc9_23.1 // CHECK:STDOUT: } // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/impl/fail_alias.carbon b/toolchain/check/testdata/impl/fail_alias.carbon index b7f2e0de4b87..66acf11ff182 100644 --- a/toolchain/check/testdata/impl/fail_alias.carbon +++ b/toolchain/check/testdata/impl/fail_alias.carbon @@ -80,11 +80,13 @@ impl AC as AI {} // CHECK:STDOUT: %I.impl_witness: = impl_witness %I.impl_witness_table [concrete = constants.%I.impl_witness] // CHECK:STDOUT: // CHECK:STDOUT: !members: +// CHECK:STDOUT: extend %AI.ref // CHECK:STDOUT: witness = %I.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @C.as.I.impl.e47215.2: %AC.ref as %AI.ref { // CHECK:STDOUT: !members: +// CHECK:STDOUT: extend %AI.ref // CHECK:STDOUT: witness = // 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 b494efd16855..a52ea2be0fba 100644 --- a/toolchain/check/testdata/impl/fail_call_invalid.carbon +++ b/toolchain/check/testdata/impl/fail_call_invalid.carbon @@ -112,6 +112,7 @@ fn InstanceCall(n: i32) { // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self // CHECK:STDOUT: .G = @Simple.WithSelf.%assoc0 +// CHECK:STDOUT: .Undeclared = // CHECK:STDOUT: witness = (@Simple.WithSelf.%Simple.WithSelf.G.decl) // CHECK:STDOUT: // CHECK:STDOUT: !requires: @@ -139,6 +140,7 @@ fn InstanceCall(n: i32) { // CHECK:STDOUT: !members: // CHECK:STDOUT: .Undeclared = // CHECK:STDOUT: .G = %i32.as.Simple.impl.G.decl.loc24_27.1 +// CHECK:STDOUT: extend %Simple.ref // CHECK:STDOUT: witness = %Simple.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/impl/fail_extend_impl_forall.carbon b/toolchain/check/testdata/impl/fail_extend_impl_forall.carbon index a271b40dbc56..abf2c16437ca 100644 --- a/toolchain/check/testdata/impl/fail_extend_impl_forall.carbon +++ b/toolchain/check/testdata/impl/fail_extend_impl_forall.carbon @@ -125,6 +125,7 @@ class C { // CHECK:STDOUT: !members: // CHECK:STDOUT: .T = // CHECK:STDOUT: .F = %C.as.GenericInterface.impl.F.decl +// CHECK:STDOUT: extend %GenericInterface.type.loc24_54.2 // CHECK:STDOUT: witness = // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -176,7 +177,16 @@ class C { // CHECK:STDOUT: %T.loc15_29.1 => constants.%T // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @GenericInterface.WithSelf(constants.%T, constants.%Self) {} +// CHECK:STDOUT: specific @GenericInterface.WithSelf(constants.%T, constants.%Self) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %T => constants.%T +// CHECK:STDOUT: %GenericInterface.type => constants.%GenericInterface.type.8bc +// CHECK:STDOUT: %Self => constants.%Self +// CHECK:STDOUT: %GenericInterface.WithSelf.F.type => constants.%GenericInterface.WithSelf.F.type +// CHECK:STDOUT: %GenericInterface.WithSelf.F => constants.%GenericInterface.WithSelf.F +// CHECK:STDOUT: %GenericInterface.assoc_type => constants.%GenericInterface.assoc_type +// CHECK:STDOUT: %assoc0.loc16_13.2 => constants.%assoc0 +// CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @GenericInterface.WithSelf.F(constants.%T, constants.%Self) { // CHECK:STDOUT: %T => 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 280900d15b2f..f573c65aa92e 100644 --- a/toolchain/check/testdata/impl/fail_extend_impl_scope.carbon +++ b/toolchain/check/testdata/impl/fail_extend_impl_scope.carbon @@ -111,6 +111,7 @@ fn F() { // CHECK:STDOUT: %I.impl_witness: = impl_witness %I.impl_witness_table [concrete = constants.%I.impl_witness] // CHECK:STDOUT: // CHECK:STDOUT: !members: +// CHECK:STDOUT: extend %I.ref // CHECK:STDOUT: witness = // CHECK:STDOUT: } // CHECK:STDOUT: @@ -162,6 +163,7 @@ fn F() { // CHECK:STDOUT: %J.impl_witness: = impl_witness %J.impl_witness_table [concrete = constants.%J.impl_witness] // CHECK:STDOUT: // CHECK:STDOUT: !members: +// CHECK:STDOUT: extend %J.ref // CHECK:STDOUT: witness = // CHECK:STDOUT: } // CHECK:STDOUT: @@ -268,6 +270,7 @@ fn F() { // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Zero = %.as.Z.impl.Zero.decl +// CHECK:STDOUT: extend %Z.ref // CHECK:STDOUT: witness = // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -279,6 +282,7 @@ fn F() { // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Zero = %Point.as.Z.impl.Zero.decl +// CHECK:STDOUT: extend %Z.ref // CHECK:STDOUT: witness = %Z.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: 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 d52ff216db09..140c61a13896 100644 --- a/toolchain/check/testdata/impl/fail_extend_impl_type_as.carbon +++ b/toolchain/check/testdata/impl/fail_extend_impl_type_as.carbon @@ -103,6 +103,7 @@ class E { // CHECK:STDOUT: // CHECK:STDOUT: impl @.as.I.impl: as %I.ref { // CHECK:STDOUT: !members: +// CHECK:STDOUT: extend %I.ref // CHECK:STDOUT: witness = // CHECK:STDOUT: } // CHECK:STDOUT: @@ -113,6 +114,7 @@ class E { // CHECK:STDOUT: %I.impl_witness: = impl_witness %I.impl_witness_table [concrete = constants.%I.impl_witness.1f6] // CHECK:STDOUT: // CHECK:STDOUT: !members: +// CHECK:STDOUT: extend %I.ref // CHECK:STDOUT: witness = %I.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/impl/fail_impl_as_scope.carbon b/toolchain/check/testdata/impl/fail_impl_as_scope.carbon index 39a4a8b58e65..e82cdaff6349 100644 --- a/toolchain/check/testdata/impl/fail_impl_as_scope.carbon +++ b/toolchain/check/testdata/impl/fail_impl_as_scope.carbon @@ -147,6 +147,7 @@ class X { // CHECK:STDOUT: // CHECK:STDOUT: impl @.as.I.impl: as %I.ref { // CHECK:STDOUT: !members: +// CHECK:STDOUT: extend %I.ref // CHECK:STDOUT: witness = // CHECK:STDOUT: } // CHECK:STDOUT: @@ -209,6 +210,7 @@ class X { // CHECK:STDOUT: // CHECK:STDOUT: impl @.as.J.impl: as %J.ref { // CHECK:STDOUT: !members: +// CHECK:STDOUT: extend %J.ref // CHECK:STDOUT: witness = // CHECK:STDOUT: } // CHECK:STDOUT: @@ -360,6 +362,7 @@ class X { // CHECK:STDOUT: !members: // CHECK:STDOUT: .Zero = %.as.Z.impl.Zero.decl // CHECK:STDOUT: .Method = %.as.Z.impl.Method.decl +// CHECK:STDOUT: extend %Z.ref // CHECK:STDOUT: witness = // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -380,6 +383,7 @@ class X { // CHECK:STDOUT: !members: // CHECK:STDOUT: .Zero = %Point.as.Z.impl.Zero.decl // CHECK:STDOUT: .Method = %Point.as.Z.impl.Method.decl +// CHECK:STDOUT: extend %Z.ref // CHECK:STDOUT: witness = %Z.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: @@ -582,6 +586,8 @@ class X { // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self // CHECK:STDOUT: .B = @A.WithSelf.%assoc0 +// CHECK:STDOUT: .C = +// CHECK:STDOUT: .G = // CHECK:STDOUT: witness = (@A.WithSelf.%A.WithSelf.B.decl) // CHECK:STDOUT: // CHECK:STDOUT: !requires: @@ -610,11 +616,13 @@ class X { // CHECK:STDOUT: .C = // CHECK:STDOUT: .B = %X.as.A.impl.B.decl // CHECK:STDOUT: .G = +// CHECK:STDOUT: extend %A.ref // CHECK:STDOUT: witness = %A.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @.as.C.impl: as %C.ref { // CHECK:STDOUT: !members: +// CHECK:STDOUT: extend %C.ref // CHECK:STDOUT: witness = // CHECK:STDOUT: } // 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 eba07af6b49b..a68f56e001a1 100644 --- a/toolchain/check/testdata/impl/fail_impl_bad_assoc_const.carbon +++ b/toolchain/check/testdata/impl/fail_impl_bad_assoc_const.carbon @@ -70,6 +70,7 @@ impl () as I {} // CHECK:STDOUT: %I.impl_witness: = impl_witness %I.impl_witness_table [concrete = constants.%I.impl_witness] // CHECK:STDOUT: // CHECK:STDOUT: !members: +// CHECK:STDOUT: extend %I.ref // CHECK:STDOUT: witness = %I.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: 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 3d3c68a88802..f3a7ed781b6c 100644 --- a/toolchain/check/testdata/impl/fail_impl_bad_assoc_fn.carbon +++ b/toolchain/check/testdata/impl/fail_impl_bad_assoc_fn.carbon @@ -494,6 +494,7 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self // CHECK:STDOUT: .F = @I.WithSelf.%assoc0 +// CHECK:STDOUT: .PossiblyF = // CHECK:STDOUT: witness = (@I.WithSelf.%I.WithSelf.F.decl) // CHECK:STDOUT: // CHECK:STDOUT: !requires: @@ -573,6 +574,8 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self // CHECK:STDOUT: .F = @SelfNested.WithSelf.%assoc0 +// CHECK:STDOUT: .SelfNestedBadParam = +// CHECK:STDOUT: .SelfNestedBadReturnType = // CHECK:STDOUT: witness = (@SelfNested.WithSelf.%SelfNested.WithSelf.F.decl) // CHECK:STDOUT: // CHECK:STDOUT: !requires: @@ -584,6 +587,7 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = +// CHECK:STDOUT: extend %I.ref // CHECK:STDOUT: witness = %I.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: @@ -594,6 +598,7 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %F.decl +// CHECK:STDOUT: extend %I.ref // CHECK:STDOUT: witness = %I.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: @@ -606,6 +611,7 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: !members: // CHECK:STDOUT: .PossiblyF = // CHECK:STDOUT: .F = %F +// CHECK:STDOUT: extend %I.ref // CHECK:STDOUT: witness = %I.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: @@ -624,6 +630,7 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %FExtraParam.as.I.impl.F.decl.loc69_18.1 +// CHECK:STDOUT: extend %I.ref // CHECK:STDOUT: witness = %I.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: @@ -642,6 +649,7 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %FExtraImplicitParam.as.I.impl.F.decl.loc85_23.1 +// CHECK:STDOUT: extend %I.ref // CHECK:STDOUT: witness = %I.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: @@ -660,6 +668,7 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %FExtraReturnType.as.I.impl.F.decl +// CHECK:STDOUT: extend %I.ref // CHECK:STDOUT: witness = %I.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: @@ -700,6 +709,7 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %FMissingParam.as.J.impl.F.decl.loc117_31.1 +// CHECK:STDOUT: extend %J.ref // CHECK:STDOUT: witness = %J.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: @@ -740,6 +750,7 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %FMissingImplicitParam.as.J.impl.F.decl.loc130_26.1 +// CHECK:STDOUT: extend %J.ref // CHECK:STDOUT: witness = %J.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: @@ -779,6 +790,7 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %FMissingReturnType.as.J.impl.F.decl.loc152_30.1 +// CHECK:STDOUT: extend %J.ref // CHECK:STDOUT: witness = %J.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: @@ -824,6 +836,7 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %FDifferentParamType.as.J.impl.F.decl.loc171_38.1 +// CHECK:STDOUT: extend %J.ref // CHECK:STDOUT: witness = %J.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: @@ -869,6 +882,7 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %FDifferentImplicitParamType.as.J.impl.F.decl.loc184_38.1 +// CHECK:STDOUT: extend %J.ref // CHECK:STDOUT: witness = %J.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: @@ -914,6 +928,7 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %FDifferentReturnType.as.J.impl.F.decl.loc200_38.1 +// CHECK:STDOUT: extend %J.ref // CHECK:STDOUT: witness = %J.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: @@ -961,6 +976,7 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: !members: // CHECK:STDOUT: .SelfNestedBadParam = // CHECK:STDOUT: .F = %SelfNestedBadParam.as.SelfNested.impl.F.decl.loc223_87.1 +// CHECK:STDOUT: extend %SelfNested.ref // CHECK:STDOUT: witness = %SelfNested.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: @@ -1009,6 +1025,7 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: .SelfNestedBadReturnType = // CHECK:STDOUT: .SelfNestedBadParam = // CHECK:STDOUT: .F = %SelfNestedBadReturnType.as.SelfNested.impl.F.decl.loc239_112.1 +// CHECK:STDOUT: extend %SelfNested.ref // CHECK:STDOUT: witness = %SelfNested.impl_witness // 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 a53209907ffe..49c9e067aa98 100644 --- a/toolchain/check/testdata/impl/fail_impl_bad_interface.carbon +++ b/toolchain/check/testdata/impl/fail_impl_bad_interface.carbon @@ -94,6 +94,7 @@ impl {.a: bool} as type where .Self impls I {} // CHECK:STDOUT: // CHECK:STDOUT: impl @i32.as..impl: %i32 as { // CHECK:STDOUT: !members: +// CHECK:STDOUT: extend // CHECK:STDOUT: witness = // CHECK:STDOUT: } // CHECK:STDOUT: @@ -126,6 +127,7 @@ impl {.a: bool} as type where .Self impls I {} // CHECK:STDOUT: // CHECK:STDOUT: impl @bool.as..impl: %.loc8_6 as { // CHECK:STDOUT: !members: +// CHECK:STDOUT: extend // CHECK:STDOUT: witness = // CHECK:STDOUT: } // CHECK:STDOUT: @@ -172,6 +174,7 @@ impl {.a: bool} as type where .Self impls I {} // CHECK:STDOUT: // CHECK:STDOUT: impl @f64.as..impl: %f64 as { // CHECK:STDOUT: !members: +// CHECK:STDOUT: extend // CHECK:STDOUT: witness = // CHECK:STDOUT: } // CHECK:STDOUT: @@ -234,6 +237,7 @@ impl {.a: bool} as type where .Self impls I {} // CHECK:STDOUT: // CHECK:STDOUT: impl @struct_type.a.as..impl: %struct_type.a as { // CHECK:STDOUT: !members: +// CHECK:STDOUT: extend // CHECK:STDOUT: witness = // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/impl/fail_impl_bad_type.carbon b/toolchain/check/testdata/impl/fail_impl_bad_type.carbon index b4e82b3aae02..d9d2b9791862 100644 --- a/toolchain/check/testdata/impl/fail_impl_bad_type.carbon +++ b/toolchain/check/testdata/impl/fail_impl_bad_type.carbon @@ -69,6 +69,7 @@ impl true as I {} // CHECK:STDOUT: // CHECK:STDOUT: impl @.as.I.impl: as %I.ref { // CHECK:STDOUT: !members: +// CHECK:STDOUT: extend %I.ref // CHECK:STDOUT: witness = // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/impl/fail_redefinition.carbon b/toolchain/check/testdata/impl/fail_redefinition.carbon index 7566d46f798f..b9365c581ba6 100644 --- a/toolchain/check/testdata/impl/fail_redefinition.carbon +++ b/toolchain/check/testdata/impl/fail_redefinition.carbon @@ -80,11 +80,13 @@ impl i32 as I {} // CHECK:STDOUT: %I.impl_witness: = impl_witness %I.impl_witness_table [concrete = constants.%I.impl_witness] // CHECK:STDOUT: // CHECK:STDOUT: !members: +// CHECK:STDOUT: extend %I.ref // CHECK:STDOUT: witness = %I.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @i32.as.I.impl.a9e516.2: %i32 as %I.ref { // CHECK:STDOUT: !members: +// CHECK:STDOUT: extend %I.ref // CHECK:STDOUT: witness = // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/impl/fail_self_type_mismatch.carbon b/toolchain/check/testdata/impl/fail_self_type_mismatch.carbon index c29f89f080cc..bb7278ee496c 100644 --- a/toolchain/check/testdata/impl/fail_self_type_mismatch.carbon +++ b/toolchain/check/testdata/impl/fail_self_type_mismatch.carbon @@ -167,6 +167,7 @@ impl i32 as I { // CHECK:STDOUT: .C = // CHECK:STDOUT: .C = // CHECK:STDOUT: .F = @I.WithSelf.%assoc0 +// CHECK:STDOUT: .I = // CHECK:STDOUT: witness = (@I.WithSelf.%I.WithSelf.F.decl) // CHECK:STDOUT: // CHECK:STDOUT: !requires: @@ -195,6 +196,7 @@ impl i32 as I { // CHECK:STDOUT: .C = // CHECK:STDOUT: .I = // CHECK:STDOUT: .F = %bool.as.I.impl.F.decl +// CHECK:STDOUT: extend %I.ref // CHECK:STDOUT: witness = %I.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: @@ -224,6 +226,7 @@ impl i32 as I { // CHECK:STDOUT: !members: // CHECK:STDOUT: .C = // CHECK:STDOUT: .F = %i32.as.I.impl.F.decl.loc43_18.1 +// CHECK:STDOUT: extend %I.ref // CHECK:STDOUT: witness = %I.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/impl/forward_decls.carbon b/toolchain/check/testdata/impl/forward_decls.carbon index 7ade658de026..bcda87214348 100644 --- a/toolchain/check/testdata/impl/forward_decls.carbon +++ b/toolchain/check/testdata/impl/forward_decls.carbon @@ -284,6 +284,7 @@ impl C as Y {} // CHECK:STDOUT: %I.impl_witness: = impl_witness %I.impl_witness_table [concrete = constants.%I.impl_witness] // CHECK:STDOUT: // CHECK:STDOUT: !members: +// CHECK:STDOUT: extend %I.ref.loc4 // CHECK:STDOUT: witness = %I.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: @@ -364,6 +365,7 @@ impl C as Y {} // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .G = %empty_struct_type.as.I.impl.G.decl +// CHECK:STDOUT: extend %I.ref.loc4 // CHECK:STDOUT: witness = %I.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: @@ -474,6 +476,7 @@ impl C as Y {} // CHECK:STDOUT: %I.impl_witness: = impl_witness %I.impl_witness_table [concrete = constants.%I.impl_witness] // CHECK:STDOUT: // CHECK:STDOUT: !members: +// CHECK:STDOUT: extend file.%.loc4_14.2 // CHECK:STDOUT: witness = %I.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: @@ -578,6 +581,7 @@ impl C as Y {} // CHECK:STDOUT: %impl_witness_assoc_constant: type = impl_witness_assoc_constant constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] // CHECK:STDOUT: // CHECK:STDOUT: !members: +// CHECK:STDOUT: extend %.loc6_14 // CHECK:STDOUT: witness = %I.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: @@ -703,6 +707,7 @@ impl C as Y {} // CHECK:STDOUT: %impl_witness_assoc_constant: type = impl_witness_assoc_constant constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] // CHECK:STDOUT: // CHECK:STDOUT: !members: +// CHECK:STDOUT: extend %.loc7_13 // CHECK:STDOUT: witness = %I.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: @@ -844,6 +849,7 @@ impl C as Y {} // CHECK:STDOUT: %impl_witness_assoc_constant: type = impl_witness_assoc_constant constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] // CHECK:STDOUT: // CHECK:STDOUT: !members: +// CHECK:STDOUT: extend %.loc7_13 // CHECK:STDOUT: witness = %I.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: @@ -952,6 +958,7 @@ impl C as Y {} // CHECK:STDOUT: %I.impl_witness: = impl_witness %I.impl_witness_table [concrete = constants.%I.impl_witness] // CHECK:STDOUT: // CHECK:STDOUT: !members: +// CHECK:STDOUT: extend %I.ref.loc7 // CHECK:STDOUT: witness = %I.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: @@ -1054,6 +1061,7 @@ impl C as Y {} // CHECK:STDOUT: // CHECK:STDOUT: impl @D.as..impl: %D.ref.loc13 as { // CHECK:STDOUT: !members: +// CHECK:STDOUT: extend // CHECK:STDOUT: witness = // CHECK:STDOUT: } // CHECK:STDOUT: @@ -1207,6 +1215,7 @@ impl C as Y {} // CHECK:STDOUT: %impl_witness_assoc_constant: type = impl_witness_assoc_constant constants.%C [concrete = constants.%C] // CHECK:STDOUT: // CHECK:STDOUT: !members: +// CHECK:STDOUT: extend %.loc8_16 // CHECK:STDOUT: witness = %I.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: @@ -1375,6 +1384,7 @@ impl C as Y {} // CHECK:STDOUT: %I.impl_witness: = impl_witness %I.impl_witness_table [concrete = constants.%I.impl_witness] // CHECK:STDOUT: // CHECK:STDOUT: !members: +// CHECK:STDOUT: extend %I.ref.loc5 // CHECK:STDOUT: witness = %I.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: @@ -1607,6 +1617,7 @@ impl C as Y {} // CHECK:STDOUT: %impl_witness_assoc_constant: type = impl_witness_assoc_constant constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] // CHECK:STDOUT: // CHECK:STDOUT: !members: +// CHECK:STDOUT: extend %.loc9_13 // CHECK:STDOUT: witness = %I.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: @@ -1795,6 +1806,7 @@ impl C as Y {} // CHECK:STDOUT: %X.impl_witness: = impl_witness %X.impl_witness_table [concrete = constants.%X.impl_witness] // CHECK:STDOUT: // CHECK:STDOUT: !members: +// CHECK:STDOUT: extend %X.ref.loc12 // CHECK:STDOUT: witness = %X.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: @@ -1803,6 +1815,7 @@ impl C as Y {} // CHECK:STDOUT: %Y.impl_witness: = impl_witness %Y.impl_witness_table [concrete = constants.%Y.impl_witness] // CHECK:STDOUT: // CHECK:STDOUT: !members: +// CHECK:STDOUT: extend %Y.ref.loc36 // CHECK:STDOUT: witness = %Y.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/impl/generic_redeclaration.carbon b/toolchain/check/testdata/impl/generic_redeclaration.carbon index 946913a1baeb..f5187498f03d 100644 --- a/toolchain/check/testdata/impl/generic_redeclaration.carbon +++ b/toolchain/check/testdata/impl/generic_redeclaration.carbon @@ -350,6 +350,7 @@ impl forall [T:! type] T as I { // CHECK:STDOUT: %Interface.impl_witness.loc12_35.1: = impl_witness %Interface.impl_witness_table, @T.as_type.as.Interface.impl.ff3(constants.%T.651) [symbolic = %Interface.impl_witness.loc12_35.2 (constants.%Interface.impl_witness.cca)] // CHECK:STDOUT: // CHECK:STDOUT: !members: +// CHECK:STDOUT: extend %Interface.ref.loc12 // CHECK:STDOUT: witness = %Interface.impl_witness.loc12_35.1 // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -366,6 +367,7 @@ impl forall [T:! type] T as I { // CHECK:STDOUT: %Interface.impl_witness.loc13_35.1: = impl_witness %Interface.impl_witness_table, @T.as_type.as.Interface.impl.755(constants.%T.612) [symbolic = %Interface.impl_witness.loc13_35.2 (constants.%Interface.impl_witness.885)] // CHECK:STDOUT: // CHECK:STDOUT: !members: +// CHECK:STDOUT: extend %Interface.ref.loc13 // CHECK:STDOUT: witness = %Interface.impl_witness.loc13_35.1 // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -382,6 +384,7 @@ impl forall [T:! type] T as I { // CHECK:STDOUT: %Interface.impl_witness.loc14_35.1: = impl_witness %Interface.impl_witness_table, @T.as_type.as.Interface.impl.cd3(constants.%T.9b2) [symbolic = %Interface.impl_witness.loc14_35.2 (constants.%Interface.impl_witness.0f2)] // CHECK:STDOUT: // CHECK:STDOUT: !members: +// CHECK:STDOUT: extend %Interface.ref.loc14 // CHECK:STDOUT: witness = %Interface.impl_witness.loc14_35.1 // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -398,6 +401,7 @@ impl forall [T:! type] T as I { // CHECK:STDOUT: %Interface.impl_witness.loc15_35.1: = impl_witness %Interface.impl_witness_table, @T.as_type.as.Interface.impl.ba3(constants.%T.0fc) [symbolic = %Interface.impl_witness.loc15_35.2 (constants.%Interface.impl_witness.18f)] // CHECK:STDOUT: // CHECK:STDOUT: !members: +// CHECK:STDOUT: extend %Interface.ref.loc15 // CHECK:STDOUT: witness = %Interface.impl_witness.loc15_35.1 // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -556,6 +560,7 @@ impl forall [T:! type] T as I { // CHECK:STDOUT: %J.impl_witness.loc7_28.1: = impl_witness %J.impl_witness_table, @T.as_type.as.J.impl.048579.1(constants.%T) [symbolic = %J.impl_witness.loc7_28.2 (constants.%J.impl_witness)] // CHECK:STDOUT: // CHECK:STDOUT: !members: +// CHECK:STDOUT: extend %J.ref // CHECK:STDOUT: witness = %J.impl_witness.loc7_28.1 // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -568,6 +573,7 @@ impl forall [T:! type] T as I { // CHECK:STDOUT: // CHECK:STDOUT: impl: %.loc15_21 as %J.ref { // CHECK:STDOUT: !members: +// CHECK:STDOUT: extend %J.ref // CHECK:STDOUT: witness = // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -658,6 +664,7 @@ impl forall [T:! type] T as I { // CHECK:STDOUT: %I.impl_witness: = impl_witness %I.impl_witness_table [concrete = constants.%I.impl_witness.6465e0.1] // CHECK:STDOUT: // CHECK:STDOUT: !members: +// CHECK:STDOUT: extend %I.ref // CHECK:STDOUT: witness = %I.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: @@ -666,6 +673,7 @@ impl forall [T:! type] T as I { // CHECK:STDOUT: %I.impl_witness: = impl_witness %I.impl_witness_table [concrete = constants.%I.impl_witness.6465e0.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: +// CHECK:STDOUT: extend %I.ref // CHECK:STDOUT: witness = %I.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: @@ -773,6 +781,7 @@ impl forall [T:! type] T as I { // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .A = %T.as.I.impl.A.decl +// CHECK:STDOUT: extend %I.ref // CHECK:STDOUT: witness = %I.impl_witness.loc4_31.1 // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -815,6 +824,7 @@ impl forall [T:! type] T as I { // CHECK:STDOUT: .B = %T.as.I.impl.B.decl // CHECK:STDOUT: .C = %T.as.I.impl.C.decl // CHECK:STDOUT: .D = %T.as.I.impl.D.decl +// CHECK:STDOUT: extend %I.ref // CHECK:STDOUT: witness = // CHECK:STDOUT: } // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/impl/impl_as.carbon b/toolchain/check/testdata/impl/impl_as.carbon index 1e46c70f3b40..ffd02f5d55f7 100644 --- a/toolchain/check/testdata/impl/impl_as.carbon +++ b/toolchain/check/testdata/impl/impl_as.carbon @@ -83,6 +83,7 @@ class C { // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self // CHECK:STDOUT: .F = @Simple.WithSelf.%assoc0 +// CHECK:STDOUT: .C = // CHECK:STDOUT: witness = (@Simple.WithSelf.%Simple.WithSelf.F.decl) // CHECK:STDOUT: // CHECK:STDOUT: !requires: @@ -96,6 +97,7 @@ class C { // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %C.as.Simple.impl.F.decl // CHECK:STDOUT: .C = +// CHECK:STDOUT: extend %Simple.ref // CHECK:STDOUT: witness = %Simple.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/impl/impl_assoc_const.carbon b/toolchain/check/testdata/impl/impl_assoc_const.carbon index 43e4eb6bca88..f6ab83a4d148 100644 --- a/toolchain/check/testdata/impl/impl_assoc_const.carbon +++ b/toolchain/check/testdata/impl/impl_assoc_const.carbon @@ -494,6 +494,7 @@ fn G() { // CHECK:STDOUT: // CHECK:STDOUT: impl @empty_tuple.type.as..impl: %.loc13_7.2 as { // CHECK:STDOUT: !members: +// CHECK:STDOUT: extend // CHECK:STDOUT: witness = // CHECK:STDOUT: } // CHECK:STDOUT: @@ -560,6 +561,7 @@ fn G() { // CHECK:STDOUT: // CHECK:STDOUT: impl @empty_tuple.type.as..impl: %.loc13_7.2 as { // CHECK:STDOUT: !members: +// CHECK:STDOUT: extend // CHECK:STDOUT: witness = // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/impl/impl_assoc_const_with_prelude.carbon b/toolchain/check/testdata/impl/impl_assoc_const_with_prelude.carbon index d11f11f97392..dd4252ee449e 100644 --- a/toolchain/check/testdata/impl/impl_assoc_const_with_prelude.carbon +++ b/toolchain/check/testdata/impl/impl_assoc_const_with_prelude.carbon @@ -247,6 +247,7 @@ impl () as I where .X = {.a = true, .b = (1, 2)} and .X = {.a = false, .b = (3, // CHECK:STDOUT: %impl_witness_assoc_constant: %struct_type.a.b.fe2 = impl_witness_assoc_constant constants.%struct.682 [concrete = constants.%struct.682] // CHECK:STDOUT: // CHECK:STDOUT: !members: +// CHECK:STDOUT: extend %.loc6_14 // CHECK:STDOUT: witness = %I.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: @@ -437,6 +438,7 @@ impl () as I where .X = {.a = true, .b = (1, 2)} and .X = {.a = false, .b = (3, // CHECK:STDOUT: // CHECK:STDOUT: impl @empty_tuple.type.as..impl: %.loc10_7.2 as { // CHECK:STDOUT: !members: +// CHECK:STDOUT: extend // CHECK:STDOUT: witness = // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/impl/impl_forall.carbon b/toolchain/check/testdata/impl/impl_forall.carbon index efed2fba450d..c375074c2801 100644 --- a/toolchain/check/testdata/impl/impl_forall.carbon +++ b/toolchain/check/testdata/impl/impl_forall.carbon @@ -90,6 +90,7 @@ impl forall [T:! type] T as Simple { // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %T.as.Simple.impl.F.decl +// CHECK:STDOUT: extend %Simple.ref // CHECK:STDOUT: witness = %Simple.impl_witness.loc19_36.1 // CHECK:STDOUT: } // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/impl/impl_thunk.carbon b/toolchain/check/testdata/impl/impl_thunk.carbon index 660d53835678..f8b9ec4f9d80 100644 --- a/toolchain/check/testdata/impl/impl_thunk.carbon +++ b/toolchain/check/testdata/impl/impl_thunk.carbon @@ -401,6 +401,7 @@ impl () as I({}) { // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %empty_tuple.type.as.I.impl.F.decl.loc10_48.1 +// CHECK:STDOUT: extend %I.ref // CHECK:STDOUT: witness = %I.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: @@ -513,6 +514,7 @@ impl () as I({}) { // CHECK:STDOUT: .A = // CHECK:STDOUT: .C = // CHECK:STDOUT: .F = %B.as.X.impl.F.decl.loc14_37.1 +// CHECK:STDOUT: extend %X.ref // CHECK:STDOUT: witness = %X.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: @@ -578,6 +580,7 @@ impl () as I({}) { // CHECK:STDOUT: !members: // CHECK:STDOUT: .A = // CHECK:STDOUT: .F = %B.as.X.impl.F.decl.loc13_26.1 +// CHECK:STDOUT: extend %X.ref // CHECK:STDOUT: witness = %X.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: @@ -666,6 +669,7 @@ impl () as I({}) { // CHECK:STDOUT: .A = // CHECK:STDOUT: .C = // CHECK:STDOUT: .F = %B.as.X.impl.F.decl.loc14_37.1 +// CHECK:STDOUT: extend %X.ref // CHECK:STDOUT: witness = %X.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: @@ -765,6 +769,7 @@ impl () as I({}) { // CHECK:STDOUT: .A = // CHECK:STDOUT: .C = // CHECK:STDOUT: .F = %B.as.X.impl.F.decl.loc14_37.1 +// CHECK:STDOUT: extend %X.ref // CHECK:STDOUT: witness = %X.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: @@ -830,6 +835,7 @@ impl () as I({}) { // CHECK:STDOUT: !members: // CHECK:STDOUT: .A = // CHECK:STDOUT: .F = %B.as.X.impl.F.decl.loc13_30.1 +// CHECK:STDOUT: extend %X.ref // CHECK:STDOUT: witness = %X.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: @@ -886,6 +892,7 @@ impl () as I({}) { // CHECK:STDOUT: !members: // CHECK:STDOUT: .B = // CHECK:STDOUT: .F = %A.as.X.impl.F.decl.loc23_14.1 +// CHECK:STDOUT: extend %X.ref // CHECK:STDOUT: witness = %X.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: @@ -1009,6 +1016,7 @@ impl () as I({}) { // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %empty_tuple.type.as.I.impl.F.decl.loc10_34.1 +// CHECK:STDOUT: extend %I.ref // CHECK:STDOUT: witness = %I.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: @@ -1186,6 +1194,7 @@ impl () as I({}) { // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %empty_tuple.type.as.I.impl.F.decl.loc10_51.1 +// CHECK:STDOUT: extend %I.ref // CHECK:STDOUT: witness = %I.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: @@ -1314,6 +1323,7 @@ impl () as I({}) { // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %empty_tuple.type.as.I.impl.F.decl.loc10_29.1 +// CHECK:STDOUT: extend %I.type // CHECK:STDOUT: witness = %I.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/impl/import_builtin_call.carbon b/toolchain/check/testdata/impl/import_builtin_call.carbon index ef3a67317258..4c95f4f2f922 100644 --- a/toolchain/check/testdata/impl/import_builtin_call.carbon +++ b/toolchain/check/testdata/impl/import_builtin_call.carbon @@ -298,6 +298,7 @@ var n: Int(64) = MakeFromClass(FromLiteral(64) as OtherInt); // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Op = %MyInt.as.Add.impl.Op.decl +// CHECK:STDOUT: extend %Add.ref // CHECK:STDOUT: witness = %Add.impl_witness.loc15_48.1 // CHECK:STDOUT: } // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/impl/import_compound.carbon b/toolchain/check/testdata/impl/import_compound.carbon index f8d35fda14a9..6a1b628cdc93 100644 --- a/toolchain/check/testdata/impl/import_compound.carbon +++ b/toolchain/check/testdata/impl/import_compound.carbon @@ -213,6 +213,7 @@ fn InstanceCallImportFail() { // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %struct_type.i.as.NonInstance.impl.F.decl +// CHECK:STDOUT: extend %NonInstance.ref // CHECK:STDOUT: witness = %NonInstance.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: @@ -230,6 +231,7 @@ fn InstanceCallImportFail() { // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .G = %struct_type.i.as.Instance.impl.G.decl +// CHECK:STDOUT: extend %Instance.ref // CHECK:STDOUT: witness = %Instance.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/impl/import_extend_impl.carbon b/toolchain/check/testdata/impl/import_extend_impl.carbon index 4ec12b138b63..5d9f36c9afc4 100644 --- a/toolchain/check/testdata/impl/import_extend_impl.carbon +++ b/toolchain/check/testdata/impl/import_extend_impl.carbon @@ -89,6 +89,7 @@ fn G(c: C) { // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %C.as.I.impl.F.decl +// CHECK:STDOUT: extend %I.ref // CHECK:STDOUT: witness = %I.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/impl/import_generic.carbon b/toolchain/check/testdata/impl/import_generic.carbon index 9c9ebac35723..0879ab69d5ea 100644 --- a/toolchain/check/testdata/impl/import_generic.carbon +++ b/toolchain/check/testdata/impl/import_generic.carbon @@ -437,6 +437,7 @@ impl forall [T:! type] D as N(T*) {} // CHECK:STDOUT: %I.impl_witness: = impl_witness %I.impl_witness_table [concrete = constants.%I.impl_witness] // CHECK:STDOUT: // CHECK:STDOUT: !members: +// CHECK:STDOUT: extend %I.type // CHECK:STDOUT: witness = %I.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: @@ -445,6 +446,7 @@ impl forall [T:! type] D as N(T*) {} // CHECK:STDOUT: %J.impl_witness: = impl_witness %J.impl_witness_table [concrete = constants.%J.impl_witness] // CHECK:STDOUT: // CHECK:STDOUT: !members: +// CHECK:STDOUT: extend %J.type // CHECK:STDOUT: witness = %J.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: @@ -774,6 +776,7 @@ impl forall [T:! type] D as N(T*) {} // CHECK:STDOUT: %I.impl_witness: = impl_witness %I.impl_witness_table [concrete = constants.%I.impl_witness] // CHECK:STDOUT: // CHECK:STDOUT: !members: +// CHECK:STDOUT: extend %J.type // CHECK:STDOUT: witness = %I.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: @@ -1031,6 +1034,7 @@ impl forall [T:! type] D as N(T*) {} // CHECK:STDOUT: %I.impl_witness.loc8_33.1: = impl_witness %I.impl_witness_table, @C.as.I.impl.431(constants.%T) [symbolic = %I.impl_witness.loc8_33.2 (constants.%I.impl_witness.9f5)] // CHECK:STDOUT: // CHECK:STDOUT: !members: +// CHECK:STDOUT: extend %I.type.loc8_32.1 // CHECK:STDOUT: witness = %I.impl_witness.loc8_33.1 // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -1049,6 +1053,7 @@ impl forall [T:! type] D as N(T*) {} // CHECK:STDOUT: %I.impl_witness.loc12_35.1: = impl_witness %I.impl_witness_table, @C.as.I.impl.815(constants.%T) [symbolic = %I.impl_witness.loc12_35.2 (constants.%I.impl_witness.18a)] // CHECK:STDOUT: // CHECK:STDOUT: !members: +// CHECK:STDOUT: extend %I.type.loc12_33.1 // CHECK:STDOUT: witness = %I.impl_witness.loc12_35.1 // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -1162,11 +1167,13 @@ impl forall [T:! type] D as N(T*) {} // CHECK:STDOUT: %I.impl_witness_table.ee9 = impl_witness_table (), @C.as.I.impl.6f8 [concrete] // CHECK:STDOUT: %Main.import_ref.61cd7d.1: type = import_ref Main//import_generic, loc8_24, loaded [concrete = constants.%C] // CHECK:STDOUT: %Main.import_ref.3582b1.1: type = import_ref Main//import_generic, loc8_32, loaded [symbolic = @C.as.I.impl.6f8.%I.type (constants.%I.type.1ab)] +// CHECK:STDOUT: %Main.import_ref.fd0 = import_ref Main//import_generic, loc8_32, unloaded // CHECK:STDOUT: %Main.import_ref.b3bc94.3: type = import_ref Main//import_generic, loc8_15, loaded [symbolic = @C.as.I.impl.6f8.%T (constants.%T)] // CHECK:STDOUT: %Main.import_ref.2c7 = import_ref Main//import_generic, loc12_35, unloaded // CHECK:STDOUT: %I.impl_witness_table.9fc = impl_witness_table (), @C.as.I.impl.856 [concrete] // CHECK:STDOUT: %Main.import_ref.61cd7d.2: type = import_ref Main//import_generic, loc12_24, loaded [concrete = constants.%C] // CHECK:STDOUT: %Main.import_ref.ada: type = import_ref Main//import_generic, loc12_33, loaded [symbolic = @C.as.I.impl.856.%I.type (constants.%I.type.e19)] +// CHECK:STDOUT: %Main.import_ref.dc0 = import_ref Main//import_generic, loc12_33, unloaded // CHECK:STDOUT: %Main.import_ref.b3bc94.4: type = import_ref Main//import_generic, loc12_15, loaded [symbolic = @C.as.I.impl.856.%T (constants.%T)] // CHECK:STDOUT: %Main.import_ref.15d = import_ref Main//import_generic, loc15_28, unloaded // CHECK:STDOUT: %Main.import_ref.213: type = import_ref Main//import_generic, loc15_18, loaded [symbolic = @N.WithSelf.Self.as_type.impls.I.type.require.%Self.as_type (constants.%Self.as_type)] @@ -1321,6 +1328,7 @@ impl forall [T:! type] D as N(T*) {} // CHECK:STDOUT: // CHECK:STDOUT: impl: imports.%Main.import_ref.61cd7d.1 as imports.%Main.import_ref.3582b1.1 { // CHECK:STDOUT: !members: +// CHECK:STDOUT: extend imports.%Main.import_ref.fd0 // CHECK:STDOUT: witness = imports.%Main.import_ref.e08 // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -1336,6 +1344,7 @@ impl forall [T:! type] D as N(T*) {} // CHECK:STDOUT: // CHECK:STDOUT: impl: imports.%Main.import_ref.61cd7d.2 as imports.%Main.import_ref.ada { // CHECK:STDOUT: !members: +// CHECK:STDOUT: extend imports.%Main.import_ref.dc0 // CHECK:STDOUT: witness = imports.%Main.import_ref.2c7 // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -1355,6 +1364,7 @@ impl forall [T:! type] D as N(T*) {} // CHECK:STDOUT: // CHECK:STDOUT: impl: %C.ref as %I.type.loc14_32.1 { // CHECK:STDOUT: !members: +// CHECK:STDOUT: extend %I.type.loc14_32.1 // CHECK:STDOUT: witness = // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -1376,6 +1386,7 @@ impl forall [T:! type] D as N(T*) {} // CHECK:STDOUT: // CHECK:STDOUT: impl: %C.ref as %I.type.loc26_33.1 { // CHECK:STDOUT: !members: +// CHECK:STDOUT: extend %I.type.loc26_33.1 // CHECK:STDOUT: witness = // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -1657,6 +1668,7 @@ impl forall [T:! type] D as N(T*) {} // CHECK:STDOUT: %I.impl_witness.loc7_34.1: = impl_witness %I.impl_witness_table, @C.as.I.impl(constants.%T) [symbolic = %I.impl_witness.loc7_34.2 (constants.%I.impl_witness)] // CHECK:STDOUT: // CHECK:STDOUT: !members: +// CHECK:STDOUT: extend %I.type.loc7_32.1 // CHECK:STDOUT: witness = %I.impl_witness.loc7_34.1 // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -1755,6 +1767,7 @@ impl forall [T:! type] D as N(T*) {} // CHECK:STDOUT: %I.impl_witness_table = impl_witness_table (), @C.as.I.impl.6f8 [concrete] // CHECK:STDOUT: %Main.import_ref.61c: type = import_ref Main//import_generic_with_different_specific, loc7_24, loaded [concrete = constants.%C] // CHECK:STDOUT: %Main.import_ref.3582b1.1: type = import_ref Main//import_generic_with_different_specific, loc7_32, loaded [symbolic = @C.as.I.impl.6f8.%I.type (constants.%I.type.1ab)] +// CHECK:STDOUT: %Main.import_ref.fd0 = import_ref Main//import_generic_with_different_specific, loc7_32, unloaded // CHECK:STDOUT: %Main.import_ref.b3bc94.3: type = import_ref Main//import_generic_with_different_specific, loc7_15, loaded [symbolic = @C.as.I.impl.6f8.%T (constants.%T)] // CHECK:STDOUT: %Main.import_ref.15d = import_ref Main//import_generic_with_different_specific, loc10_28, unloaded // CHECK:STDOUT: %Main.import_ref.213: type = import_ref Main//import_generic_with_different_specific, loc10_18, loaded [symbolic = @N.WithSelf.Self.as_type.impls.I.type.require.%Self.as_type (constants.%Self.as_type)] @@ -1857,6 +1870,7 @@ impl forall [T:! type] D as N(T*) {} // CHECK:STDOUT: // CHECK:STDOUT: impl: imports.%Main.import_ref.61c as imports.%Main.import_ref.3582b1.1 { // CHECK:STDOUT: !members: +// CHECK:STDOUT: extend imports.%Main.import_ref.fd0 // CHECK:STDOUT: witness = imports.%Main.import_ref.e08 // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -1875,6 +1889,7 @@ impl forall [T:! type] D as N(T*) {} // CHECK:STDOUT: %I.impl_witness.loc5_35.1: = impl_witness %I.impl_witness_table, @C.as.I.impl.815(constants.%T) [symbolic = %I.impl_witness.loc5_35.2 (constants.%I.impl_witness.18a)] // CHECK:STDOUT: // CHECK:STDOUT: !members: +// CHECK:STDOUT: extend %I.type.loc5_33.1 // CHECK:STDOUT: witness = %I.impl_witness.loc5_35.1 // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -1894,6 +1909,7 @@ impl forall [T:! type] D as N(T*) {} // CHECK:STDOUT: %I.impl_witness.loc6_36.1: = impl_witness %I.impl_witness_table, @C.as.I.impl.c93(constants.%T) [symbolic = %I.impl_witness.loc6_36.2 (constants.%I.impl_witness.d57)] // CHECK:STDOUT: // CHECK:STDOUT: !members: +// CHECK:STDOUT: extend %N.type.loc6_34.1 // CHECK:STDOUT: witness = %I.impl_witness.loc6_36.1 // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -2437,6 +2453,7 @@ impl forall [T:! type] D as N(T*) {} // CHECK:STDOUT: // CHECK:STDOUT: impl: %D.ref as %J.type.loc14_32.1 { // CHECK:STDOUT: !members: +// CHECK:STDOUT: extend %J.type.loc14_32.1 // CHECK:STDOUT: witness = // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -2458,6 +2475,7 @@ impl forall [T:! type] D as N(T*) {} // CHECK:STDOUT: // CHECK:STDOUT: impl: %D.ref as %J.type.loc26_33.1 { // CHECK:STDOUT: !members: +// CHECK:STDOUT: extend %J.type.loc26_33.1 // CHECK:STDOUT: witness = // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -2470,6 +2488,7 @@ impl forall [T:! type] D as N(T*) {} // CHECK:STDOUT: // CHECK:STDOUT: impl: %D.ref as %N.type.loc32_32.1 { // CHECK:STDOUT: !members: +// CHECK:STDOUT: extend %N.type.loc32_32.1 // CHECK:STDOUT: witness = // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -2483,6 +2502,7 @@ impl forall [T:! type] D as N(T*) {} // CHECK:STDOUT: // CHECK:STDOUT: impl: %D.ref as %N.type.loc38_33.1 { // CHECK:STDOUT: !members: +// CHECK:STDOUT: extend %N.type.loc38_33.1 // CHECK:STDOUT: witness = // CHECK:STDOUT: } // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/impl/import_interface_assoc_const.carbon b/toolchain/check/testdata/impl/import_interface_assoc_const.carbon index ef9c23d26ec1..9fb3ba38ad1d 100644 --- a/toolchain/check/testdata/impl/import_interface_assoc_const.carbon +++ b/toolchain/check/testdata/impl/import_interface_assoc_const.carbon @@ -372,6 +372,7 @@ impl CD as IF where .F = 0 { // CHECK:STDOUT: %impl_witness_assoc_constant: type = impl_witness_assoc_constant constants.%empty_struct_type [concrete = constants.%empty_struct_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: +// CHECK:STDOUT: extend %.loc5_14 // CHECK:STDOUT: witness = %I.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: @@ -484,6 +485,7 @@ impl CD as IF where .F = 0 { // CHECK:STDOUT: %impl_witness_assoc_constant: type = impl_witness_assoc_constant constants.%empty_struct_type [concrete = constants.%empty_struct_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: +// CHECK:STDOUT: extend %.loc5_14 // CHECK:STDOUT: witness = %I.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: @@ -586,6 +588,7 @@ impl CD as IF where .F = 0 { // CHECK:STDOUT: %impl_witness_assoc_constant: type = impl_witness_assoc_constant constants.%empty_struct_type [concrete = constants.%empty_struct_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: +// CHECK:STDOUT: extend %.loc10_14 // CHECK:STDOUT: witness = %I.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: @@ -703,6 +706,7 @@ impl CD as IF where .F = 0 { // CHECK:STDOUT: %impl_witness_assoc_constant: type = impl_witness_assoc_constant constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] // CHECK:STDOUT: // CHECK:STDOUT: !members: +// CHECK:STDOUT: extend %.loc10_14 // CHECK:STDOUT: witness = %I.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: @@ -860,6 +864,7 @@ impl CD as IF where .F = 0 { // CHECK:STDOUT: // CHECK:STDOUT: impl @C5.as..impl.bcbfb8.2: %C5.ref as { // CHECK:STDOUT: !members: +// CHECK:STDOUT: extend // CHECK:STDOUT: witness = // CHECK:STDOUT: } // CHECK:STDOUT: @@ -957,6 +962,7 @@ impl CD as IF where .F = 0 { // CHECK:STDOUT: %I.impl_witness: = impl_witness %I.impl_witness_table [concrete = constants.%I.impl_witness.9dc] // CHECK:STDOUT: // CHECK:STDOUT: !members: +// CHECK:STDOUT: extend %I.ref // CHECK:STDOUT: witness = %I.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: @@ -1057,6 +1063,7 @@ impl CD as IF where .F = 0 { // CHECK:STDOUT: // CHECK:STDOUT: impl @C7.as..impl: %C7.ref as { // CHECK:STDOUT: !members: +// CHECK:STDOUT: extend // CHECK:STDOUT: witness = // CHECK:STDOUT: } // CHECK:STDOUT: @@ -1152,6 +1159,7 @@ impl CD as IF where .F = 0 { // CHECK:STDOUT: // CHECK:STDOUT: impl @C8.as..impl: %C8.ref as { // CHECK:STDOUT: !members: +// CHECK:STDOUT: extend // CHECK:STDOUT: witness = // CHECK:STDOUT: } // CHECK:STDOUT: @@ -1246,6 +1254,7 @@ impl CD as IF where .F = 0 { // CHECK:STDOUT: // CHECK:STDOUT: impl @C9.as..impl: %C9.ref as { // CHECK:STDOUT: !members: +// CHECK:STDOUT: extend // CHECK:STDOUT: witness = // CHECK:STDOUT: } // CHECK:STDOUT: @@ -1339,6 +1348,7 @@ impl CD as IF where .F = 0 { // CHECK:STDOUT: // CHECK:STDOUT: impl @CA.as..impl: %CA.ref as { // CHECK:STDOUT: !members: +// CHECK:STDOUT: extend // CHECK:STDOUT: witness = // CHECK:STDOUT: } // CHECK:STDOUT: @@ -1440,6 +1450,7 @@ impl CD as IF where .F = 0 { // CHECK:STDOUT: %impl_witness_assoc_constant: type = impl_witness_assoc_constant constants.%empty_struct_type [concrete = constants.%empty_struct_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: +// CHECK:STDOUT: extend %.loc6_14 // CHECK:STDOUT: witness = %I.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: @@ -1542,6 +1553,7 @@ impl CD as IF where .F = 0 { // CHECK:STDOUT: %impl_witness_assoc_constant: %struct_type.a.225 = impl_witness_assoc_constant constants.%struct [concrete = constants.%struct] // CHECK:STDOUT: // CHECK:STDOUT: !members: +// CHECK:STDOUT: extend %.loc6_20 // CHECK:STDOUT: witness = %NonType.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: @@ -1685,6 +1697,7 @@ impl CD as IF where .F = 0 { // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %CD.as.IF.impl.F.decl +// CHECK:STDOUT: extend %.loc10_15 // CHECK:STDOUT: witness = %IF.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/impl/import_self.carbon b/toolchain/check/testdata/impl/import_self.carbon index 7ccc30e39e1c..e92792e9da71 100644 --- a/toolchain/check/testdata/impl/import_self.carbon +++ b/toolchain/check/testdata/impl/import_self.carbon @@ -210,6 +210,7 @@ fn F(x: C, y: C) -> C { // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = imports.%Main.import_ref.17c // CHECK:STDOUT: .Op = imports.%Main.import_ref.a96 +// CHECK:STDOUT: .C = // CHECK:STDOUT: witness = (imports.%Main.Op) // CHECK:STDOUT: // CHECK:STDOUT: !requires: @@ -241,6 +242,7 @@ fn F(x: C, y: C) -> C { // CHECK:STDOUT: !members: // CHECK:STDOUT: .Op = %C.as.Add.impl.Op.decl // CHECK:STDOUT: .C = +// CHECK:STDOUT: extend %Add.ref // CHECK:STDOUT: witness = %Add.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/impl/import_self_specific.carbon b/toolchain/check/testdata/impl/import_self_specific.carbon index a337c0d02412..b059bfba6123 100644 --- a/toolchain/check/testdata/impl/import_self_specific.carbon +++ b/toolchain/check/testdata/impl/import_self_specific.carbon @@ -219,6 +219,7 @@ impl forall [N:! E] D(N) as I where .Assoc = () { // CHECK:STDOUT: %Y.impl_witness.loc5_31.1: = impl_witness %Y.impl_witness_table, @T.as.Y.impl(constants.%T) [symbolic = %Y.impl_witness.loc5_31.2 (constants.%Y.impl_witness)] // CHECK:STDOUT: // CHECK:STDOUT: !members: +// CHECK:STDOUT: extend %Y.ref // CHECK:STDOUT: witness = %Y.impl_witness.loc5_31.1 // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -234,6 +235,7 @@ impl forall [N:! E] D(N) as I where .Assoc = () { // CHECK:STDOUT: %Z.impl_witness.loc9_31.1: = impl_witness %Z.impl_witness_table, @U.as.Z.impl(constants.%U) [symbolic = %Z.impl_witness.loc9_31.2 (constants.%Z.impl_witness.856)] // CHECK:STDOUT: // CHECK:STDOUT: !members: +// CHECK:STDOUT: extend %Z.ref // CHECK:STDOUT: witness = %Z.impl_witness.loc9_31.1 // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -471,6 +473,7 @@ impl forall [N:! E] D(N) as I where .Assoc = () { // CHECK:STDOUT: .Self = imports.%Main.import_ref.c82 // CHECK:STDOUT: .Assoc = imports.%Main.import_ref.414 // CHECK:STDOUT: .F = imports.%Main.import_ref.d7f +// CHECK:STDOUT: .C = // CHECK:STDOUT: witness = (imports.%Main.Assoc, imports.%Main.F) // CHECK:STDOUT: // CHECK:STDOUT: !requires: @@ -547,6 +550,7 @@ impl forall [N:! E] D(N) as I where .Assoc = () { // CHECK:STDOUT: !members: // CHECK:STDOUT: .C = // CHECK:STDOUT: .F = %D.as.I.impl.F.decl +// CHECK:STDOUT: extend %.loc20_31 // CHECK:STDOUT: witness = %I.impl_witness.loc20_49.1 // CHECK:STDOUT: } // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/impl/import_thunk.carbon b/toolchain/check/testdata/impl/import_thunk.carbon index 55350f5d794c..88019b59cf34 100644 --- a/toolchain/check/testdata/impl/import_thunk.carbon +++ b/toolchain/check/testdata/impl/import_thunk.carbon @@ -210,6 +210,8 @@ fn G() { // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = imports.%Main.import_ref.c82 // CHECK:STDOUT: .F = imports.%Main.import_ref.7f4 +// CHECK:STDOUT: .C = +// CHECK:STDOUT: .Y = // CHECK:STDOUT: witness = (imports.%Main.F) // CHECK:STDOUT: // CHECK:STDOUT: !requires: @@ -253,6 +255,7 @@ fn G() { // CHECK:STDOUT: .C = // CHECK:STDOUT: .Y = // CHECK:STDOUT: .F = %C.as.I.impl.F.decl.loc8_24.1 +// CHECK:STDOUT: extend %I.ref // CHECK:STDOUT: witness = %I.impl_witness.loc7_32.1 // CHECK:STDOUT: } // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/impl/import_use_generic.carbon b/toolchain/check/testdata/impl/import_use_generic.carbon index 37e785d9ea56..0fdd5ec9707b 100644 --- a/toolchain/check/testdata/impl/import_use_generic.carbon +++ b/toolchain/check/testdata/impl/import_use_generic.carbon @@ -141,6 +141,7 @@ fn H() -> C({}).(I.F)() {} // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %C.as.I.impl.F.decl +// CHECK:STDOUT: extend %I.ref // CHECK:STDOUT: witness = %I.impl_witness.loc10_34.1 // CHECK:STDOUT: } // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/impl/incomplete.carbon b/toolchain/check/testdata/impl/incomplete.carbon index e177f838af2b..d07709958426 100644 --- a/toolchain/check/testdata/impl/incomplete.carbon +++ b/toolchain/check/testdata/impl/incomplete.carbon @@ -243,6 +243,7 @@ interface B { // CHECK:STDOUT: %I.impl_witness: = impl_witness %I.impl_witness_table [concrete = constants.%I.impl_witness] // CHECK:STDOUT: // CHECK:STDOUT: !members: +// CHECK:STDOUT: extend %I.ref.loc6 // CHECK:STDOUT: witness = // CHECK:STDOUT: } // CHECK:STDOUT: @@ -283,6 +284,7 @@ interface B { // CHECK:STDOUT: %J.impl_witness: = impl_witness %J.impl_witness_table [concrete = constants.%J.impl_witness] // CHECK:STDOUT: // CHECK:STDOUT: !members: +// CHECK:STDOUT: extend %J.ref // CHECK:STDOUT: witness = // CHECK:STDOUT: } // CHECK:STDOUT: @@ -324,6 +326,7 @@ interface B { // CHECK:STDOUT: %J.impl_witness: = impl_witness %J.impl_witness_table [concrete = constants.%J.impl_witness] // CHECK:STDOUT: // CHECK:STDOUT: !members: +// CHECK:STDOUT: extend %J.ref // CHECK:STDOUT: witness = // CHECK:STDOUT: } // CHECK:STDOUT: @@ -389,6 +392,7 @@ interface B { // CHECK:STDOUT: // CHECK:STDOUT: impl @C.as..impl: %C.ref.loc13 as { // CHECK:STDOUT: !members: +// CHECK:STDOUT: extend // CHECK:STDOUT: witness = // CHECK:STDOUT: } // CHECK:STDOUT: @@ -499,6 +503,7 @@ interface B { // CHECK:STDOUT: %I.impl_witness: = impl_witness %I.impl_witness_table [concrete = constants.%I.impl_witness] // CHECK:STDOUT: // CHECK:STDOUT: !members: +// CHECK:STDOUT: extend %.loc8_13 // CHECK:STDOUT: witness = %I.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: @@ -618,6 +623,7 @@ interface B { // CHECK:STDOUT: %impl_witness_assoc_constant: type = impl_witness_assoc_constant constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] // CHECK:STDOUT: // CHECK:STDOUT: !members: +// CHECK:STDOUT: extend %.loc8_13 // CHECK:STDOUT: witness = %J.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: @@ -689,6 +695,7 @@ interface B { // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self +// CHECK:STDOUT: .Incomplete = // CHECK:STDOUT: witness = () // CHECK:STDOUT: // CHECK:STDOUT: !requires: @@ -711,6 +718,7 @@ interface B { // CHECK:STDOUT: !members: // CHECK:STDOUT: .Incomplete = // CHECK:STDOUT: .F = %C.as.I.impl.F.decl +// CHECK:STDOUT: extend %.loc8_13 // CHECK:STDOUT: witness = %I.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/impl/interface_args.carbon b/toolchain/check/testdata/impl/interface_args.carbon index f8f5445f5f7c..df59dfe2a62f 100644 --- a/toolchain/check/testdata/impl/interface_args.carbon +++ b/toolchain/check/testdata/impl/interface_args.carbon @@ -351,6 +351,7 @@ fn InstanceC(a: A) -> C { // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Op = %A.as.Action.impl.Op.decl +// CHECK:STDOUT: extend %Action.type // CHECK:STDOUT: witness = %Action.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: @@ -521,6 +522,7 @@ fn InstanceC(a: A) -> C { // CHECK:STDOUT: %Main.import_ref.d04: type = import_ref Main//action, loc12_6, loaded [concrete = constants.%A] // CHECK:STDOUT: %Main.import_ref.5ad: type = import_ref Main//action, loc12_19, loaded [concrete = constants.%Action.type.879] // CHECK:STDOUT: %Main.import_ref.018 = import_ref Main//action, loc13_30, unloaded +// CHECK:STDOUT: %Main.import_ref.d79 = import_ref Main//action, loc12_19, unloaded // CHECK:STDOUT: %Main.import_ref.04b = import_ref Main//action, loc5_22, unloaded // CHECK:STDOUT: %Main.import_ref.e8a: %A.as.Action.impl.Op.type = import_ref Main//action, loc13_30, loaded [concrete = constants.%A.as.Action.impl.Op] // CHECK:STDOUT: %Action.impl_witness_table = impl_witness_table (%Main.import_ref.e8a), @A.as.Action.impl [concrete] @@ -569,6 +571,7 @@ fn InstanceC(a: A) -> C { // CHECK:STDOUT: impl @A.as.Action.impl: imports.%Main.import_ref.d04 as imports.%Main.import_ref.5ad [from "action.carbon"] { // CHECK:STDOUT: !members: // CHECK:STDOUT: .Op = imports.%Main.import_ref.018 +// CHECK:STDOUT: extend imports.%Main.import_ref.d79 // CHECK:STDOUT: witness = imports.%Main.import_ref.170 // CHECK:STDOUT: } // CHECK:STDOUT: @@ -713,6 +716,7 @@ fn InstanceC(a: A) -> C { // CHECK:STDOUT: %Main.import_ref.d04: type = import_ref Main//action, loc12_6, loaded [concrete = constants.%A] // CHECK:STDOUT: %Main.import_ref.5ad: type = import_ref Main//action, loc12_19, loaded [concrete = constants.%Action.type.879] // CHECK:STDOUT: %Main.import_ref.018 = import_ref Main//action, loc13_30, unloaded +// CHECK:STDOUT: %Main.import_ref.d79 = import_ref Main//action, loc12_19, unloaded // CHECK:STDOUT: %Main.import_ref.8f24d3.3: = import_ref Main//action, loc10_10, loaded [concrete = constants.%complete_type] // CHECK:STDOUT: %Main.import_ref.743 = import_ref Main//action, inst{{[0-9A-F]+}} [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.04b = import_ref Main//action, loc5_22, unloaded @@ -761,6 +765,7 @@ fn InstanceC(a: A) -> C { // CHECK:STDOUT: impl @A.as.Action.impl: imports.%Main.import_ref.d04 as imports.%Main.import_ref.5ad [from "action.carbon"] { // CHECK:STDOUT: !members: // CHECK:STDOUT: .Op = imports.%Main.import_ref.018 +// CHECK:STDOUT: extend imports.%Main.import_ref.d79 // CHECK:STDOUT: witness = imports.%Main.import_ref.acc // CHECK:STDOUT: } // CHECK:STDOUT: @@ -980,6 +985,7 @@ fn InstanceC(a: A) -> C { // CHECK:STDOUT: .T = // CHECK:STDOUT: .Make = @Factory.WithSelf.%assoc0.loc6_17.1 // CHECK:STDOUT: .Method = @Factory.WithSelf.%assoc1.loc8_31.1 +// CHECK:STDOUT: .B = // CHECK:STDOUT: witness = (@Factory.WithSelf.%Factory.WithSelf.Make.decl, @Factory.WithSelf.%Factory.WithSelf.Method.decl) // CHECK:STDOUT: // CHECK:STDOUT: !requires: @@ -1017,6 +1023,7 @@ fn InstanceC(a: A) -> C { // CHECK:STDOUT: .B = // CHECK:STDOUT: .Make = %A.as.Factory.impl.Make.decl // CHECK:STDOUT: .Method = %A.as.Factory.impl.Method.decl +// CHECK:STDOUT: extend %Factory.type // CHECK:STDOUT: witness = %Factory.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: @@ -1216,6 +1223,7 @@ fn InstanceC(a: A) -> C { // CHECK:STDOUT: %Main.import_ref.511: type = import_ref Main//factory, loc14_20, loaded [concrete = constants.%Factory.type.5dd] // CHECK:STDOUT: %Main.import_ref.b40 = import_ref Main//factory, loc15_17, unloaded // CHECK:STDOUT: %Main.import_ref.9db = import_ref Main//factory, loc16_31, unloaded +// CHECK:STDOUT: %Main.import_ref.223 = import_ref Main//factory, loc14_20, unloaded // CHECK:STDOUT: %Main.import_ref.c54 = import_ref Main//factory, loc6_17, unloaded // CHECK:STDOUT: %Main.import_ref.7b0: %A.as.Factory.impl.Make.type = import_ref Main//factory, loc15_17, loaded [concrete = constants.%A.as.Factory.impl.Make] // CHECK:STDOUT: %Main.import_ref.df6: %A.as.Factory.impl.Method.type = import_ref Main//factory, loc16_31, loaded [concrete = constants.%A.as.Factory.impl.Method] @@ -1282,6 +1290,7 @@ fn InstanceC(a: A) -> C { // CHECK:STDOUT: !members: // CHECK:STDOUT: .Make = imports.%Main.import_ref.b40 // CHECK:STDOUT: .Method = imports.%Main.import_ref.9db +// CHECK:STDOUT: extend imports.%Main.import_ref.223 // CHECK:STDOUT: witness = imports.%Main.import_ref.8a9 // CHECK:STDOUT: } // CHECK:STDOUT: @@ -1486,6 +1495,7 @@ fn InstanceC(a: A) -> C { // CHECK:STDOUT: %Main.import_ref.511: type = import_ref Main//factory, loc14_20, loaded [concrete = constants.%Factory.type.5dd] // CHECK:STDOUT: %Main.import_ref.b40 = import_ref Main//factory, loc15_17, unloaded // CHECK:STDOUT: %Main.import_ref.9db = import_ref Main//factory, loc16_31, unloaded +// CHECK:STDOUT: %Main.import_ref.223 = import_ref Main//factory, loc14_20, unloaded // CHECK:STDOUT: %Main.import_ref.c54 = import_ref Main//factory, loc6_17, unloaded // CHECK:STDOUT: %Main.import_ref.71e = import_ref Main//factory, loc8_31, unloaded // CHECK:STDOUT: } @@ -1551,6 +1561,7 @@ fn InstanceC(a: A) -> C { // CHECK:STDOUT: !members: // CHECK:STDOUT: .Make = imports.%Main.import_ref.b40 // CHECK:STDOUT: .Method = imports.%Main.import_ref.9db +// CHECK:STDOUT: extend imports.%Main.import_ref.223 // CHECK:STDOUT: witness = imports.%Main.import_ref.1cd // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/impl/lookup/alias.carbon b/toolchain/check/testdata/impl/lookup/alias.carbon index f582f23310e1..77469042a6b8 100644 --- a/toolchain/check/testdata/impl/lookup/alias.carbon +++ b/toolchain/check/testdata/impl/lookup/alias.carbon @@ -99,6 +99,7 @@ fn G(c: C) { // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %C.as.HasF.impl.F.decl +// CHECK:STDOUT: extend %HasF.ref // CHECK:STDOUT: witness = %HasF.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/impl/lookup/canonical_query_self.carbon b/toolchain/check/testdata/impl/lookup/canonical_query_self.carbon index 43629b89f190..006edd37e9ca 100644 --- a/toolchain/check/testdata/impl/lookup/canonical_query_self.carbon +++ b/toolchain/check/testdata/impl/lookup/canonical_query_self.carbon @@ -256,6 +256,7 @@ fn G() { // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .II = %C.as.I.impl.II.decl +// CHECK:STDOUT: extend %I.ref // CHECK:STDOUT: witness = %I.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: @@ -273,6 +274,7 @@ fn G() { // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .JJ = %C.as.J.impl.JJ.decl +// CHECK:STDOUT: extend %J.ref // CHECK:STDOUT: witness = %J.impl_witness // 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 f7e1cc159a85..be87fba0e42d 100644 --- a/toolchain/check/testdata/impl/lookup/fail_todo_undefined_impl.carbon +++ b/toolchain/check/testdata/impl/lookup/fail_todo_undefined_impl.carbon @@ -123,6 +123,7 @@ fn G() { // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %C.as.I.impl.F.decl +// CHECK:STDOUT: extend %I.ref // CHECK:STDOUT: witness = %I.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/impl/lookup/generic.carbon b/toolchain/check/testdata/impl/lookup/generic.carbon index 7433a5b24e89..54340326899a 100644 --- a/toolchain/check/testdata/impl/lookup/generic.carbon +++ b/toolchain/check/testdata/impl/lookup/generic.carbon @@ -255,6 +255,7 @@ fn G(x: A) { // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %T.as.HasF.impl.F.decl +// CHECK:STDOUT: extend %HasF.ref // CHECK:STDOUT: witness = %HasF.impl_witness.loc8_34.1 // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -502,6 +503,7 @@ fn G(x: A) { // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self // CHECK:STDOUT: .F = @HasF.WithSelf.%assoc0 +// CHECK:STDOUT: .T = // CHECK:STDOUT: witness = (@HasF.WithSelf.%HasF.WithSelf.F.decl) // CHECK:STDOUT: // CHECK:STDOUT: !requires: @@ -538,6 +540,7 @@ fn G(x: A) { // CHECK:STDOUT: !members: // CHECK:STDOUT: .T = // CHECK:STDOUT: .F = %ptr.as.HasF.impl.F.decl +// CHECK:STDOUT: extend %HasF.ref // CHECK:STDOUT: witness = %HasF.impl_witness.loc8_35.1 // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -818,6 +821,7 @@ fn G(x: A) { // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %C.as.HasF.impl.F.decl +// CHECK:STDOUT: extend %HasF.ref // CHECK:STDOUT: witness = %HasF.impl_witness.loc10_37.1 // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -1108,6 +1112,7 @@ fn G(x: A) { // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %empty_struct_type.as.HasF.impl.F.decl +// CHECK:STDOUT: extend %HasF.type.loc8_36.2 // CHECK:STDOUT: witness = %HasF.impl_witness.loc8_38.1 // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -1375,6 +1380,7 @@ fn G(x: A) { // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %T.as.HasF.impl.F.decl +// CHECK:STDOUT: extend %HasF.ref // CHECK:STDOUT: witness = // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -1587,6 +1593,7 @@ fn G(x: A) { // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %T.as.HasF.impl.F.decl +// CHECK:STDOUT: extend %HasF.type.loc8_35.2 // CHECK:STDOUT: witness = %HasF.impl_witness.loc8_37.1 // CHECK:STDOUT: } // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/impl/lookup/impl_forall.carbon b/toolchain/check/testdata/impl/lookup/impl_forall.carbon index f641fdbd393c..e6bc1dcff247 100644 --- a/toolchain/check/testdata/impl/lookup/impl_forall.carbon +++ b/toolchain/check/testdata/impl/lookup/impl_forall.carbon @@ -189,6 +189,7 @@ fn TestSpecific(a: A({})*) -> {}* { // CHECK:STDOUT: !members: // CHECK:STDOUT: .V = // CHECK:STDOUT: .F = %A.as.I.impl.F.decl +// CHECK:STDOUT: extend %I.type.loc12_35.2 // CHECK:STDOUT: witness = %I.impl_witness.loc12_37.1 // CHECK:STDOUT: } // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/impl/lookup/import.carbon b/toolchain/check/testdata/impl/lookup/import.carbon index 35d386903f29..205690fdf434 100644 --- a/toolchain/check/testdata/impl/lookup/import.carbon +++ b/toolchain/check/testdata/impl/lookup/import.carbon @@ -309,6 +309,7 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %C.as.HasF.impl.F.decl +// CHECK:STDOUT: extend %HasF.ref // CHECK:STDOUT: witness = %HasF.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: @@ -499,6 +500,7 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .G = %C.as.HasG.impl.G.decl +// CHECK:STDOUT: extend %HasG.ref // CHECK:STDOUT: witness = %HasG.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: @@ -516,6 +518,7 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %D.as.HasF.impl.F.decl +// CHECK:STDOUT: extend %HasF.ref // CHECK:STDOUT: witness = %HasF.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: @@ -533,6 +536,7 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .G = %D.as.HasG.impl.G.decl +// CHECK:STDOUT: extend %HasG.ref // CHECK:STDOUT: witness = %HasG.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: @@ -1343,6 +1347,7 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .H = %empty_tuple.type.as.Z.impl.H.decl +// CHECK:STDOUT: extend %Z.ref // CHECK:STDOUT: witness = %Z.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: @@ -1777,6 +1782,7 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .K = %AnyParam.as.Y.impl.K.decl +// CHECK:STDOUT: extend %Y.ref // CHECK:STDOUT: witness = %Y.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: @@ -2249,6 +2255,7 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .K = %AnyParam.as.Y.impl.K.decl +// CHECK:STDOUT: extend %Y.ref // CHECK:STDOUT: witness = %Y.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: @@ -2839,6 +2846,7 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %C.as.I.impl.F.decl +// CHECK:STDOUT: extend %I.ref // CHECK:STDOUT: witness = %I.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/impl/lookup/instance_method.carbon b/toolchain/check/testdata/impl/lookup/instance_method.carbon index 1fee5965ead4..3e1e18d1dd9f 100644 --- a/toolchain/check/testdata/impl/lookup/instance_method.carbon +++ b/toolchain/check/testdata/impl/lookup/instance_method.carbon @@ -153,6 +153,7 @@ fn F(c: C) -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %C.as.I.impl.F.decl +// CHECK:STDOUT: extend %I.ref // CHECK:STDOUT: witness = %I.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/impl/lookup/lookup_interface_with_enclosing_generic_inside_rewrite_constraint.carbon b/toolchain/check/testdata/impl/lookup/lookup_interface_with_enclosing_generic_inside_rewrite_constraint.carbon index 288c160e308c..d1c40de2c1fa 100644 --- a/toolchain/check/testdata/impl/lookup/lookup_interface_with_enclosing_generic_inside_rewrite_constraint.carbon +++ b/toolchain/check/testdata/impl/lookup/lookup_interface_with_enclosing_generic_inside_rewrite_constraint.carbon @@ -231,6 +231,7 @@ fn F() { // CHECK:STDOUT: %impl_witness_assoc_constant: type = impl_witness_assoc_constant constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] // CHECK:STDOUT: // CHECK:STDOUT: !members: +// CHECK:STDOUT: extend %.loc58_23 // CHECK:STDOUT: witness = %Y.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: @@ -604,6 +605,7 @@ fn F() { // CHECK:STDOUT: %impl_witness_assoc_constant: type = impl_witness_assoc_constant constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] // CHECK:STDOUT: // CHECK:STDOUT: !members: +// CHECK:STDOUT: extend %.loc14_15 // CHECK:STDOUT: witness = %Y.impl_witness.loc14_29.1 // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -613,6 +615,7 @@ fn F() { // CHECK:STDOUT: %Z1.impl_witness: = impl_witness %Z1.impl_witness_table [concrete = constants.%Z1.impl_witness] // CHECK:STDOUT: // CHECK:STDOUT: !members: +// CHECK:STDOUT: extend %Z1.ref // CHECK:STDOUT: witness = %Z1.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: @@ -621,6 +624,7 @@ fn F() { // CHECK:STDOUT: %Z2.impl_witness: = impl_witness %Z2.impl_witness_table [concrete = constants.%Z2.impl_witness] // CHECK:STDOUT: // CHECK:STDOUT: !members: +// CHECK:STDOUT: extend %Z2.ref // CHECK:STDOUT: witness = %Z2.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/impl/lookup/specialization_with_symbolic_rewrite.carbon b/toolchain/check/testdata/impl/lookup/specialization_with_symbolic_rewrite.carbon index 48a570465e01..4ba400b1e16d 100644 --- a/toolchain/check/testdata/impl/lookup/specialization_with_symbolic_rewrite.carbon +++ b/toolchain/check/testdata/impl/lookup/specialization_with_symbolic_rewrite.carbon @@ -303,6 +303,7 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: %impl_witness_assoc_constant: type = impl_witness_assoc_constant constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] // CHECK:STDOUT: // CHECK:STDOUT: !members: +// CHECK:STDOUT: extend %.loc9_44 // CHECK:STDOUT: witness = %Z.impl_witness.loc9_58.1 // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -321,6 +322,7 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: %impl_witness_assoc_constant: type = impl_witness_assoc_constant constants.%T.67d [symbolic = %T.loc11_21.2 (constants.%T.67d)] // CHECK:STDOUT: // CHECK:STDOUT: !members: +// CHECK:STDOUT: extend %.loc11_40 // CHECK:STDOUT: witness = %Z.impl_witness.loc11_53.1 // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -710,6 +712,7 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: %impl_witness_assoc_constant: type = impl_witness_assoc_constant constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] // CHECK:STDOUT: // CHECK:STDOUT: !members: +// CHECK:STDOUT: extend %.loc10_44 // CHECK:STDOUT: witness = %Z.impl_witness.loc10_58.1 // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -728,6 +731,7 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: %impl_witness_assoc_constant: type = impl_witness_assoc_constant constants.%T.67d [symbolic = %T.loc12_15.2 (constants.%T.67d)] // CHECK:STDOUT: // CHECK:STDOUT: !members: +// CHECK:STDOUT: extend %.loc12_34 // CHECK:STDOUT: witness = %Z.impl_witness.loc12_47.1 // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -1022,6 +1026,7 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: %impl_witness_assoc_constant: type = impl_witness_assoc_constant constants.%ptr.e8f8f9.1 [symbolic = %ptr.loc7_54.2 (constants.%ptr.e8f8f9.1)] // CHECK:STDOUT: // CHECK:STDOUT: !members: +// CHECK:STDOUT: extend %.loc7_39 // CHECK:STDOUT: witness = %Ptr.impl_witness.loc7_56.1 // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -1251,6 +1256,7 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: %impl_witness_assoc_constant: type = impl_witness_assoc_constant constants.%ptr.e8f8f9.1 [symbolic = %ptr.loc7_54.2 (constants.%ptr.e8f8f9.1)] // CHECK:STDOUT: // CHECK:STDOUT: !members: +// CHECK:STDOUT: extend %.loc7_39 // CHECK:STDOUT: witness = %Ptr.impl_witness.loc7_56.1 // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -1477,6 +1483,7 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: %impl_witness_assoc_constant: type = impl_witness_assoc_constant constants.%ptr.e8f8f9.1 [symbolic = %ptr.loc7_54.2 (constants.%ptr.e8f8f9.1)] // CHECK:STDOUT: // CHECK:STDOUT: !members: +// CHECK:STDOUT: extend %.loc7_39 // CHECK:STDOUT: witness = %Ptr.impl_witness.loc7_56.1 // CHECK:STDOUT: } // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/impl/lookup/specific_args.carbon b/toolchain/check/testdata/impl/lookup/specific_args.carbon index f6b6c1279065..8216b3f015e7 100644 --- a/toolchain/check/testdata/impl/lookup/specific_args.carbon +++ b/toolchain/check/testdata/impl/lookup/specific_args.carbon @@ -287,6 +287,7 @@ fn H(c: C(InClassArgs)) { c.(I(X).F)(); } // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %X.as.I.impl.F.decl +// CHECK:STDOUT: extend %I.type // CHECK:STDOUT: witness = %I.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: @@ -660,6 +661,7 @@ fn H(c: C(InClassArgs)) { c.(I(X).F)(); } // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %C.as.I.impl.F.decl +// CHECK:STDOUT: extend %I.type // CHECK:STDOUT: witness = %I.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/impl/lookup/transitive.carbon b/toolchain/check/testdata/impl/lookup/transitive.carbon index 25d677bfcaf3..8ca9b0c2aa4f 100644 --- a/toolchain/check/testdata/impl/lookup/transitive.carbon +++ b/toolchain/check/testdata/impl/lookup/transitive.carbon @@ -190,6 +190,7 @@ fn Call() { // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %C.as.I.impl.F.decl +// CHECK:STDOUT: extend %I.ref // CHECK:STDOUT: witness = %I.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/impl/multiple_extend.carbon b/toolchain/check/testdata/impl/multiple_extend.carbon index 8eb3a2df51c1..a8a8bed18b9f 100644 --- a/toolchain/check/testdata/impl/multiple_extend.carbon +++ b/toolchain/check/testdata/impl/multiple_extend.carbon @@ -270,6 +270,7 @@ fn P(o: O) { // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %C.as.HasF.impl.F.decl +// CHECK:STDOUT: extend %HasF.ref // CHECK:STDOUT: witness = %HasF.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: @@ -280,6 +281,7 @@ fn P(o: O) { // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .G = %C.as.HasG.impl.G.decl +// CHECK:STDOUT: extend %HasG.ref // CHECK:STDOUT: witness = %HasG.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: @@ -495,6 +497,7 @@ fn P(o: O) { // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .A = %D.as.HasA1.impl.A.decl +// CHECK:STDOUT: extend %HasA1.ref // CHECK:STDOUT: witness = %HasA1.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: @@ -505,6 +508,7 @@ fn P(o: O) { // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .A = %D.as.HasA2.impl.A.decl +// CHECK:STDOUT: extend %HasA2.ref // CHECK:STDOUT: witness = %HasA2.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: @@ -685,6 +689,7 @@ fn P(o: O) { // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .I = %E.as.HasI.impl.I.decl +// CHECK:STDOUT: extend %HasI.ref // CHECK:STDOUT: witness = %HasI.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: @@ -855,6 +860,7 @@ fn P(o: O) { // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .K = %L.as.HasK.impl.K.decl +// CHECK:STDOUT: extend %HasK.ref // CHECK:STDOUT: witness = %HasK.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: @@ -1043,6 +1049,7 @@ fn P(o: O) { // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .N = %O.as.HasN1.impl.N.decl +// CHECK:STDOUT: extend %HasN1.ref // CHECK:STDOUT: witness = %HasN1.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: @@ -1053,6 +1060,7 @@ fn P(o: O) { // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .N = %O.as.HasN2.impl.N.decl +// CHECK:STDOUT: extend %HasN2.ref // CHECK:STDOUT: witness = %HasN2.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/impl/name_lookup_in_impl_definition.carbon b/toolchain/check/testdata/impl/name_lookup_in_impl_definition.carbon index 6a636fb3546f..90963ff26c5a 100644 --- a/toolchain/check/testdata/impl/name_lookup_in_impl_definition.carbon +++ b/toolchain/check/testdata/impl/name_lookup_in_impl_definition.carbon @@ -10,7 +10,7 @@ // TIP: To dump output, run: // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/impl/name_lookup_in_impl_definition.carbon -// --- fail_todo_name_lookup_into_impl_as_target.carbon +// --- name_lookup_into_impl_as_target.carbon library "[[@TEST_NAME]]"; interface I { @@ -21,11 +21,94 @@ interface I { class C { adapt {}; } impl forall [T:! type] T as I where .U = C { - // TODO: We should do name lookup into `I` inside the body of an `impl as I`, - // where we would find `U`. - // CHECK:STDERR: fail_todo_name_lookup_into_impl_as_target.carbon:[[@LINE+4]]:13: error: name `U` not found [NameNotFound] - // CHECK:STDERR: fn F() -> U { return {} as C; } - // CHECK:STDERR: ^ - // CHECK:STDERR: + // We perform name lookup into `I` and resolve `U` to `T.(I.U)`. + //@dump-sem-ir-begin fn F() -> U { return {} as C; } + //@dump-sem-ir-end } + +// CHECK:STDOUT: --- name_lookup_into_impl_as_target.carbon +// CHECK:STDOUT: +// CHECK:STDOUT: constants { +// CHECK:STDOUT: %I.type: type = facet_type <@I> [concrete] +// CHECK:STDOUT: %C: type = class_type @C [concrete] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] +// CHECK:STDOUT: %empty_struct: %empty_struct_type = struct_value () [concrete] +// CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %I.impl_witness: = impl_witness @T.as.I.impl.%I.impl_witness_table, @T.as.I.impl(%T) [symbolic] +// CHECK:STDOUT: %I.facet: %I.type = facet_value %T, (%I.impl_witness) [symbolic] +// CHECK:STDOUT: %.a69: Core.Form = init_form %C [concrete] +// CHECK:STDOUT: %pattern_type.7c7: type = pattern_type %C [concrete] +// CHECK:STDOUT: %T.as.I.impl.F.type: type = fn_type @T.as.I.impl.F, @T.as.I.impl(%T) [symbolic] +// CHECK:STDOUT: %T.as.I.impl.F: %T.as.I.impl.F.type = struct_value () [symbolic] +// CHECK:STDOUT: %C.val: %C = struct_value () [concrete] +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: generic impl @T.as.I.impl(%T.loc10_15.2: type) { +// CHECK:STDOUT: +// CHECK:STDOUT: +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %T.as.I.impl.F.type: type = fn_type @T.as.I.impl.F, @T.as.I.impl(%T.loc10_15.1) [symbolic = %T.as.I.impl.F.type (constants.%T.as.I.impl.F.type)] +// CHECK:STDOUT: %T.as.I.impl.F: @T.as.I.impl.%T.as.I.impl.F.type (%T.as.I.impl.F.type) = struct_value () [symbolic = %T.as.I.impl.F (constants.%T.as.I.impl.F)] +// CHECK:STDOUT: +// CHECK:STDOUT: impl: %T.ref as %.loc10_31 { +// CHECK:STDOUT: %T.as.I.impl.F.decl: @T.as.I.impl.%T.as.I.impl.F.type (%T.as.I.impl.F.type) = fn_decl @T.as.I.impl.F [symbolic = @T.as.I.impl.%T.as.I.impl.F (constants.%T.as.I.impl.F)] { +// CHECK:STDOUT: %return.param_patt: %pattern_type.7c7 = out_param_pattern [concrete] +// CHECK:STDOUT: %return.patt: %pattern_type.7c7 = return_slot_pattern %return.param_patt, %U.ref [concrete] +// CHECK:STDOUT: } { +// CHECK:STDOUT: %I.facet.loc13_13.2: %I.type = facet_value @T.as.I.impl.%T.ref, (constants.%I.impl_witness) [symbolic = %I.facet.loc13_13.1 (constants.%I.facet)] +// CHECK:STDOUT: %.loc13_13.1: %I.type = converted @T.as.I.impl.%T.ref, %I.facet.loc13_13.2 [symbolic = %I.facet.loc13_13.1 (constants.%I.facet)] +// CHECK:STDOUT: %impl.elem0: type = impl_witness_access constants.%I.impl_witness, element0 [concrete = constants.%C] +// CHECK:STDOUT: %U.ref: type = name_ref U, %impl.elem0 [concrete = constants.%C] +// CHECK:STDOUT: %.loc13_13.2: Core.Form = init_form %U.ref [concrete = constants.%.a69] +// CHECK:STDOUT: %return.param: ref %C = out_param call_param0 +// CHECK:STDOUT: %return: ref %C = return_slot %return.param +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: +// CHECK:STDOUT: !members: +// CHECK:STDOUT: .U = +// CHECK:STDOUT: .F = %T.as.I.impl.F.decl +// CHECK:STDOUT: .C = +// CHECK:STDOUT: extend %.loc10_31 +// CHECK:STDOUT: witness = %I.impl_witness.loc10_44.1 +// CHECK:STDOUT: } +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: generic fn @T.as.I.impl.F(@T.as.I.impl.%T.loc10_15.2: type) { +// CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic = %T (constants.%T)] +// CHECK:STDOUT: %I.impl_witness: = impl_witness @T.as.I.impl.%I.impl_witness_table, @T.as.I.impl(%T) [symbolic = %I.impl_witness (constants.%I.impl_witness)] +// CHECK:STDOUT: %I.facet.loc13_13.1: %I.type = facet_value %T, (%I.impl_witness) [symbolic = %I.facet.loc13_13.1 (constants.%I.facet)] +// CHECK:STDOUT: +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: +// CHECK:STDOUT: fn() -> out %return.param: %C { +// CHECK:STDOUT: !entry: +// CHECK:STDOUT: %.loc13_25: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct] +// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [concrete = constants.%C] +// CHECK:STDOUT: %empty_struct: %empty_struct_type = struct_value () [concrete = constants.%empty_struct] +// CHECK:STDOUT: %.loc13_27.1: %C = as_compatible %empty_struct [concrete = constants.%C.val] +// CHECK:STDOUT: %.loc13_27.2: %C = converted %.loc13_25, %.loc13_27.1 [concrete = constants.%C.val] +// CHECK:STDOUT: %.loc13_31.1: %empty_struct_type = as_compatible %.loc13_27.2 [concrete = constants.%empty_struct] +// CHECK:STDOUT: %.loc13_31.2: init %empty_struct_type = struct_init () [concrete = constants.%empty_struct] +// CHECK:STDOUT: %.loc13_31.3: init %C = as_compatible %.loc13_31.2 [concrete = constants.%C.val] +// CHECK:STDOUT: %.loc13_31.4: init %C = converted %.loc13_27.2, %.loc13_31.3 [concrete = constants.%C.val] +// CHECK:STDOUT: return %.loc13_31.4 +// CHECK:STDOUT: } +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @T.as.I.impl(constants.%T) { +// CHECK:STDOUT: %T.loc10_15.1 => constants.%T +// CHECK:STDOUT: %I.impl_witness.loc10_44.2 => constants.%I.impl_witness +// CHECK:STDOUT: +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %T.as.I.impl.F.type => constants.%T.as.I.impl.F.type +// CHECK:STDOUT: %T.as.I.impl.F => constants.%T.as.I.impl.F +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @T.as.I.impl.F(constants.%T) { +// CHECK:STDOUT: %T => constants.%T +// CHECK:STDOUT: %I.impl_witness => constants.%I.impl_witness +// CHECK:STDOUT: %I.facet.loc13_13.1 => constants.%I.facet +// CHECK:STDOUT: } +// CHECK:STDOUT: diff --git a/toolchain/check/testdata/impl/name_poisoning.carbon b/toolchain/check/testdata/impl/name_poisoning.carbon index 0a3c40c3f9e4..7a09995af824 100644 --- a/toolchain/check/testdata/impl/name_poisoning.carbon +++ b/toolchain/check/testdata/impl/name_poisoning.carbon @@ -2,7 +2,7 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // -// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/none.carbon +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/convert.carbon // // AUTOUPDATE // TIP: To test this file alone, run: @@ -36,22 +36,18 @@ interface I { class B { impl as I { - // CHECK:STDERR: fail_impl_function_poisoned.carbon:[[@LINE+3]]:13: error: name `B` used before it was declared [NameUseBeforeDecl] + // CHECK:STDERR: fail_impl_function_poisoned.carbon:[[@LINE+11]]:13: error: accessing member from impl before it has a defined value [ImplAccessMemberBeforeSet] // CHECK:STDERR: fn A(x: B); // CHECK:STDERR: ^ + // CHECK:STDERR: + // CHECK:STDERR: fail_impl_function_poisoned.carbon:[[@LINE+7]]:13: error: cannot implicitly convert non-type value of type `` to `type` [ConversionFailureNonTypeToFacet] + // CHECK:STDERR: fn A(x: B); + // CHECK:STDERR: ^ + // CHECK:STDERR: fail_impl_function_poisoned.carbon:[[@LINE+4]]:13: note: type `` does not implement interface `Core.ImplicitAs(type)` [MissingImplInMemberAccessInContext] + // CHECK:STDERR: fn A(x: B); + // CHECK:STDERR: ^ + // CHECK:STDERR: fn A(x: B); - // TODO: Avoid ImplMissingFunction for functions that were declared after they were poisoned. - // CHECK:STDERR: fail_impl_function_poisoned.carbon:[[@LINE+11]]:8: note: declared here [NameUseBeforeDeclNote] - // CHECK:STDERR: fn B(); - // CHECK:STDERR: ^ - // CHECK:STDERR: - // CHECK:STDERR: fail_impl_function_poisoned.carbon:[[@LINE-10]]:3: error: missing implementation of B in impl of interface I [ImplMissingFunction] - // CHECK:STDERR: impl as I { - // CHECK:STDERR: ^~~~~~~~~~~ - // CHECK:STDERR: fail_impl_function_poisoned.carbon:[[@LINE-17]]:3: note: associated function B declared here [AssociatedFunctionHere] - // CHECK:STDERR: fn B(); - // CHECK:STDERR: ^~~~~~~ - // CHECK:STDERR: fn B(); } } diff --git a/toolchain/check/testdata/impl/no_definition_in_impl_file.carbon b/toolchain/check/testdata/impl/no_definition_in_impl_file.carbon index 277be239cc08..f4fb7da9c404 100644 --- a/toolchain/check/testdata/impl/no_definition_in_impl_file.carbon +++ b/toolchain/check/testdata/impl/no_definition_in_impl_file.carbon @@ -188,6 +188,7 @@ impl () as D; // CHECK:STDOUT: // CHECK:STDOUT: impl @empty_tuple.type.as.A.impl.276de1.2: %.loc14_7.2 as %A.ref { // CHECK:STDOUT: !members: +// CHECK:STDOUT: extend %A.ref // CHECK:STDOUT: witness = // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/impl/self_in_class.carbon b/toolchain/check/testdata/impl/self_in_class.carbon index 3b97be49ae40..a67738501ce3 100644 --- a/toolchain/check/testdata/impl/self_in_class.carbon +++ b/toolchain/check/testdata/impl/self_in_class.carbon @@ -106,6 +106,7 @@ class A { // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Make = %C.as.DefaultConstructible.impl.Make.decl +// CHECK:STDOUT: extend %DefaultConstructible.ref // CHECK:STDOUT: witness = %DefaultConstructible.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/impl/self_in_signature.carbon b/toolchain/check/testdata/impl/self_in_signature.carbon index 802e4c6bf394..c5de8dc79b05 100644 --- a/toolchain/check/testdata/impl/self_in_signature.carbon +++ b/toolchain/check/testdata/impl/self_in_signature.carbon @@ -182,6 +182,7 @@ impl D as SelfNested { // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self // CHECK:STDOUT: .F = @UseSelf.WithSelf.%assoc0 +// CHECK:STDOUT: .C = // CHECK:STDOUT: witness = (@UseSelf.WithSelf.%UseSelf.WithSelf.F.decl) // CHECK:STDOUT: // CHECK:STDOUT: !requires: @@ -218,6 +219,7 @@ impl D as SelfNested { // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self // CHECK:STDOUT: .F = @SelfNested.WithSelf.%assoc0 +// CHECK:STDOUT: .C = // CHECK:STDOUT: witness = (@SelfNested.WithSelf.%SelfNested.WithSelf.F.decl) // CHECK:STDOUT: // CHECK:STDOUT: !requires: @@ -249,6 +251,7 @@ impl D as SelfNested { // CHECK:STDOUT: !members: // CHECK:STDOUT: .C = // CHECK:STDOUT: .F = %C.as.UseSelf.impl.F.decl +// CHECK:STDOUT: extend %UseSelf.ref // CHECK:STDOUT: witness = %UseSelf.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: @@ -277,6 +280,7 @@ impl D as SelfNested { // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %D.as.UseSelf.impl.F.decl +// CHECK:STDOUT: extend %UseSelf.ref // CHECK:STDOUT: witness = %UseSelf.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: @@ -304,6 +308,7 @@ impl D as SelfNested { // CHECK:STDOUT: !members: // CHECK:STDOUT: .C = // CHECK:STDOUT: .F = %C.as.SelfNested.impl.F.decl +// CHECK:STDOUT: extend %SelfNested.ref // CHECK:STDOUT: witness = %SelfNested.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: @@ -330,6 +335,7 @@ impl D as SelfNested { // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %D.as.SelfNested.impl.F.decl +// CHECK:STDOUT: extend %SelfNested.ref // CHECK:STDOUT: witness = %SelfNested.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/impl/todo_impl_with_unrelated_fn.carbon b/toolchain/check/testdata/impl/todo_impl_with_unrelated_fn.carbon index eaa22c99c3ad..a3579eb18009 100644 --- a/toolchain/check/testdata/impl/todo_impl_with_unrelated_fn.carbon +++ b/toolchain/check/testdata/impl/todo_impl_with_unrelated_fn.carbon @@ -81,6 +81,7 @@ class X { // CHECK:STDOUT: !members: // CHECK:STDOUT: .B = %X.as.A.impl.B.decl // CHECK:STDOUT: .F = %X.as.A.impl.F.decl +// CHECK:STDOUT: extend %A.ref // CHECK:STDOUT: witness = %A.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/impl/use_assoc_entity.carbon b/toolchain/check/testdata/impl/use_assoc_entity.carbon index b7445af5a2d2..d09ab7cbb70e 100644 --- a/toolchain/check/testdata/impl/use_assoc_entity.carbon +++ b/toolchain/check/testdata/impl/use_assoc_entity.carbon @@ -3,8 +3,6 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // // INCLUDE-FILE: toolchain/testing/testdata/min_prelude/primitives.carbon -// TODO: Add ranges and switch to "--dump-sem-ir-ranges=only". -// EXTRA-ARGS: --dump-sem-ir-ranges=if-present // // AUTOUPDATE // TIP: To test this file alone, run: @@ -17,15 +15,21 @@ library "[[@TEST_NAME]]"; interface J { let U:! type; + //@dump-sem-ir-begin fn F[self: Self](u: U) -> U; + //@dump-sem-ir-end } impl () as J where .U = i32 { + //@dump-sem-ir-begin fn F[unused self: Self](u: i32) -> i32 { return -u; } + //@dump-sem-ir-end } fn CallMethod(x: ()) -> i32 { + //@dump-sem-ir-begin return x.(J.F)(40); + //@dump-sem-ir-end } class C { @@ -34,7 +38,9 @@ class C { } impl C as J where .U = C { + //@dump-sem-ir-begin fn F[self: Self](unused u: C) -> C { return self; } + //@dump-sem-ir-end } // --- associated_type_in_function_signature.carbon @@ -76,11 +82,13 @@ class E { } fn CallBoth(e: E) { + //@dump-sem-ir-begin let unused e1: i32 = e.F(2); let unused e2: i32 = e.G(3); let unused e3: i32 = E.F(4); let unused e4: i32 = e.(E.G)(5); let unused e5: i32 = e.(J.G)(6); + //@dump-sem-ir-end } fn GenericCallF[T:! J](t: T, u: T.U) -> T.U { @@ -131,7 +139,24 @@ fn GenericCallFI32[T:! J where .U = i32](t: T) -> i32 { return t.F(2); } -// --- fail_todo_use_associated_constant_in_impl.carbon +// --- use_associated_fn_in_impl.carbon +library "[[@TEST_NAME]]"; + +interface J { + fn F(); + fn G(); +} + +class E {} + +impl E as J { + fn F() {} + //@dump-sem-ir-begin + fn G() { F(); } + //@dump-sem-ir-end +} + +// --- use_associated_constant_in_impl.carbon library "[[@TEST_NAME]]"; interface J { @@ -141,34 +166,19 @@ interface J { class E { extend impl as J where .U = i32 { - // TODO: U should be in scope and usable as soon as we finish the - // declaration / enter the definition. - // - // CHECK:STDERR: fail_todo_use_associated_constant_in_impl.carbon:[[@LINE+14]]:13: error: cannot implicitly convert non-type value of type `` to `type` [ConversionFailureNonTypeToFacet] - // CHECK:STDERR: fn F(u: U) -> U { - // CHECK:STDERR: ^ - // CHECK:STDERR: fail_todo_use_associated_constant_in_impl.carbon:[[@LINE+11]]:13: note: type `` does not implement interface `Core.ImplicitAs(type)` [MissingImplInMemberAccessInContext] - // CHECK:STDERR: fn F(u: U) -> U { - // CHECK:STDERR: ^ - // CHECK:STDERR: - // CHECK:STDERR: fail_todo_use_associated_constant_in_impl.carbon:[[@LINE+7]]:19: error: cannot implicitly convert non-type value of type `` to `type` [ConversionFailureNonTypeToFacet] - // CHECK:STDERR: fn F(u: U) -> U { - // CHECK:STDERR: ^ - // CHECK:STDERR: fail_todo_use_associated_constant_in_impl.carbon:[[@LINE+4]]:19: note: type `` does not implement interface `Core.ImplicitAs(type)` [MissingImplInMemberAccessInContext] - // CHECK:STDERR: fn F(u: U) -> U { - // CHECK:STDERR: ^ - // CHECK:STDERR: + //@dump-sem-ir-begin fn F(u: U) -> U { return u; } + //@dump-sem-ir-end } } -// --- fail_todo_call_extend_fn.carbon +// --- call_extend_fn.carbon library "[[@TEST_NAME]]"; interface J { - fn F() {} + fn F(); } class E { @@ -176,18 +186,18 @@ class E { fn F() {} } - // CHECK:STDERR: fail_todo_call_extend_fn.carbon:[[@LINE+4]]:12: error: value of type `` is not callable [CallToNonCallable] - // CHECK:STDERR: fn G() { F(); } - // CHECK:STDERR: ^~~ - // CHECK:STDERR: - fn G() { F(); } + fn G() { + //@dump-sem-ir-begin + F(); + //@dump-sem-ir-end + } } // --- call_extend_method.carbon library "[[@TEST_NAME]]"; interface J { - fn F[unused self: Self]() {} + fn F[unused self: Self](); } class E { @@ -198,7 +208,7 @@ class E { fn G[self: Self]() { self.F(); } } -// --- fail_todo_use_extend_constant.carbon +// --- use_extend_constant.carbon library "[[@TEST_NAME]]"; interface J { @@ -208,15 +218,144 @@ interface J { class E { extend impl as J where .X = () {} - // TODO: `X` should be in scope and directly usable. - // CHECK:STDERR: fail_todo_use_extend_constant.carbon:[[@LINE+7]]:13: error: cannot implicitly convert non-type value of type `` to `type` [ConversionFailureNonTypeToFacet] - // CHECK:STDERR: fn G() -> X { return (); } - // CHECK:STDERR: ^ - // CHECK:STDERR: fail_todo_use_extend_constant.carbon:[[@LINE+4]]:13: note: type `` does not implement interface `Core.ImplicitAs(type)` [MissingImplInMemberAccessInContext] - // CHECK:STDERR: fn G() -> X { return (); } + //@dump-sem-ir-begin + fn G() -> X { return (); } + //@dump-sem-ir-end +} + +// --- associated_entity_scope.carbon +library "[[@TEST_NAME]]"; + +interface J { + let T:! type; + fn F() -> T; +} + +class A {} + +class E(T:! type) { + extend impl as J where .T = A { + // This `T` names the interface's `T` (extended by the `impl`), not the + // class's `T` parameter. + fn F() -> T { + return {} as A; + } + } +} + +impl forall [T:! type] T as J where .T = () { + // This `T` names the interface's `T` (extended by the `impl`), not the + // class's `T` parameter. + // + // TODO: Should it? Arguably here the `forall T` is part of the impl, so we + // should look there before checking for scopes the `impl` extends. But also + // arguably we're naming the `T` inside the impl itself, which is within the + // `forall`. + fn F() -> T { + return (); + } +} + +// --- fail_todo_associated_constant_use_before_value_known.carbon +library "[[@TEST_NAME]]"; + +interface J { + let T:! type; + let U:! type; +} + +class A {} + +// TODO: Make sure this behaves reasonably once we support `where` declarations. + +// CHECK:STDERR: fail_todo_associated_constant_use_before_value_known.carbon:[[@LINE+14]]:1: error: associated constant T not given a value in impl of interface J [ImplAssociatedConstantNeedsValue] +// CHECK:STDERR: impl A as J { +// CHECK:STDERR: ^~~~~~~~~~~~~ +// CHECK:STDERR: fail_todo_associated_constant_use_before_value_known.carbon:[[@LINE-11]]:7: note: associated constant declared here [AssociatedConstantHere] +// CHECK:STDERR: let T:! type; +// CHECK:STDERR: ^~~~~~~~ +// CHECK:STDERR: +// CHECK:STDERR: fail_todo_associated_constant_use_before_value_known.carbon:[[@LINE+7]]:1: error: associated constant U not given a value in impl of interface J [ImplAssociatedConstantNeedsValue] +// CHECK:STDERR: impl A as J { +// CHECK:STDERR: ^~~~~~~~~~~~~ +// CHECK:STDERR: fail_todo_associated_constant_use_before_value_known.carbon:[[@LINE-17]]:7: note: associated constant declared here [AssociatedConstantHere] +// CHECK:STDERR: let U:! type; +// CHECK:STDERR: ^~~~~~~~ +// CHECK:STDERR: +impl A as J { + // CHECK:STDERR: fail_todo_associated_constant_use_before_value_known.carbon:[[@LINE+8]]:3: error: unrecognized declaration introducer [UnrecognizedDecl] + // CHECK:STDERR: where .U = T; + // CHECK:STDERR: ^~~~~ + // CHECK:STDERR: + // CHECK:STDERR: fail_todo_associated_constant_use_before_value_known.carbon:[[@LINE+4]]:3: error: semantics TODO: `handle invalid parse trees in `check`` [SemanticsTodo] + // CHECK:STDERR: where .U = T; + // CHECK:STDERR: ^~~~~ + // CHECK:STDERR: + where .U = T; + // CHECK:STDERR: fail_todo_associated_constant_use_before_value_known.carbon:[[@LINE+4]]:3: error: unrecognized declaration introducer [UnrecognizedDecl] + // CHECK:STDERR: where .T = (); + // CHECK:STDERR: ^~~~~ + // CHECK:STDERR: + where .T = (); +} + +// --- associated_fn_use_in_def_before_decl.carbon +library "[[@TEST_NAME]]"; + +interface J { + fn F(); + fn G(); +} + +class A {} + +impl A as J { + // OK, we handle both function declarations before either function body. + //@dump-sem-ir-begin + fn F() { G(); } + //@dump-sem-ir-end + fn G() {} +} + +// --- fail_associated_fn_use_in_decl_after_decl.carbon +library "[[@TEST_NAME]]"; + +interface J { + fn F() -> Self; + fn G() -> type; +} + +class A {} + +impl A as J { + // Evaluation of the call to `G()` below fails because we don't parse the + // definition of `G()` until the enclosing `impl` is complete. + // TODO: Diagnose this better. + eval fn G() -> type { return A; } + // CHECK:STDERR: fail_associated_fn_use_in_decl_after_decl.carbon:[[@LINE+4]]:13: error: cannot evaluate type expression [TypeExprEvaluationFailure] + // CHECK:STDERR: fn F() -> G(); + // CHECK:STDERR: ^~~ + // CHECK:STDERR: + fn F() -> G(); +} + +// --- fail_associated_fn_use_in_decl_before_decl.carbon +library "[[@TEST_NAME]]"; + +interface J { + fn F() -> Self; + fn G() -> type; +} + +class A {} + +impl A as J { + // CHECK:STDERR: fail_associated_fn_use_in_decl_before_decl.carbon:[[@LINE+4]]:13: error: accessing member from impl before it has a defined value [ImplAccessMemberBeforeSet] + // CHECK:STDERR: fn F() -> G(); // CHECK:STDERR: ^ // CHECK:STDERR: - fn G() -> X { return (); } + fn F() -> G(); + eval fn G() -> type { return A; } } // --- fail_todo_self_period_associated_type.carbon @@ -293,7 +432,9 @@ interface M { impl () as M where .Z = {.b = {}} { fn G() -> {} { + //@dump-sem-ir-begin return (Self as M).Z.b; + //@dump-sem-ir-end } } @@ -353,7 +494,6 @@ fn F() { // CHECK:STDOUT: %J.type: type = facet_type <@J> [concrete] // CHECK:STDOUT: %Self.8a1: %J.type = symbolic_binding Self, 0 [symbolic] // CHECK:STDOUT: %J.assoc_type: type = assoc_entity_type @J [concrete] -// CHECK:STDOUT: %assoc0.ebd: %J.assoc_type = assoc_entity element0, @J.WithSelf.%U [concrete] // CHECK:STDOUT: %Self.as_type.9ea: type = facet_access_type %Self.8a1 [symbolic] // CHECK:STDOUT: %pattern_type.909: type = pattern_type %Self.as_type.9ea [symbolic] // CHECK:STDOUT: %J.lookup_impl_witness.89e: = lookup_impl_witness %Self.8a1, @J [symbolic] @@ -364,19 +504,12 @@ fn F() { // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] // CHECK:STDOUT: %J.WithSelf.F.569: %J.WithSelf.F.type.adb = struct_value () [symbolic] // CHECK:STDOUT: %assoc1.eeb: %J.assoc_type = assoc_entity element1, @J.WithSelf.%J.WithSelf.F.decl [concrete] -// CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [concrete] // CHECK:STDOUT: %.Self.2fa: %J.type = symbolic_binding .Self [symbolic_self] // CHECK:STDOUT: %J.WithSelf.F.type.e19: type = fn_type @J.WithSelf.F, @J.WithSelf(%.Self.2fa) [symbolic_self] // CHECK:STDOUT: %J.WithSelf.F.659: %J.WithSelf.F.type.e19 = struct_value () [symbolic_self] -// CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.2fa [symbolic_self] -// CHECK:STDOUT: %J.lookup_impl_witness.46a: = lookup_impl_witness %.Self.2fa, @J [symbolic_self] -// CHECK:STDOUT: %impl.elem0.a58: type = impl_witness_access %J.lookup_impl_witness.46a, element0 [symbolic_self] // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete] -// CHECK:STDOUT: %Int.type: type = generic_class_type @Int [concrete] -// CHECK:STDOUT: %Int.generic: %Int.type = struct_value () [concrete] // CHECK:STDOUT: %N: Core.IntLiteral = symbolic_binding N, 0 [symbolic] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete] -// CHECK:STDOUT: %J_where.type.928: type = facet_type <@J where %impl.elem0.a58 = %i32> [concrete] // CHECK:STDOUT: %J.impl_witness.5bf: = impl_witness @empty_tuple.type.as.J.impl.%J.impl_witness_table [concrete] // CHECK:STDOUT: %pattern_type.cb1: type = pattern_type %empty_tuple.type [concrete] // CHECK:STDOUT: %pattern_type.7ce: type = pattern_type %i32 [concrete] @@ -396,12 +529,8 @@ fn F() { // CHECK:STDOUT: %Negate.WithSelf.Op.type.0ff: type = fn_type @Negate.WithSelf.Op, @Negate.WithSelf(%Negate.facet) [concrete] // CHECK:STDOUT: %.b16: type = fn_type_with_self_type %Negate.WithSelf.Op.type.0ff, %Negate.facet [concrete] // CHECK:STDOUT: %Int.as.Negate.impl.Op.specific_fn: = specific_function %Int.as.Negate.impl.Op.619, @Int.as.Negate.impl.Op(%int_32) [concrete] -// CHECK:STDOUT: %CallMethod.type: type = fn_type @CallMethod [concrete] -// CHECK:STDOUT: %CallMethod: %CallMethod.type = struct_value () [concrete] // CHECK:STDOUT: %.b39: type = fn_type_with_self_type %J.WithSelf.F.type.fd2, %J.facet.a51 [concrete] // CHECK:STDOUT: %int_40.f80: Core.IntLiteral = int_value 40 [concrete] -// CHECK:STDOUT: %ImplicitAs.type.cc7: type = generic_interface_type @ImplicitAs [concrete] -// CHECK:STDOUT: %ImplicitAs.generic: %ImplicitAs.type.cc7 = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.type.e8c: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.f67: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%To) [symbolic] @@ -419,8 +548,6 @@ fn F() { // CHECK:STDOUT: %C: type = class_type @C [concrete] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %empty_struct: %empty_struct_type = struct_value () [concrete] -// CHECK:STDOUT: %complete_type.357: = complete_type_witness %empty_struct_type [concrete] -// CHECK:STDOUT: %J_where.type.d0e: type = facet_type <@J where %impl.elem0.a58 = %C> [concrete] // CHECK:STDOUT: %J.impl_witness.00b: = impl_witness @C.as.J.impl.%J.impl_witness_table [concrete] // CHECK:STDOUT: %pattern_type.7c7: type = pattern_type %C [concrete] // CHECK:STDOUT: %.a69: Core.Form = init_form %C [concrete] @@ -433,117 +560,44 @@ fn F() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { -// CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { -// CHECK:STDOUT: .Int = %Core.Int -// CHECK:STDOUT: .Negate = %Core.Negate -// CHECK:STDOUT: .ImplicitAs = %Core.ImplicitAs -// CHECK:STDOUT: import Core//prelude -// CHECK:STDOUT: import Core//prelude/... -// CHECK:STDOUT: } -// CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/parts/int, Int, loaded [concrete = constants.%Int.generic] -// CHECK:STDOUT: %Core.Negate: type = import_ref Core//prelude/parts/int_literal, Negate, loaded [concrete = constants.%Negate.type] // CHECK:STDOUT: %Core.import_ref.475 = import_ref Core//prelude/parts/int, loc{{\d+_\d+}}, unloaded // CHECK:STDOUT: %Core.import_ref.f8a: @Int.as.Negate.impl.%Int.as.Negate.impl.Op.type (%Int.as.Negate.impl.Op.type.c73) = import_ref Core//prelude/parts/int, loc{{\d+_\d+}}, loaded [symbolic = @Int.as.Negate.impl.%Int.as.Negate.impl.Op (constants.%Int.as.Negate.impl.Op.a66)] // CHECK:STDOUT: %Negate.impl_witness_table = impl_witness_table (%Core.import_ref.475, %Core.import_ref.f8a), @Int.as.Negate.impl [concrete] -// CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.cc7 = import_ref Core//prelude/parts/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic] // CHECK:STDOUT: %Core.import_ref.70a: @Core.IntLiteral.as.ImplicitAs.impl.%Core.IntLiteral.as.ImplicitAs.impl.Convert.type (%Core.IntLiteral.as.ImplicitAs.impl.Convert.type.f67) = import_ref Core//prelude/parts/int, loc{{\d+_\d+}}, loaded [symbolic = @Core.IntLiteral.as.ImplicitAs.impl.%Core.IntLiteral.as.ImplicitAs.impl.Convert (constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.8fd)] // CHECK:STDOUT: %ImplicitAs.impl_witness_table.82d = impl_witness_table (%Core.import_ref.70a), @Core.IntLiteral.as.ImplicitAs.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: file { -// CHECK:STDOUT: package: = namespace [concrete] { -// CHECK:STDOUT: .Core = imports.%Core -// CHECK:STDOUT: .J = %J.decl -// CHECK:STDOUT: .CallMethod = %CallMethod.decl -// CHECK:STDOUT: .C = %C.decl -// CHECK:STDOUT: } -// CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %J.decl: type = interface_decl @J [concrete = constants.%J.type] {} {} -// CHECK:STDOUT: impl_decl @empty_tuple.type.as.J.impl [concrete] {} { -// CHECK:STDOUT: %.loc8_7.1: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple] -// CHECK:STDOUT: %.loc8_7.2: type = converted %.loc8_7.1, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] -// CHECK:STDOUT: %J.ref: type = name_ref J, file.%J.decl [concrete = constants.%J.type] -// CHECK:STDOUT: %.Self: %J.type = symbolic_binding .Self [symbolic_self = constants.%.Self.2fa] -// CHECK:STDOUT: %.Self.ref: %J.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self.2fa] -// CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref [symbolic_self = constants.%.Self.as_type] -// CHECK:STDOUT: %.loc8_20: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.as_type] -// CHECK:STDOUT: %U.ref: %J.assoc_type = name_ref U, @U.%assoc0 [concrete = constants.%assoc0.ebd] -// CHECK:STDOUT: %impl.elem0: type = impl_witness_access constants.%J.lookup_impl_witness.46a, element0 [symbolic_self = constants.%impl.elem0.a58] -// CHECK:STDOUT: %i32: type = type_literal constants.%i32 [concrete = constants.%i32] -// CHECK:STDOUT: %.loc8_14: type = where_expr [concrete = constants.%J_where.type.928] { -// CHECK:STDOUT: requirement_base_facet_type %J.ref -// CHECK:STDOUT: requirement_rewrite %impl.elem0, %i32 -// CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: %CallMethod.decl: %CallMethod.type = fn_decl @CallMethod [concrete = constants.%CallMethod] { -// CHECK:STDOUT: %x.param_patt: %pattern_type.cb1 = value_param_pattern [concrete] -// CHECK:STDOUT: %x.patt: %pattern_type.cb1 = at_binding_pattern x, %x.param_patt [concrete] -// CHECK:STDOUT: %return.param_patt: %pattern_type.7ce = out_param_pattern [concrete] -// CHECK:STDOUT: %return.patt: %pattern_type.7ce = return_slot_pattern %return.param_patt, %i32 [concrete] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %i32: type = type_literal constants.%i32 [concrete = constants.%i32] -// CHECK:STDOUT: %.loc12_25: Core.Form = init_form %i32 [concrete = constants.%.ff5] -// CHECK:STDOUT: %x.param: %empty_tuple.type = value_param call_param0 -// CHECK:STDOUT: %.loc12_19.1: type = splice_block %.loc12_19.3 [concrete = constants.%empty_tuple.type] { -// CHECK:STDOUT: %.loc12_19.2: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple] -// CHECK:STDOUT: %.loc12_19.3: type = converted %.loc12_19.2, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] -// CHECK:STDOUT: } -// CHECK:STDOUT: %x: %empty_tuple.type = value_binding x, %x.param -// CHECK:STDOUT: %return.param: ref %i32 = out_param call_param1 -// CHECK:STDOUT: %return: ref %i32 = return_slot %return.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %C.decl: type = class_decl @C [concrete = constants.%C] {} {} -// CHECK:STDOUT: impl_decl @C.as.J.impl [concrete] {} { -// CHECK:STDOUT: %C.ref.loc21_6: type = name_ref C, file.%C.decl [concrete = constants.%C] -// CHECK:STDOUT: %J.ref: type = name_ref J, file.%J.decl [concrete = constants.%J.type] -// CHECK:STDOUT: %.Self: %J.type = symbolic_binding .Self [symbolic_self = constants.%.Self.2fa] -// CHECK:STDOUT: %.Self.ref: %J.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self.2fa] -// CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref [symbolic_self = constants.%.Self.as_type] -// CHECK:STDOUT: %.loc21_19: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.as_type] -// CHECK:STDOUT: %U.ref: %J.assoc_type = name_ref U, @U.%assoc0 [concrete = constants.%assoc0.ebd] -// CHECK:STDOUT: %impl.elem0: type = impl_witness_access constants.%J.lookup_impl_witness.46a, element0 [symbolic_self = constants.%impl.elem0.a58] -// CHECK:STDOUT: %C.ref.loc21_24: type = name_ref C, file.%C.decl [concrete = constants.%C] -// CHECK:STDOUT: %.loc21_13: type = where_expr [concrete = constants.%J_where.type.d0e] { -// CHECK:STDOUT: requirement_base_facet_type %J.ref -// CHECK:STDOUT: requirement_rewrite %impl.elem0, %C.ref.loc21_24 -// CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: interface @J { -// CHECK:STDOUT: %Self: %J.type = symbolic_binding Self, 0 [symbolic = constants.%Self.8a1] -// CHECK:STDOUT: %J.WithSelf.decl = interface_with_self_decl @J [concrete] +// CHECK:STDOUT: // CHECK:STDOUT: // CHECK:STDOUT: !with Self: -// CHECK:STDOUT: %U: type = assoc_const_decl @U [concrete] { -// CHECK:STDOUT: %assoc0: %J.assoc_type = assoc_entity element0, @J.WithSelf.%U [concrete = constants.%assoc0.ebd] -// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: %J.WithSelf.F.decl: @J.WithSelf.%J.WithSelf.F.type (%J.WithSelf.F.type.adb) = fn_decl @J.WithSelf.F [symbolic = @J.WithSelf.%J.WithSelf.F (constants.%J.WithSelf.F.569)] { -// CHECK:STDOUT: %self.param_patt: @J.WithSelf.F.%pattern_type.loc5_12 (%pattern_type.909) = value_param_pattern [concrete] -// CHECK:STDOUT: %self.patt: @J.WithSelf.F.%pattern_type.loc5_12 (%pattern_type.909) = at_binding_pattern self, %self.param_patt [concrete] -// CHECK:STDOUT: %u.param_patt: @J.WithSelf.F.%pattern_type.loc5_21 (%pattern_type.c1a) = value_param_pattern [concrete] -// CHECK:STDOUT: %u.patt: @J.WithSelf.F.%pattern_type.loc5_21 (%pattern_type.c1a) = at_binding_pattern u, %u.param_patt [concrete] -// CHECK:STDOUT: %return.param_patt: @J.WithSelf.F.%pattern_type.loc5_21 (%pattern_type.c1a) = out_param_pattern [concrete] -// CHECK:STDOUT: %return.patt: @J.WithSelf.F.%pattern_type.loc5_21 (%pattern_type.c1a) = return_slot_pattern %return.param_patt, %U.ref.loc5_29 [concrete] +// CHECK:STDOUT: %self.param_patt: @J.WithSelf.F.%pattern_type.loc6_12 (%pattern_type.909) = value_param_pattern [concrete] +// CHECK:STDOUT: %self.patt: @J.WithSelf.F.%pattern_type.loc6_12 (%pattern_type.909) = at_binding_pattern self, %self.param_patt [concrete] +// CHECK:STDOUT: %u.param_patt: @J.WithSelf.F.%pattern_type.loc6_21 (%pattern_type.c1a) = value_param_pattern [concrete] +// CHECK:STDOUT: %u.patt: @J.WithSelf.F.%pattern_type.loc6_21 (%pattern_type.c1a) = at_binding_pattern u, %u.param_patt [concrete] +// CHECK:STDOUT: %return.param_patt: @J.WithSelf.F.%pattern_type.loc6_21 (%pattern_type.c1a) = out_param_pattern [concrete] +// CHECK:STDOUT: %return.patt: @J.WithSelf.F.%pattern_type.loc6_21 (%pattern_type.c1a) = return_slot_pattern %return.param_patt, %U.ref.loc6_29 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %impl.elem0.loc5_29: type = impl_witness_access constants.%J.lookup_impl_witness.89e, element0 [symbolic = %impl.elem0.loc5_23.1 (constants.%impl.elem0.335)] -// CHECK:STDOUT: %U.ref.loc5_29: type = name_ref U, %impl.elem0.loc5_29 [symbolic = %impl.elem0.loc5_23.1 (constants.%impl.elem0.335)] -// CHECK:STDOUT: %.loc5_29.2: Core.Form = init_form %U.ref.loc5_29 [symbolic = %.loc5_29.1 (constants.%.77f)] -// CHECK:STDOUT: %self.param: @J.WithSelf.F.%Self.as_type.loc5_14.1 (%Self.as_type.9ea) = value_param call_param0 -// CHECK:STDOUT: %.loc5_14.1: type = splice_block %.loc5_14.2 [symbolic = %Self.as_type.loc5_14.1 (constants.%Self.as_type.9ea)] { +// CHECK:STDOUT: %impl.elem0.loc6_29: type = impl_witness_access constants.%J.lookup_impl_witness.89e, element0 [symbolic = %impl.elem0.loc6_23.1 (constants.%impl.elem0.335)] +// CHECK:STDOUT: %U.ref.loc6_29: type = name_ref U, %impl.elem0.loc6_29 [symbolic = %impl.elem0.loc6_23.1 (constants.%impl.elem0.335)] +// CHECK:STDOUT: %.loc6_29.2: Core.Form = init_form %U.ref.loc6_29 [symbolic = %.loc6_29.1 (constants.%.77f)] +// CHECK:STDOUT: %self.param: @J.WithSelf.F.%Self.as_type.loc6_14.1 (%Self.as_type.9ea) = value_param call_param0 +// CHECK:STDOUT: %.loc6_14.1: type = splice_block %.loc6_14.2 [symbolic = %Self.as_type.loc6_14.1 (constants.%Self.as_type.9ea)] { // CHECK:STDOUT: %Self.ref: %J.type = name_ref Self, @J.%Self [symbolic = %Self (constants.%Self.8a1)] -// CHECK:STDOUT: %Self.as_type.loc5_14.2: type = facet_access_type %Self.ref [symbolic = %Self.as_type.loc5_14.1 (constants.%Self.as_type.9ea)] -// CHECK:STDOUT: %.loc5_14.2: type = converted %Self.ref, %Self.as_type.loc5_14.2 [symbolic = %Self.as_type.loc5_14.1 (constants.%Self.as_type.9ea)] +// CHECK:STDOUT: %Self.as_type.loc6_14.2: type = facet_access_type %Self.ref [symbolic = %Self.as_type.loc6_14.1 (constants.%Self.as_type.9ea)] +// CHECK:STDOUT: %.loc6_14.2: type = converted %Self.ref, %Self.as_type.loc6_14.2 [symbolic = %Self.as_type.loc6_14.1 (constants.%Self.as_type.9ea)] // CHECK:STDOUT: } -// CHECK:STDOUT: %self: @J.WithSelf.F.%Self.as_type.loc5_14.1 (%Self.as_type.9ea) = value_binding self, %self.param -// CHECK:STDOUT: %u.param: @J.WithSelf.F.%impl.elem0.loc5_23.1 (%impl.elem0.335) = value_param call_param1 -// CHECK:STDOUT: %.loc5_23: type = splice_block %U.ref.loc5_23 [symbolic = %impl.elem0.loc5_23.1 (constants.%impl.elem0.335)] { -// CHECK:STDOUT: %impl.elem0.loc5_23.2: type = impl_witness_access constants.%J.lookup_impl_witness.89e, element0 [symbolic = %impl.elem0.loc5_23.1 (constants.%impl.elem0.335)] -// CHECK:STDOUT: %U.ref.loc5_23: type = name_ref U, %impl.elem0.loc5_23.2 [symbolic = %impl.elem0.loc5_23.1 (constants.%impl.elem0.335)] +// CHECK:STDOUT: %self: @J.WithSelf.F.%Self.as_type.loc6_14.1 (%Self.as_type.9ea) = value_binding self, %self.param +// CHECK:STDOUT: %u.param: @J.WithSelf.F.%impl.elem0.loc6_23.1 (%impl.elem0.335) = value_param call_param1 +// CHECK:STDOUT: %.loc6_23: type = splice_block %U.ref.loc6_23 [symbolic = %impl.elem0.loc6_23.1 (constants.%impl.elem0.335)] { +// CHECK:STDOUT: %impl.elem0.loc6_23.2: type = impl_witness_access constants.%J.lookup_impl_witness.89e, element0 [symbolic = %impl.elem0.loc6_23.1 (constants.%impl.elem0.335)] +// CHECK:STDOUT: %U.ref.loc6_23: type = name_ref U, %impl.elem0.loc6_23.2 [symbolic = %impl.elem0.loc6_23.1 (constants.%impl.elem0.335)] // CHECK:STDOUT: } -// CHECK:STDOUT: %u: @J.WithSelf.F.%impl.elem0.loc5_23.1 (%impl.elem0.335) = value_binding u, %u.param -// CHECK:STDOUT: %return.param: ref @J.WithSelf.F.%impl.elem0.loc5_23.1 (%impl.elem0.335) = out_param call_param2 -// CHECK:STDOUT: %return: ref @J.WithSelf.F.%impl.elem0.loc5_23.1 (%impl.elem0.335) = return_slot %return.param +// CHECK:STDOUT: %u: @J.WithSelf.F.%impl.elem0.loc6_23.1 (%impl.elem0.335) = value_binding u, %u.param +// CHECK:STDOUT: %return.param: ref @J.WithSelf.F.%impl.elem0.loc6_23.1 (%impl.elem0.335) = out_param call_param2 +// CHECK:STDOUT: %return: ref @J.WithSelf.F.%impl.elem0.loc6_23.1 (%impl.elem0.335) = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %assoc1: %J.assoc_type = assoc_entity element1, %J.WithSelf.F.decl [concrete = constants.%assoc1.eeb] // CHECK:STDOUT: @@ -551,101 +605,89 @@ fn F() { // CHECK:STDOUT: .Self = %Self // CHECK:STDOUT: .U = @U.%assoc0 // CHECK:STDOUT: .F = @J.WithSelf.%assoc1 +// CHECK:STDOUT: .C = // CHECK:STDOUT: witness = (@J.WithSelf.%U, @J.WithSelf.%J.WithSelf.F.decl) // CHECK:STDOUT: // CHECK:STDOUT: !requires: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: impl @empty_tuple.type.as.J.impl: %.loc8_7.2 as %.loc8_14 { +// CHECK:STDOUT: impl @empty_tuple.type.as.J.impl: %.loc10_7.2 as %.loc10_14 { // CHECK:STDOUT: %empty_tuple.type.as.J.impl.F.decl: %empty_tuple.type.as.J.impl.F.type = fn_decl @empty_tuple.type.as.J.impl.F [concrete = constants.%empty_tuple.type.as.J.impl.F] { // CHECK:STDOUT: %self.param_patt: %pattern_type.cb1 = value_param_pattern [concrete] // CHECK:STDOUT: %self.patt: %pattern_type.cb1 = at_binding_pattern self, %self.param_patt [concrete] // CHECK:STDOUT: %u.param_patt: %pattern_type.7ce = value_param_pattern [concrete] // CHECK:STDOUT: %u.patt: %pattern_type.7ce = at_binding_pattern u, %u.param_patt [concrete] // CHECK:STDOUT: %return.param_patt: %pattern_type.7ce = out_param_pattern [concrete] -// CHECK:STDOUT: %return.patt: %pattern_type.7ce = return_slot_pattern %return.param_patt, %i32.loc9_38 [concrete] +// CHECK:STDOUT: %return.patt: %pattern_type.7ce = return_slot_pattern %return.param_patt, %i32.loc12_38 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %i32.loc9_38: type = type_literal constants.%i32 [concrete = constants.%i32] -// CHECK:STDOUT: %.loc9: Core.Form = init_form %i32.loc9_38 [concrete = constants.%.ff5] +// CHECK:STDOUT: %i32.loc12_38: type = type_literal constants.%i32 [concrete = constants.%i32] +// CHECK:STDOUT: %.loc12: Core.Form = init_form %i32.loc12_38 [concrete = constants.%.ff5] // CHECK:STDOUT: %self.param: %empty_tuple.type = value_param call_param0 -// CHECK:STDOUT: %Self.ref: type = name_ref Self, @empty_tuple.type.as.J.impl.%.loc8_7.2 [concrete = constants.%empty_tuple.type] +// CHECK:STDOUT: %Self.ref: type = name_ref Self, @empty_tuple.type.as.J.impl.%.loc10_7.2 [concrete = constants.%empty_tuple.type] // CHECK:STDOUT: %self: %empty_tuple.type = value_binding self, %self.param // CHECK:STDOUT: %u.param: %i32 = value_param call_param1 -// CHECK:STDOUT: %i32.loc9_30: type = type_literal constants.%i32 [concrete = constants.%i32] +// CHECK:STDOUT: %i32.loc12_30: type = type_literal constants.%i32 [concrete = constants.%i32] // CHECK:STDOUT: %u: %i32 = value_binding u, %u.param // CHECK:STDOUT: %return.param: ref %i32 = out_param call_param2 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %J.impl_witness_table = impl_witness_table (%impl_witness_assoc_constant, %empty_tuple.type.as.J.impl.F.decl), @empty_tuple.type.as.J.impl [concrete] -// CHECK:STDOUT: %J.impl_witness: = impl_witness %J.impl_witness_table [concrete = constants.%J.impl_witness.5bf] -// CHECK:STDOUT: %impl_witness_assoc_constant: type = impl_witness_assoc_constant constants.%i32 [concrete = constants.%i32] +// CHECK:STDOUT: // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %empty_tuple.type.as.J.impl.F.decl +// CHECK:STDOUT: extend %.loc10_14 // CHECK:STDOUT: witness = %J.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: impl @C.as.J.impl: %C.ref.loc21_6 as %.loc21_13 { +// CHECK:STDOUT: impl @C.as.J.impl: %C.ref.loc27_6 as %.loc27_13 { // CHECK:STDOUT: %C.as.J.impl.F.decl: %C.as.J.impl.F.type = fn_decl @C.as.J.impl.F [concrete = constants.%C.as.J.impl.F] { // CHECK:STDOUT: %self.param_patt: %pattern_type.7c7 = value_param_pattern [concrete] // CHECK:STDOUT: %self.patt: %pattern_type.7c7 = at_binding_pattern self, %self.param_patt [concrete] // CHECK:STDOUT: %u.param_patt: %pattern_type.7c7 = value_param_pattern [concrete] // CHECK:STDOUT: %u.patt: %pattern_type.7c7 = at_binding_pattern u, %u.param_patt [concrete] // CHECK:STDOUT: %return.param_patt: %pattern_type.7c7 = out_param_pattern [concrete] -// CHECK:STDOUT: %return.patt: %pattern_type.7c7 = return_slot_pattern %return.param_patt, %C.ref.loc22_36 [concrete] +// CHECK:STDOUT: %return.patt: %pattern_type.7c7 = return_slot_pattern %return.param_patt, %C.ref.loc29_36 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref.loc22_36: type = name_ref C, file.%C.decl [concrete = constants.%C] -// CHECK:STDOUT: %.loc22_36: Core.Form = init_form %C.ref.loc22_36 [concrete = constants.%.a69] +// CHECK:STDOUT: %C.ref.loc29_36: type = name_ref C, file.%C.decl [concrete = constants.%C] +// CHECK:STDOUT: %.loc29_36: Core.Form = init_form %C.ref.loc29_36 [concrete = constants.%.a69] // CHECK:STDOUT: %self.param: %C = value_param call_param0 -// CHECK:STDOUT: %Self.ref: type = name_ref Self, @C.as.J.impl.%C.ref.loc21_6 [concrete = constants.%C] +// CHECK:STDOUT: %Self.ref: type = name_ref Self, @C.as.J.impl.%C.ref.loc27_6 [concrete = constants.%C] // CHECK:STDOUT: %self: %C = value_binding self, %self.param // CHECK:STDOUT: %u.param: %C = value_param call_param1 -// CHECK:STDOUT: %C.ref.loc22_30: type = name_ref C, file.%C.decl [concrete = constants.%C] +// CHECK:STDOUT: %C.ref.loc29_30: type = name_ref C, file.%C.decl [concrete = constants.%C] // CHECK:STDOUT: %u: %C = value_binding u, %u.param // CHECK:STDOUT: %return.param: ref %C = out_param call_param2 // CHECK:STDOUT: %return: ref %C = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %J.impl_witness_table = impl_witness_table (%impl_witness_assoc_constant, %C.as.J.impl.F.decl), @C.as.J.impl [concrete] -// CHECK:STDOUT: %J.impl_witness: = impl_witness %J.impl_witness_table [concrete = constants.%J.impl_witness.00b] -// CHECK:STDOUT: %impl_witness_assoc_constant: type = impl_witness_assoc_constant constants.%C [concrete = constants.%C] +// CHECK:STDOUT: // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .C = // CHECK:STDOUT: .F = %C.as.J.impl.F.decl +// CHECK:STDOUT: extend %.loc27_13 // CHECK:STDOUT: witness = %J.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: class @C { -// CHECK:STDOUT: %.loc18_10: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct] -// CHECK:STDOUT: %.loc18_11: type = converted %.loc18_10, constants.%empty_struct_type [concrete = constants.%empty_struct_type] -// CHECK:STDOUT: adapt_decl %.loc18_11 [concrete] -// CHECK:STDOUT: %complete_type: = complete_type_witness constants.%empty_struct_type [concrete = constants.%complete_type.357] -// CHECK:STDOUT: complete_type_witness = %complete_type -// CHECK:STDOUT: -// CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = constants.%C -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: generic fn @J.WithSelf.F(@J.%Self: %J.type) { // CHECK:STDOUT: %Self: %J.type = symbolic_binding Self, 0 [symbolic = %Self (constants.%Self.8a1)] -// CHECK:STDOUT: %Self.as_type.loc5_14.1: type = facet_access_type %Self [symbolic = %Self.as_type.loc5_14.1 (constants.%Self.as_type.9ea)] -// CHECK:STDOUT: %pattern_type.loc5_12: type = pattern_type %Self.as_type.loc5_14.1 [symbolic = %pattern_type.loc5_12 (constants.%pattern_type.909)] +// CHECK:STDOUT: %Self.as_type.loc6_14.1: type = facet_access_type %Self [symbolic = %Self.as_type.loc6_14.1 (constants.%Self.as_type.9ea)] +// CHECK:STDOUT: %pattern_type.loc6_12: type = pattern_type %Self.as_type.loc6_14.1 [symbolic = %pattern_type.loc6_12 (constants.%pattern_type.909)] // CHECK:STDOUT: %J.lookup_impl_witness: = lookup_impl_witness %Self, @J [symbolic = %J.lookup_impl_witness (constants.%J.lookup_impl_witness.89e)] -// CHECK:STDOUT: %impl.elem0.loc5_23.1: type = impl_witness_access %J.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc5_23.1 (constants.%impl.elem0.335)] -// CHECK:STDOUT: %pattern_type.loc5_21: type = pattern_type %impl.elem0.loc5_23.1 [symbolic = %pattern_type.loc5_21 (constants.%pattern_type.c1a)] -// CHECK:STDOUT: %.loc5_29.1: Core.Form = init_form %impl.elem0.loc5_23.1 [symbolic = %.loc5_29.1 (constants.%.77f)] +// CHECK:STDOUT: %impl.elem0.loc6_23.1: type = impl_witness_access %J.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc6_23.1 (constants.%impl.elem0.335)] +// CHECK:STDOUT: %pattern_type.loc6_21: type = pattern_type %impl.elem0.loc6_23.1 [symbolic = %pattern_type.loc6_21 (constants.%pattern_type.c1a)] +// CHECK:STDOUT: %.loc6_29.1: Core.Form = init_form %impl.elem0.loc6_23.1 [symbolic = %.loc6_29.1 (constants.%.77f)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%self.param: @J.WithSelf.F.%Self.as_type.loc5_14.1 (%Self.as_type.9ea), %u.param: @J.WithSelf.F.%impl.elem0.loc5_23.1 (%impl.elem0.335)) -> out %return.param: @J.WithSelf.F.%impl.elem0.loc5_23.1 (%impl.elem0.335); +// CHECK:STDOUT: fn(%self.param: @J.WithSelf.F.%Self.as_type.loc6_14.1 (%Self.as_type.9ea), %u.param: @J.WithSelf.F.%impl.elem0.loc6_23.1 (%impl.elem0.335)) -> out %return.param: @J.WithSelf.F.%impl.elem0.loc6_23.1 (%impl.elem0.335); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @empty_tuple.type.as.J.impl.F(%self.param: %empty_tuple.type, %u.param: %i32) -> out %return.param: %i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %u.ref: %i32 = name_ref u, %u // CHECK:STDOUT: %impl.elem1: %.b16 = impl_witness_access constants.%Negate.impl_witness.536, element1 [concrete = constants.%Int.as.Negate.impl.Op.619] -// CHECK:STDOUT: %bound_method.loc9_51.1: = bound_method %u.ref, %impl.elem1 +// CHECK:STDOUT: %bound_method.loc12_51.1: = bound_method %u.ref, %impl.elem1 // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem1, @Int.as.Negate.impl.Op(constants.%int_32) [concrete = constants.%Int.as.Negate.impl.Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc9_51.2: = bound_method %u.ref, %specific_fn -// CHECK:STDOUT: %Int.as.Negate.impl.Op.call: init %i32 = call %bound_method.loc9_51.2(%u.ref) +// CHECK:STDOUT: %bound_method.loc12_51.2: = bound_method %u.ref, %specific_fn +// CHECK:STDOUT: %Int.as.Negate.impl.Op.call: init %i32 = call %bound_method.loc12_51.2(%u.ref) // CHECK:STDOUT: return %Int.as.Negate.impl.Op.call // CHECK:STDOUT: } // CHECK:STDOUT: @@ -655,27 +697,27 @@ fn F() { // CHECK:STDOUT: %J.ref: type = name_ref J, file.%J.decl [concrete = constants.%J.type] // CHECK:STDOUT: %F.ref: %J.assoc_type = name_ref F, @J.WithSelf.%assoc1 [concrete = constants.%assoc1.eeb] // CHECK:STDOUT: %impl.elem1: %.b39 = impl_witness_access constants.%J.impl_witness.5bf, element1 [concrete = constants.%empty_tuple.type.as.J.impl.F] -// CHECK:STDOUT: %bound_method.loc13_11: = bound_method %x.ref, %impl.elem1 +// CHECK:STDOUT: %bound_method.loc18_11: = bound_method %x.ref, %impl.elem1 // CHECK:STDOUT: %int_40: Core.IntLiteral = int_value 40 [concrete = constants.%int_40.f80] // CHECK:STDOUT: %impl.elem0: %.9db = impl_witness_access constants.%ImplicitAs.impl_witness.ac5, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.f1a] -// CHECK:STDOUT: %bound_method.loc13_18.1: = bound_method %int_40, %impl.elem0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound] +// CHECK:STDOUT: %bound_method.loc18_18.1: = bound_method %int_40, %impl.elem0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound] // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] -// CHECK:STDOUT: %bound_method.loc13_18.2: = bound_method %int_40, %specific_fn [concrete = constants.%bound_method] -// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call: init %i32 = call %bound_method.loc13_18.2(%int_40) [concrete = constants.%int_40.518] -// CHECK:STDOUT: %.loc13_18.1: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call [concrete = constants.%int_40.518] -// CHECK:STDOUT: %.loc13_18.2: %i32 = converted %int_40, %.loc13_18.1 [concrete = constants.%int_40.518] -// CHECK:STDOUT: %empty_tuple.type.as.J.impl.F.call: init %i32 = call %bound_method.loc13_11(%x.ref, %.loc13_18.2) +// CHECK:STDOUT: %bound_method.loc18_18.2: = bound_method %int_40, %specific_fn [concrete = constants.%bound_method] +// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call: init %i32 = call %bound_method.loc18_18.2(%int_40) [concrete = constants.%int_40.518] +// CHECK:STDOUT: %.loc18_18.1: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call [concrete = constants.%int_40.518] +// CHECK:STDOUT: %.loc18_18.2: %i32 = converted %int_40, %.loc18_18.1 [concrete = constants.%int_40.518] +// CHECK:STDOUT: %empty_tuple.type.as.J.impl.F.call: init %i32 = call %bound_method.loc18_11(%x.ref, %.loc18_18.2) // CHECK:STDOUT: return %empty_tuple.type.as.J.impl.F.call // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @C.as.J.impl.F(%self.param: %C, %u.param: %C) -> out %return.param: %C { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %self.ref: %C = name_ref self, %self -// CHECK:STDOUT: %.loc22_51.1: %empty_struct_type = as_compatible %self.ref -// CHECK:STDOUT: %.loc22_51.2: init %empty_struct_type = struct_init () [concrete = constants.%empty_struct] -// CHECK:STDOUT: %.loc22_51.3: init %C = as_compatible %.loc22_51.2 [concrete = constants.%C.val] -// CHECK:STDOUT: %.loc22_51.4: init %C = converted %self.ref, %.loc22_51.3 [concrete = constants.%C.val] -// CHECK:STDOUT: return %.loc22_51.4 +// CHECK:STDOUT: %.loc29_51.1: %empty_struct_type = as_compatible %self.ref +// CHECK:STDOUT: %.loc29_51.2: init %empty_struct_type = struct_init () [concrete = constants.%empty_struct] +// CHECK:STDOUT: %.loc29_51.3: init %C = as_compatible %.loc29_51.2 [concrete = constants.%C.val] +// CHECK:STDOUT: %.loc29_51.4: init %C = converted %self.ref, %.loc29_51.3 [concrete = constants.%C.val] +// CHECK:STDOUT: return %.loc29_51.4 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @J.WithSelf(constants.%Self.8a1) { @@ -687,12 +729,12 @@ fn F() { // CHECK:STDOUT: // CHECK:STDOUT: specific @J.WithSelf.F(constants.%Self.8a1) { // CHECK:STDOUT: %Self => constants.%Self.8a1 -// CHECK:STDOUT: %Self.as_type.loc5_14.1 => constants.%Self.as_type.9ea -// CHECK:STDOUT: %pattern_type.loc5_12 => constants.%pattern_type.909 +// CHECK:STDOUT: %Self.as_type.loc6_14.1 => constants.%Self.as_type.9ea +// CHECK:STDOUT: %pattern_type.loc6_12 => constants.%pattern_type.909 // CHECK:STDOUT: %J.lookup_impl_witness => constants.%J.lookup_impl_witness.89e -// CHECK:STDOUT: %impl.elem0.loc5_23.1 => constants.%impl.elem0.335 -// CHECK:STDOUT: %pattern_type.loc5_21 => constants.%pattern_type.c1a -// CHECK:STDOUT: %.loc5_29.1 => constants.%.77f +// CHECK:STDOUT: %impl.elem0.loc6_23.1 => constants.%impl.elem0.335 +// CHECK:STDOUT: %pattern_type.loc6_21 => constants.%pattern_type.c1a +// CHECK:STDOUT: %.loc6_29.1 => constants.%.77f // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @J.WithSelf(constants.%.Self.2fa) { @@ -711,12 +753,12 @@ fn F() { // CHECK:STDOUT: // CHECK:STDOUT: specific @J.WithSelf.F(constants.%J.facet.a51) { // CHECK:STDOUT: %Self => constants.%J.facet.a51 -// CHECK:STDOUT: %Self.as_type.loc5_14.1 => constants.%empty_tuple.type -// CHECK:STDOUT: %pattern_type.loc5_12 => constants.%pattern_type.cb1 +// CHECK:STDOUT: %Self.as_type.loc6_14.1 => constants.%empty_tuple.type +// CHECK:STDOUT: %pattern_type.loc6_12 => constants.%pattern_type.cb1 // CHECK:STDOUT: %J.lookup_impl_witness => constants.%J.impl_witness.5bf -// CHECK:STDOUT: %impl.elem0.loc5_23.1 => constants.%i32 -// CHECK:STDOUT: %pattern_type.loc5_21 => constants.%pattern_type.7ce -// CHECK:STDOUT: %.loc5_29.1 => constants.%.ff5 +// CHECK:STDOUT: %impl.elem0.loc6_23.1 => constants.%i32 +// CHECK:STDOUT: %pattern_type.loc6_21 => constants.%pattern_type.7ce +// CHECK:STDOUT: %.loc6_29.1 => constants.%.ff5 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @J.WithSelf(constants.%J.facet.05d) { @@ -728,357 +770,35 @@ fn F() { // CHECK:STDOUT: // CHECK:STDOUT: specific @J.WithSelf.F(constants.%J.facet.05d) { // CHECK:STDOUT: %Self => constants.%J.facet.05d -// CHECK:STDOUT: %Self.as_type.loc5_14.1 => constants.%C -// CHECK:STDOUT: %pattern_type.loc5_12 => constants.%pattern_type.7c7 +// CHECK:STDOUT: %Self.as_type.loc6_14.1 => constants.%C +// CHECK:STDOUT: %pattern_type.loc6_12 => constants.%pattern_type.7c7 // CHECK:STDOUT: %J.lookup_impl_witness => constants.%J.impl_witness.00b -// CHECK:STDOUT: %impl.elem0.loc5_23.1 => constants.%C -// CHECK:STDOUT: %pattern_type.loc5_21 => constants.%pattern_type.7c7 -// CHECK:STDOUT: %.loc5_29.1 => constants.%.a69 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: --- associated_type_in_function_signature.carbon -// CHECK:STDOUT: -// CHECK:STDOUT: constants { -// CHECK:STDOUT: %J.type: type = facet_type <@J> [concrete] -// CHECK:STDOUT: %Self.8a1: %J.type = symbolic_binding Self, 0 [symbolic] -// CHECK:STDOUT: %J.assoc_type: type = assoc_entity_type @J [concrete] -// CHECK:STDOUT: %assoc0.ebd: %J.assoc_type = assoc_entity element0, @J.WithSelf.%U [concrete] -// CHECK:STDOUT: %J.lookup_impl_witness.89e: = lookup_impl_witness %Self.8a1, @J [symbolic] -// CHECK:STDOUT: %impl.elem0.335: type = impl_witness_access %J.lookup_impl_witness.89e, element0 [symbolic] -// CHECK:STDOUT: %pattern_type.c1a: type = pattern_type %impl.elem0.335 [symbolic] -// CHECK:STDOUT: %.77f: Core.Form = init_form %impl.elem0.335 [symbolic] -// CHECK:STDOUT: %J.WithSelf.F.type.adb: type = fn_type @J.WithSelf.F, @J.WithSelf(%Self.8a1) [symbolic] -// CHECK:STDOUT: %J.WithSelf.F.569: %J.WithSelf.F.type.adb = struct_value () [symbolic] -// CHECK:STDOUT: %assoc1.eeb: %J.assoc_type = assoc_entity element1, @J.WithSelf.%J.WithSelf.F.decl [concrete] -// CHECK:STDOUT: %D: type = class_type @D [concrete] -// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] -// CHECK:STDOUT: %complete_type.357: = complete_type_witness %empty_struct_type [concrete] -// CHECK:STDOUT: %.Self.2fa: %J.type = symbolic_binding .Self [symbolic_self] -// CHECK:STDOUT: %J.WithSelf.F.type.e19: type = fn_type @J.WithSelf.F, @J.WithSelf(%.Self.2fa) [symbolic_self] -// CHECK:STDOUT: %J.WithSelf.F.659: %J.WithSelf.F.type.e19 = struct_value () [symbolic_self] -// CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.2fa [symbolic_self] -// CHECK:STDOUT: %J.lookup_impl_witness.46a: = lookup_impl_witness %.Self.2fa, @J [symbolic_self] -// CHECK:STDOUT: %impl.elem0.a58: type = impl_witness_access %J.lookup_impl_witness.46a, element0 [symbolic_self] -// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete] -// CHECK:STDOUT: %Int.type: type = generic_class_type @Int [concrete] -// CHECK:STDOUT: %Int.generic: %Int.type = struct_value () [concrete] -// CHECK:STDOUT: %N: Core.IntLiteral = symbolic_binding N, 0 [symbolic] -// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete] -// CHECK:STDOUT: %J_where.type: type = facet_type <@J where %impl.elem0.a58 = %i32> [concrete] -// CHECK:STDOUT: %J.impl_witness: = impl_witness @D.as.J.impl.%J.impl_witness_table [concrete] -// CHECK:STDOUT: %pattern_type.7ce: type = pattern_type %i32 [concrete] -// CHECK:STDOUT: %.ff5: Core.Form = init_form %i32 [concrete] -// CHECK:STDOUT: %D.as.J.impl.F.type: type = fn_type @D.as.J.impl.F [concrete] -// CHECK:STDOUT: %D.as.J.impl.F: %D.as.J.impl.F.type = struct_value () [concrete] -// CHECK:STDOUT: %J.facet: %J.type = facet_value %D, (%J.impl_witness) [concrete] -// CHECK:STDOUT: %J.WithSelf.F.type.7f3: type = fn_type @J.WithSelf.F, @J.WithSelf(%J.facet) [concrete] -// CHECK:STDOUT: %J.WithSelf.F.973: %J.WithSelf.F.type.7f3 = struct_value () [concrete] -// CHECK:STDOUT: %Negate.type: type = facet_type <@Negate> [concrete] -// CHECK:STDOUT: %Int.as.Negate.impl.Op.type.c73: type = fn_type @Int.as.Negate.impl.Op, @Int.as.Negate.impl(%N) [symbolic] -// CHECK:STDOUT: %Int.as.Negate.impl.Op.a66: %Int.as.Negate.impl.Op.type.c73 = struct_value () [symbolic] -// CHECK:STDOUT: %Negate.impl_witness.536: = impl_witness imports.%Negate.impl_witness_table, @Int.as.Negate.impl(%int_32) [concrete] -// CHECK:STDOUT: %Int.as.Negate.impl.Op.type.60b: type = fn_type @Int.as.Negate.impl.Op, @Int.as.Negate.impl(%int_32) [concrete] -// CHECK:STDOUT: %Int.as.Negate.impl.Op.619: %Int.as.Negate.impl.Op.type.60b = struct_value () [concrete] -// CHECK:STDOUT: %Negate.facet: %Negate.type = facet_value %i32, (%Negate.impl_witness.536) [concrete] -// CHECK:STDOUT: %Negate.WithSelf.Op.type.0ff: type = fn_type @Negate.WithSelf.Op, @Negate.WithSelf(%Negate.facet) [concrete] -// CHECK:STDOUT: %.b16: type = fn_type_with_self_type %Negate.WithSelf.Op.type.0ff, %Negate.facet [concrete] -// CHECK:STDOUT: %Int.as.Negate.impl.Op.specific_fn: = specific_function %Int.as.Negate.impl.Op.619, @Int.as.Negate.impl.Op(%int_32) [concrete] -// CHECK:STDOUT: %CallFunction.type: type = fn_type @CallFunction [concrete] -// CHECK:STDOUT: %CallFunction: %CallFunction.type = struct_value () [concrete] -// CHECK:STDOUT: %.291: type = fn_type_with_self_type %J.WithSelf.F.type.7f3, %J.facet [concrete] -// CHECK:STDOUT: %int_4.0c1: Core.IntLiteral = int_value 4 [concrete] -// CHECK:STDOUT: %ImplicitAs.type.cc7: type = generic_interface_type @ImplicitAs [concrete] -// CHECK:STDOUT: %ImplicitAs.generic: %ImplicitAs.type.cc7 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.type.e8c: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] -// CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic] -// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.f67: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%To) [symbolic] -// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.8fd: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.f67 = struct_value () [symbolic] -// CHECK:STDOUT: %ImplicitAs.impl_witness.ac5: = impl_witness imports.%ImplicitAs.impl_witness_table.82d, @Core.IntLiteral.as.ImplicitAs.impl(%int_32) [concrete] -// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.a56: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%int_32) [concrete] -// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.f1a: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.a56 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.e8c = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.ac5) [concrete] -// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.b91: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs.WithSelf(%i32, %ImplicitAs.facet) [concrete] -// CHECK:STDOUT: %.9db: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.b91, %ImplicitAs.facet [concrete] -// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound: = bound_method %int_4.0c1, %Core.IntLiteral.as.ImplicitAs.impl.Convert.f1a [concrete] -// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.f1a, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete] -// CHECK:STDOUT: %bound_method: = bound_method %int_4.0c1, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] -// CHECK:STDOUT: %int_4.940: %i32 = int_value 4 [concrete] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: imports { -// CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { -// CHECK:STDOUT: .Int = %Core.Int -// CHECK:STDOUT: .Negate = %Core.Negate -// CHECK:STDOUT: .ImplicitAs = %Core.ImplicitAs -// CHECK:STDOUT: import Core//prelude -// CHECK:STDOUT: import Core//prelude/... -// CHECK:STDOUT: } -// CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/parts/int, Int, loaded [concrete = constants.%Int.generic] -// CHECK:STDOUT: %Core.Negate: type = import_ref Core//prelude/parts/int_literal, Negate, loaded [concrete = constants.%Negate.type] -// CHECK:STDOUT: %Core.import_ref.475 = import_ref Core//prelude/parts/int, loc{{\d+_\d+}}, unloaded -// CHECK:STDOUT: %Core.import_ref.f8a: @Int.as.Negate.impl.%Int.as.Negate.impl.Op.type (%Int.as.Negate.impl.Op.type.c73) = import_ref Core//prelude/parts/int, loc{{\d+_\d+}}, loaded [symbolic = @Int.as.Negate.impl.%Int.as.Negate.impl.Op (constants.%Int.as.Negate.impl.Op.a66)] -// CHECK:STDOUT: %Negate.impl_witness_table = impl_witness_table (%Core.import_ref.475, %Core.import_ref.f8a), @Int.as.Negate.impl [concrete] -// CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.cc7 = import_ref Core//prelude/parts/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic] -// CHECK:STDOUT: %Core.import_ref.70a: @Core.IntLiteral.as.ImplicitAs.impl.%Core.IntLiteral.as.ImplicitAs.impl.Convert.type (%Core.IntLiteral.as.ImplicitAs.impl.Convert.type.f67) = import_ref Core//prelude/parts/int, loc{{\d+_\d+}}, loaded [symbolic = @Core.IntLiteral.as.ImplicitAs.impl.%Core.IntLiteral.as.ImplicitAs.impl.Convert (constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.8fd)] -// CHECK:STDOUT: %ImplicitAs.impl_witness_table.82d = impl_witness_table (%Core.import_ref.70a), @Core.IntLiteral.as.ImplicitAs.impl [concrete] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: file { -// CHECK:STDOUT: package: = namespace [concrete] { -// CHECK:STDOUT: .Core = imports.%Core -// CHECK:STDOUT: .J = %J.decl -// CHECK:STDOUT: .D = %D.decl -// CHECK:STDOUT: .CallFunction = %CallFunction.decl -// CHECK:STDOUT: } -// CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %J.decl: type = interface_decl @J [concrete = constants.%J.type] {} {} -// CHECK:STDOUT: %D.decl: type = class_decl @D [concrete = constants.%D] {} {} -// CHECK:STDOUT: impl_decl @D.as.J.impl [concrete] {} { -// CHECK:STDOUT: %D.ref: type = name_ref D, file.%D.decl [concrete = constants.%D] -// CHECK:STDOUT: %J.ref: type = name_ref J, file.%J.decl [concrete = constants.%J.type] -// CHECK:STDOUT: %.Self: %J.type = symbolic_binding .Self [symbolic_self = constants.%.Self.2fa] -// CHECK:STDOUT: %.Self.ref: %J.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self.2fa] -// CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref [symbolic_self = constants.%.Self.as_type] -// CHECK:STDOUT: %.loc10_19: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.as_type] -// CHECK:STDOUT: %U.ref: %J.assoc_type = name_ref U, @U.%assoc0 [concrete = constants.%assoc0.ebd] -// CHECK:STDOUT: %impl.elem0: type = impl_witness_access constants.%J.lookup_impl_witness.46a, element0 [symbolic_self = constants.%impl.elem0.a58] -// CHECK:STDOUT: %i32: type = type_literal constants.%i32 [concrete = constants.%i32] -// CHECK:STDOUT: %.loc10_13: type = where_expr [concrete = constants.%J_where.type] { -// CHECK:STDOUT: requirement_base_facet_type %J.ref -// CHECK:STDOUT: requirement_rewrite %impl.elem0, %i32 -// CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: %CallFunction.decl: %CallFunction.type = fn_decl @CallFunction [concrete = constants.%CallFunction] { -// CHECK:STDOUT: %return.param_patt: %pattern_type.7ce = out_param_pattern [concrete] -// CHECK:STDOUT: %return.patt: %pattern_type.7ce = return_slot_pattern %return.param_patt, %i32 [concrete] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %i32: type = type_literal constants.%i32 [concrete = constants.%i32] -// CHECK:STDOUT: %.loc14: Core.Form = init_form %i32 [concrete = constants.%.ff5] -// CHECK:STDOUT: %return.param: ref %i32 = out_param call_param0 -// CHECK:STDOUT: %return: ref %i32 = return_slot %return.param -// CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: interface @J { -// CHECK:STDOUT: %Self: %J.type = symbolic_binding Self, 0 [symbolic = constants.%Self.8a1] -// CHECK:STDOUT: %J.WithSelf.decl = interface_with_self_decl @J [concrete] -// CHECK:STDOUT: -// CHECK:STDOUT: !with Self: -// CHECK:STDOUT: %U: type = assoc_const_decl @U [concrete] { -// CHECK:STDOUT: %assoc0: %J.assoc_type = assoc_entity element0, @J.WithSelf.%U [concrete = constants.%assoc0.ebd] -// CHECK:STDOUT: } -// CHECK:STDOUT: %J.WithSelf.F.decl: @J.WithSelf.%J.WithSelf.F.type (%J.WithSelf.F.type.adb) = fn_decl @J.WithSelf.F [symbolic = @J.WithSelf.%J.WithSelf.F (constants.%J.WithSelf.F.569)] { -// CHECK:STDOUT: %u.param_patt: @J.WithSelf.F.%pattern_type (%pattern_type.c1a) = value_param_pattern [concrete] -// CHECK:STDOUT: %u.patt: @J.WithSelf.F.%pattern_type (%pattern_type.c1a) = at_binding_pattern u, %u.param_patt [concrete] -// CHECK:STDOUT: %return.param_patt: @J.WithSelf.F.%pattern_type (%pattern_type.c1a) = out_param_pattern [concrete] -// CHECK:STDOUT: %return.patt: @J.WithSelf.F.%pattern_type (%pattern_type.c1a) = return_slot_pattern %return.param_patt, %U.ref.loc5_17 [concrete] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %impl.elem0.loc5_17: type = impl_witness_access constants.%J.lookup_impl_witness.89e, element0 [symbolic = %impl.elem0.loc5_11.1 (constants.%impl.elem0.335)] -// CHECK:STDOUT: %U.ref.loc5_17: type = name_ref U, %impl.elem0.loc5_17 [symbolic = %impl.elem0.loc5_11.1 (constants.%impl.elem0.335)] -// CHECK:STDOUT: %.loc5_17.2: Core.Form = init_form %U.ref.loc5_17 [symbolic = %.loc5_17.1 (constants.%.77f)] -// CHECK:STDOUT: %u.param: @J.WithSelf.F.%impl.elem0.loc5_11.1 (%impl.elem0.335) = value_param call_param0 -// CHECK:STDOUT: %.loc5_11: type = splice_block %U.ref.loc5_11 [symbolic = %impl.elem0.loc5_11.1 (constants.%impl.elem0.335)] { -// CHECK:STDOUT: %impl.elem0.loc5_11.2: type = impl_witness_access constants.%J.lookup_impl_witness.89e, element0 [symbolic = %impl.elem0.loc5_11.1 (constants.%impl.elem0.335)] -// CHECK:STDOUT: %U.ref.loc5_11: type = name_ref U, %impl.elem0.loc5_11.2 [symbolic = %impl.elem0.loc5_11.1 (constants.%impl.elem0.335)] -// CHECK:STDOUT: } -// CHECK:STDOUT: %u: @J.WithSelf.F.%impl.elem0.loc5_11.1 (%impl.elem0.335) = value_binding u, %u.param -// CHECK:STDOUT: %return.param: ref @J.WithSelf.F.%impl.elem0.loc5_11.1 (%impl.elem0.335) = out_param call_param1 -// CHECK:STDOUT: %return: ref @J.WithSelf.F.%impl.elem0.loc5_11.1 (%impl.elem0.335) = return_slot %return.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %assoc1: %J.assoc_type = assoc_entity element1, %J.WithSelf.F.decl [concrete = constants.%assoc1.eeb] -// CHECK:STDOUT: -// CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = %Self -// CHECK:STDOUT: .U = @U.%assoc0 -// CHECK:STDOUT: .F = @J.WithSelf.%assoc1 -// CHECK:STDOUT: witness = (@J.WithSelf.%U, @J.WithSelf.%J.WithSelf.F.decl) -// CHECK:STDOUT: -// CHECK:STDOUT: !requires: -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: impl @D.as.J.impl: %D.ref as %.loc10_13 { -// CHECK:STDOUT: %D.as.J.impl.F.decl: %D.as.J.impl.F.type = fn_decl @D.as.J.impl.F [concrete = constants.%D.as.J.impl.F] { -// CHECK:STDOUT: %u.param_patt: %pattern_type.7ce = value_param_pattern [concrete] -// CHECK:STDOUT: %u.patt: %pattern_type.7ce = at_binding_pattern u, %u.param_patt [concrete] -// CHECK:STDOUT: %return.param_patt: %pattern_type.7ce = out_param_pattern [concrete] -// CHECK:STDOUT: %return.patt: %pattern_type.7ce = return_slot_pattern %return.param_patt, %i32.loc11_19 [concrete] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %i32.loc11_19: type = type_literal constants.%i32 [concrete = constants.%i32] -// CHECK:STDOUT: %.loc11: Core.Form = init_form %i32.loc11_19 [concrete = constants.%.ff5] -// CHECK:STDOUT: %u.param: %i32 = value_param call_param0 -// CHECK:STDOUT: %i32.loc11_11: type = type_literal constants.%i32 [concrete = constants.%i32] -// CHECK:STDOUT: %u: %i32 = value_binding u, %u.param -// CHECK:STDOUT: %return.param: ref %i32 = out_param call_param1 -// CHECK:STDOUT: %return: ref %i32 = return_slot %return.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %J.impl_witness_table = impl_witness_table (%impl_witness_assoc_constant, %D.as.J.impl.F.decl), @D.as.J.impl [concrete] -// CHECK:STDOUT: %J.impl_witness: = impl_witness %J.impl_witness_table [concrete = constants.%J.impl_witness] -// CHECK:STDOUT: %impl_witness_assoc_constant: type = impl_witness_assoc_constant constants.%i32 [concrete = constants.%i32] -// CHECK:STDOUT: -// CHECK:STDOUT: !members: -// CHECK:STDOUT: .F = %D.as.J.impl.F.decl -// CHECK:STDOUT: witness = %J.impl_witness -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: class @D { -// CHECK:STDOUT: %complete_type: = complete_type_witness constants.%empty_struct_type [concrete = constants.%complete_type.357] -// CHECK:STDOUT: complete_type_witness = %complete_type -// CHECK:STDOUT: -// CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = constants.%D -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generic fn @J.WithSelf.F(@J.%Self: %J.type) { -// CHECK:STDOUT: %Self: %J.type = symbolic_binding Self, 0 [symbolic = %Self (constants.%Self.8a1)] -// CHECK:STDOUT: %J.lookup_impl_witness: = lookup_impl_witness %Self, @J [symbolic = %J.lookup_impl_witness (constants.%J.lookup_impl_witness.89e)] -// CHECK:STDOUT: %impl.elem0.loc5_11.1: type = impl_witness_access %J.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc5_11.1 (constants.%impl.elem0.335)] -// CHECK:STDOUT: %pattern_type: type = pattern_type %impl.elem0.loc5_11.1 [symbolic = %pattern_type (constants.%pattern_type.c1a)] -// CHECK:STDOUT: %.loc5_17.1: Core.Form = init_form %impl.elem0.loc5_11.1 [symbolic = %.loc5_17.1 (constants.%.77f)] -// CHECK:STDOUT: -// CHECK:STDOUT: fn(%u.param: @J.WithSelf.F.%impl.elem0.loc5_11.1 (%impl.elem0.335)) -> out %return.param: @J.WithSelf.F.%impl.elem0.loc5_11.1 (%impl.elem0.335); -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @D.as.J.impl.F(%u.param: %i32) -> out %return.param: %i32 { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %u.ref: %i32 = name_ref u, %u -// CHECK:STDOUT: %impl.elem1: %.b16 = impl_witness_access constants.%Negate.impl_witness.536, element1 [concrete = constants.%Int.as.Negate.impl.Op.619] -// CHECK:STDOUT: %bound_method.loc11_32.1: = bound_method %u.ref, %impl.elem1 -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem1, @Int.as.Negate.impl.Op(constants.%int_32) [concrete = constants.%Int.as.Negate.impl.Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc11_32.2: = bound_method %u.ref, %specific_fn -// CHECK:STDOUT: %Int.as.Negate.impl.Op.call: init %i32 = call %bound_method.loc11_32.2(%u.ref) -// CHECK:STDOUT: return %Int.as.Negate.impl.Op.call -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @CallFunction() -> out %return.param: %i32 { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %D.ref: type = name_ref D, file.%D.decl [concrete = constants.%D] -// CHECK:STDOUT: %J.ref: type = name_ref J, file.%J.decl [concrete = constants.%J.type] -// CHECK:STDOUT: %F.ref: %J.assoc_type = name_ref F, @J.WithSelf.%assoc1 [concrete = constants.%assoc1.eeb] -// CHECK:STDOUT: %J.facet: %J.type = facet_value %D.ref, (constants.%J.impl_witness) [concrete = constants.%J.facet] -// CHECK:STDOUT: %.loc15_11: %J.type = converted %D.ref, %J.facet [concrete = constants.%J.facet] -// CHECK:STDOUT: %impl.elem1: %.291 = impl_witness_access constants.%J.impl_witness, element1 [concrete = constants.%D.as.J.impl.F] -// CHECK:STDOUT: %int_4: Core.IntLiteral = int_value 4 [concrete = constants.%int_4.0c1] -// CHECK:STDOUT: %impl.elem0: %.9db = impl_witness_access constants.%ImplicitAs.impl_witness.ac5, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.f1a] -// CHECK:STDOUT: %bound_method.loc15_18.1: = bound_method %int_4, %impl.elem0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound] -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] -// CHECK:STDOUT: %bound_method.loc15_18.2: = bound_method %int_4, %specific_fn [concrete = constants.%bound_method] -// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call: init %i32 = call %bound_method.loc15_18.2(%int_4) [concrete = constants.%int_4.940] -// CHECK:STDOUT: %.loc15_18.1: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call [concrete = constants.%int_4.940] -// CHECK:STDOUT: %.loc15_18.2: %i32 = converted %int_4, %.loc15_18.1 [concrete = constants.%int_4.940] -// CHECK:STDOUT: %D.as.J.impl.F.call: init %i32 = call %impl.elem1(%.loc15_18.2) -// CHECK:STDOUT: return %D.as.J.impl.F.call -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: specific @J.WithSelf(constants.%Self.8a1) { -// CHECK:STDOUT: !definition: -// CHECK:STDOUT: %Self => constants.%Self.8a1 -// CHECK:STDOUT: %J.WithSelf.F.type => constants.%J.WithSelf.F.type.adb -// CHECK:STDOUT: %J.WithSelf.F => constants.%J.WithSelf.F.569 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: specific @J.WithSelf.F(constants.%Self.8a1) { -// CHECK:STDOUT: %Self => constants.%Self.8a1 -// CHECK:STDOUT: %J.lookup_impl_witness => constants.%J.lookup_impl_witness.89e -// CHECK:STDOUT: %impl.elem0.loc5_11.1 => constants.%impl.elem0.335 -// CHECK:STDOUT: %pattern_type => constants.%pattern_type.c1a -// CHECK:STDOUT: %.loc5_17.1 => constants.%.77f -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: specific @J.WithSelf(constants.%.Self.2fa) { -// CHECK:STDOUT: !definition: -// CHECK:STDOUT: %Self => constants.%.Self.2fa -// CHECK:STDOUT: %J.WithSelf.F.type => constants.%J.WithSelf.F.type.e19 -// CHECK:STDOUT: %J.WithSelf.F => constants.%J.WithSelf.F.659 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: specific @J.WithSelf(constants.%J.facet) { -// CHECK:STDOUT: !definition: -// CHECK:STDOUT: %Self => constants.%J.facet -// CHECK:STDOUT: %J.WithSelf.F.type => constants.%J.WithSelf.F.type.7f3 -// CHECK:STDOUT: %J.WithSelf.F => constants.%J.WithSelf.F.973 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: specific @J.WithSelf.F(constants.%J.facet) { -// CHECK:STDOUT: %Self => constants.%J.facet -// CHECK:STDOUT: %J.lookup_impl_witness => constants.%J.impl_witness -// CHECK:STDOUT: %impl.elem0.loc5_11.1 => constants.%i32 -// CHECK:STDOUT: %pattern_type => constants.%pattern_type.7ce -// CHECK:STDOUT: %.loc5_17.1 => constants.%.ff5 +// CHECK:STDOUT: %impl.elem0.loc6_23.1 => constants.%C +// CHECK:STDOUT: %pattern_type.loc6_21 => constants.%pattern_type.7c7 +// CHECK:STDOUT: %.loc6_29.1 => constants.%.a69 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- extend_impl_with_associated_type_in_signature.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %J.type: type = facet_type <@J> [concrete] -// CHECK:STDOUT: %Self.8a1: %J.type = symbolic_binding Self, 0 [symbolic] // CHECK:STDOUT: %J.assoc_type: type = assoc_entity_type @J [concrete] -// CHECK:STDOUT: %assoc0.ebd: %J.assoc_type = assoc_entity element0, @J.WithSelf.%U [concrete] -// CHECK:STDOUT: %J.lookup_impl_witness.89e: = lookup_impl_witness %Self.8a1, @J [symbolic] -// CHECK:STDOUT: %impl.elem0.335: type = impl_witness_access %J.lookup_impl_witness.89e, element0 [symbolic] -// CHECK:STDOUT: %pattern_type.c1a: type = pattern_type %impl.elem0.335 [symbolic] -// CHECK:STDOUT: %.77f: Core.Form = init_form %impl.elem0.335 [symbolic] -// CHECK:STDOUT: %J.WithSelf.F.type.adb: type = fn_type @J.WithSelf.F, @J.WithSelf(%Self.8a1) [symbolic] -// CHECK:STDOUT: %J.WithSelf.F.569: %J.WithSelf.F.type.adb = struct_value () [symbolic] // CHECK:STDOUT: %assoc1.eeb: %J.assoc_type = assoc_entity element1, @J.WithSelf.%J.WithSelf.F.decl [concrete] -// CHECK:STDOUT: %Self.as_type.9ea: type = facet_access_type %Self.8a1 [symbolic] -// CHECK:STDOUT: %pattern_type.909: type = pattern_type %Self.as_type.9ea [symbolic] -// CHECK:STDOUT: %J.WithSelf.G.type.ace: type = fn_type @J.WithSelf.G, @J.WithSelf(%Self.8a1) [symbolic] -// CHECK:STDOUT: %J.WithSelf.G.6e7: %J.WithSelf.G.type.ace = struct_value () [symbolic] // CHECK:STDOUT: %assoc2: %J.assoc_type = assoc_entity element2, @J.WithSelf.%J.WithSelf.G.decl [concrete] // CHECK:STDOUT: %E: type = class_type @E [concrete] -// CHECK:STDOUT: %.Self.2fa: %J.type = symbolic_binding .Self [symbolic_self] -// CHECK:STDOUT: %J.WithSelf.F.type.e19: type = fn_type @J.WithSelf.F, @J.WithSelf(%.Self.2fa) [symbolic_self] -// CHECK:STDOUT: %J.WithSelf.F.659: %J.WithSelf.F.type.e19 = struct_value () [symbolic_self] -// CHECK:STDOUT: %J.WithSelf.G.type.2cf: type = fn_type @J.WithSelf.G, @J.WithSelf(%.Self.2fa) [symbolic_self] -// CHECK:STDOUT: %J.WithSelf.G.4f5: %J.WithSelf.G.type.2cf = struct_value () [symbolic_self] -// CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.2fa [symbolic_self] -// CHECK:STDOUT: %J.lookup_impl_witness.46a: = lookup_impl_witness %.Self.2fa, @J [symbolic_self] -// CHECK:STDOUT: %impl.elem0.a58: type = impl_witness_access %J.lookup_impl_witness.46a, element0 [symbolic_self] // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete] -// CHECK:STDOUT: %Int.type: type = generic_class_type @Int [concrete] -// CHECK:STDOUT: %Int.generic: %Int.type = struct_value () [concrete] -// CHECK:STDOUT: %N: Core.IntLiteral = symbolic_binding N, 0 [symbolic] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete] -// CHECK:STDOUT: %J_where.type: type = facet_type <@J where %impl.elem0.a58 = %i32> [concrete] // CHECK:STDOUT: %J.impl_witness: = impl_witness @E.as.J.impl.%J.impl_witness_table [concrete] // CHECK:STDOUT: %pattern_type.7ce: type = pattern_type %i32 [concrete] -// CHECK:STDOUT: %.ff5: Core.Form = init_form %i32 [concrete] // CHECK:STDOUT: %E.as.J.impl.F.type: type = fn_type @E.as.J.impl.F [concrete] // CHECK:STDOUT: %E.as.J.impl.F: %E.as.J.impl.F.type = struct_value () [concrete] -// CHECK:STDOUT: %pattern_type.99f: type = pattern_type %E [concrete] // CHECK:STDOUT: %E.as.J.impl.G.type: type = fn_type @E.as.J.impl.G [concrete] // CHECK:STDOUT: %E.as.J.impl.G: %E.as.J.impl.G.type = struct_value () [concrete] // CHECK:STDOUT: %J.facet: %J.type = facet_value %E, (%J.impl_witness) [concrete] // CHECK:STDOUT: %J.WithSelf.F.type.7ab: type = fn_type @J.WithSelf.F, @J.WithSelf(%J.facet) [concrete] -// CHECK:STDOUT: %J.WithSelf.F.ef0: %J.WithSelf.F.type.7ab = struct_value () [concrete] // CHECK:STDOUT: %J.WithSelf.G.type.caf: type = fn_type @J.WithSelf.G, @J.WithSelf(%J.facet) [concrete] -// CHECK:STDOUT: %J.WithSelf.G.f88: %J.WithSelf.G.type.caf = struct_value () [concrete] -// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] -// CHECK:STDOUT: %complete_type.357: = complete_type_witness %empty_struct_type [concrete] -// CHECK:STDOUT: %i32.builtin: type = int_type signed, %int_32 [concrete] -// CHECK:STDOUT: %complete_type.f8a: = complete_type_witness %i32.builtin [concrete] -// CHECK:STDOUT: %Negate.type: type = facet_type <@Negate> [concrete] -// CHECK:STDOUT: %Int.as.Negate.impl.Op.type.c73: type = fn_type @Int.as.Negate.impl.Op, @Int.as.Negate.impl(%N) [symbolic] -// CHECK:STDOUT: %Int.as.Negate.impl.Op.a66: %Int.as.Negate.impl.Op.type.c73 = struct_value () [symbolic] -// CHECK:STDOUT: %Negate.impl_witness.536: = impl_witness imports.%Negate.impl_witness_table, @Int.as.Negate.impl(%int_32) [concrete] -// CHECK:STDOUT: %Int.as.Negate.impl.Op.type.60b: type = fn_type @Int.as.Negate.impl.Op, @Int.as.Negate.impl(%int_32) [concrete] -// CHECK:STDOUT: %Int.as.Negate.impl.Op.619: %Int.as.Negate.impl.Op.type.60b = struct_value () [concrete] -// CHECK:STDOUT: %Negate.facet: %Negate.type = facet_value %i32, (%Negate.impl_witness.536) [concrete] -// CHECK:STDOUT: %Negate.WithSelf.Op.type.0ff: type = fn_type @Negate.WithSelf.Op, @Negate.WithSelf(%Negate.facet) [concrete] -// CHECK:STDOUT: %.b16: type = fn_type_with_self_type %Negate.WithSelf.Op.type.0ff, %Negate.facet [concrete] -// CHECK:STDOUT: %Int.as.Negate.impl.Op.specific_fn: = specific_function %Int.as.Negate.impl.Op.619, @Int.as.Negate.impl.Op(%int_32) [concrete] -// CHECK:STDOUT: %CallBoth.type: type = fn_type @CallBoth [concrete] -// CHECK:STDOUT: %CallBoth: %CallBoth.type = struct_value () [concrete] -// CHECK:STDOUT: %type: type = facet_type [concrete] -// CHECK:STDOUT: %E.type.facet: %type = facet_value %E, () [concrete] -// CHECK:STDOUT: %J.WithSelf.F.type.d1c: type = fn_type @J.WithSelf.F, @J.WithSelf(%E.type.facet) [concrete] -// CHECK:STDOUT: %J.WithSelf.F.1a6: %J.WithSelf.F.type.d1c = struct_value () [concrete] -// CHECK:STDOUT: %J.WithSelf.G.type.d39: type = fn_type @J.WithSelf.G, @J.WithSelf(%E.type.facet) [concrete] -// CHECK:STDOUT: %J.WithSelf.G.a50: %J.WithSelf.G.type.d39 = struct_value () [concrete] // CHECK:STDOUT: %.ff2: type = fn_type_with_self_type %J.WithSelf.F.type.7ab, %J.facet [concrete] // CHECK:STDOUT: %int_2.ecc: Core.IntLiteral = int_value 2 [concrete] -// CHECK:STDOUT: %ImplicitAs.type.cc7: type = generic_interface_type @ImplicitAs [concrete] -// CHECK:STDOUT: %ImplicitAs.generic: %ImplicitAs.type.cc7 = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.type.e8c: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.f67: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%To) [symbolic] @@ -1110,1741 +830,247 @@ fn F() { // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.0b7: = bound_method %int_6.462, %Core.IntLiteral.as.ImplicitAs.impl.Convert.f1a [concrete] // CHECK:STDOUT: %bound_method.3ec: = bound_method %int_6.462, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] // CHECK:STDOUT: %int_6.e56: %i32 = int_value 6 [concrete] -// CHECK:STDOUT: %.Self.c39: %type = symbolic_binding .Self [symbolic_self] -// CHECK:STDOUT: %pattern_type.f76: type = pattern_type %J.type [concrete] -// CHECK:STDOUT: %T: %J.type = symbolic_binding T, 0 [symbolic] -// CHECK:STDOUT: %T.as_type: type = facet_access_type %T [symbolic] -// CHECK:STDOUT: %pattern_type.5a3: type = pattern_type %T.as_type [symbolic] -// CHECK:STDOUT: %J.WithSelf.F.type.41f: type = fn_type @J.WithSelf.F, @J.WithSelf(%T) [symbolic] -// CHECK:STDOUT: %J.WithSelf.F.f01: %J.WithSelf.F.type.41f = struct_value () [symbolic] -// CHECK:STDOUT: %J.WithSelf.G.type.b2e: type = fn_type @J.WithSelf.G, @J.WithSelf(%T) [symbolic] -// CHECK:STDOUT: %J.WithSelf.G.310: %J.WithSelf.G.type.b2e = struct_value () [symbolic] -// CHECK:STDOUT: %J.lookup_impl_witness.264: = lookup_impl_witness %T, @J [symbolic] -// CHECK:STDOUT: %impl.elem0.560: type = impl_witness_access %J.lookup_impl_witness.264, element0 [symbolic] -// CHECK:STDOUT: %pattern_type.ad6: type = pattern_type %impl.elem0.560 [symbolic] -// CHECK:STDOUT: %.a8e: Core.Form = init_form %impl.elem0.560 [symbolic] -// CHECK:STDOUT: %GenericCallF.type: type = fn_type @GenericCallF [concrete] -// CHECK:STDOUT: %GenericCallF: %GenericCallF.type = struct_value () [concrete] -// CHECK:STDOUT: %require_complete.bee: = require_complete_type %T.as_type [symbolic] -// CHECK:STDOUT: %require_complete.06a: = require_complete_type %impl.elem0.560 [symbolic] -// CHECK:STDOUT: %.43f: type = fn_type_with_self_type %J.WithSelf.F.type.41f, %T [symbolic] -// CHECK:STDOUT: %impl.elem1: %.43f = impl_witness_access %J.lookup_impl_witness.264, element1 [symbolic] -// CHECK:STDOUT: %specific_impl_fn: = specific_impl_function %impl.elem1, @J.WithSelf.F(%T) [symbolic] -// CHECK:STDOUT: %CallGeneric.type: type = fn_type @CallGeneric [concrete] -// CHECK:STDOUT: %CallGeneric: %CallGeneric.type = struct_value () [concrete] -// CHECK:STDOUT: %GenericCallF.specific_fn: = specific_function %GenericCallF, @GenericCallF(%J.facet) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { -// CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { -// CHECK:STDOUT: .Int = %Core.Int -// CHECK:STDOUT: .Negate = %Core.Negate -// CHECK:STDOUT: .ImplicitAs = %Core.ImplicitAs -// CHECK:STDOUT: import Core//prelude -// CHECK:STDOUT: import Core//prelude/... -// CHECK:STDOUT: } -// CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/parts/int, Int, loaded [concrete = constants.%Int.generic] -// CHECK:STDOUT: %Core.Negate: type = import_ref Core//prelude/parts/int_literal, Negate, loaded [concrete = constants.%Negate.type] -// CHECK:STDOUT: %Core.import_ref.475 = import_ref Core//prelude/parts/int, loc{{\d+_\d+}}, unloaded -// CHECK:STDOUT: %Core.import_ref.f8a: @Int.as.Negate.impl.%Int.as.Negate.impl.Op.type (%Int.as.Negate.impl.Op.type.c73) = import_ref Core//prelude/parts/int, loc{{\d+_\d+}}, loaded [symbolic = @Int.as.Negate.impl.%Int.as.Negate.impl.Op (constants.%Int.as.Negate.impl.Op.a66)] -// CHECK:STDOUT: %Negate.impl_witness_table = impl_witness_table (%Core.import_ref.475, %Core.import_ref.f8a), @Int.as.Negate.impl [concrete] -// CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.cc7 = import_ref Core//prelude/parts/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic] // CHECK:STDOUT: %Core.import_ref.70a: @Core.IntLiteral.as.ImplicitAs.impl.%Core.IntLiteral.as.ImplicitAs.impl.Convert.type (%Core.IntLiteral.as.ImplicitAs.impl.Convert.type.f67) = import_ref Core//prelude/parts/int, loc{{\d+_\d+}}, loaded [symbolic = @Core.IntLiteral.as.ImplicitAs.impl.%Core.IntLiteral.as.ImplicitAs.impl.Convert (constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.8fd)] // CHECK:STDOUT: %ImplicitAs.impl_witness_table.82d = impl_witness_table (%Core.import_ref.70a), @Core.IntLiteral.as.ImplicitAs.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: file { -// CHECK:STDOUT: package: = namespace [concrete] { -// CHECK:STDOUT: .Core = imports.%Core -// CHECK:STDOUT: .J = %J.decl -// CHECK:STDOUT: .E = %E.decl -// CHECK:STDOUT: .CallBoth = %CallBoth.decl -// CHECK:STDOUT: .GenericCallF = %GenericCallF.decl -// CHECK:STDOUT: .CallGeneric = %CallGeneric.decl -// CHECK:STDOUT: } -// CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %J.decl: type = interface_decl @J [concrete = constants.%J.type] {} {} -// CHECK:STDOUT: %E.decl: type = class_decl @E [concrete = constants.%E] {} {} -// CHECK:STDOUT: %CallBoth.decl: %CallBoth.type = fn_decl @CallBoth [concrete = constants.%CallBoth] { -// CHECK:STDOUT: %e.param_patt: %pattern_type.99f = value_param_pattern [concrete] -// CHECK:STDOUT: %e.patt: %pattern_type.99f = at_binding_pattern e, %e.param_patt [concrete] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %e.param: %E = value_param call_param0 -// CHECK:STDOUT: %E.ref.loc20: type = name_ref E, file.%E.decl [concrete = constants.%E] -// CHECK:STDOUT: %e: %E = value_binding e, %e.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %GenericCallF.decl: %GenericCallF.type = fn_decl @GenericCallF [concrete = constants.%GenericCallF] { -// CHECK:STDOUT: %T.patt: %pattern_type.f76 = symbolic_binding_pattern T, 0 [concrete] -// CHECK:STDOUT: %t.param_patt: @GenericCallF.%pattern_type.loc28_25 (%pattern_type.5a3) = value_param_pattern [concrete] -// CHECK:STDOUT: %t.patt: @GenericCallF.%pattern_type.loc28_25 (%pattern_type.5a3) = at_binding_pattern t, %t.param_patt [concrete] -// CHECK:STDOUT: %u.param_patt: @GenericCallF.%pattern_type.loc28_31 (%pattern_type.ad6) = value_param_pattern [concrete] -// CHECK:STDOUT: %u.patt: @GenericCallF.%pattern_type.loc28_31 (%pattern_type.ad6) = at_binding_pattern u, %u.param_patt [concrete] -// CHECK:STDOUT: %return.param_patt: @GenericCallF.%pattern_type.loc28_31 (%pattern_type.ad6) = out_param_pattern [concrete] -// CHECK:STDOUT: %return.patt: @GenericCallF.%pattern_type.loc28_31 (%pattern_type.ad6) = return_slot_pattern %return.param_patt, %impl.elem0.loc28_42 [concrete] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %T.ref.loc28_41: %J.type = name_ref T, %T.loc28_18.2 [symbolic = %T.loc28_18.1 (constants.%T)] -// CHECK:STDOUT: %T.as_type.loc28_42: type = facet_access_type %T.ref.loc28_41 [symbolic = %T.as_type.loc28_27.1 (constants.%T.as_type)] -// CHECK:STDOUT: %.loc28_42.3: type = converted %T.ref.loc28_41, %T.as_type.loc28_42 [symbolic = %T.as_type.loc28_27.1 (constants.%T.as_type)] -// CHECK:STDOUT: %U.ref.loc28_42: %J.assoc_type = name_ref U, @U.%assoc0 [concrete = constants.%assoc0.ebd] -// CHECK:STDOUT: %impl.elem0.loc28_42: type = impl_witness_access constants.%J.lookup_impl_witness.264, element0 [symbolic = %impl.elem0.loc28_34.1 (constants.%impl.elem0.560)] -// CHECK:STDOUT: %.loc28_42.4: Core.Form = init_form %impl.elem0.loc28_42 [symbolic = %.loc28_42.2 (constants.%.a8e)] -// CHECK:STDOUT: %.loc28_21: type = splice_block %J.ref [concrete = constants.%J.type] { -// CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.c39] -// CHECK:STDOUT: %J.ref: type = name_ref J, file.%J.decl [concrete = constants.%J.type] -// CHECK:STDOUT: } -// CHECK:STDOUT: %T.loc28_18.2: %J.type = symbolic_binding T, 0 [symbolic = %T.loc28_18.1 (constants.%T)] -// CHECK:STDOUT: %t.param: @GenericCallF.%T.as_type.loc28_27.1 (%T.as_type) = value_param call_param0 -// CHECK:STDOUT: %.loc28_27.1: type = splice_block %.loc28_27.2 [symbolic = %T.as_type.loc28_27.1 (constants.%T.as_type)] { -// CHECK:STDOUT: %T.ref.loc28_27: %J.type = name_ref T, %T.loc28_18.2 [symbolic = %T.loc28_18.1 (constants.%T)] -// CHECK:STDOUT: %T.as_type.loc28_27.2: type = facet_access_type %T.ref.loc28_27 [symbolic = %T.as_type.loc28_27.1 (constants.%T.as_type)] -// CHECK:STDOUT: %.loc28_27.2: type = converted %T.ref.loc28_27, %T.as_type.loc28_27.2 [symbolic = %T.as_type.loc28_27.1 (constants.%T.as_type)] -// CHECK:STDOUT: } -// CHECK:STDOUT: %t: @GenericCallF.%T.as_type.loc28_27.1 (%T.as_type) = value_binding t, %t.param -// CHECK:STDOUT: %u.param: @GenericCallF.%impl.elem0.loc28_34.1 (%impl.elem0.560) = value_param call_param1 -// CHECK:STDOUT: %.loc28_34.1: type = splice_block %impl.elem0.loc28_34.2 [symbolic = %impl.elem0.loc28_34.1 (constants.%impl.elem0.560)] { -// CHECK:STDOUT: %T.ref.loc28_33: %J.type = name_ref T, %T.loc28_18.2 [symbolic = %T.loc28_18.1 (constants.%T)] -// CHECK:STDOUT: %T.as_type.loc28_34: type = facet_access_type %T.ref.loc28_33 [symbolic = %T.as_type.loc28_27.1 (constants.%T.as_type)] -// CHECK:STDOUT: %.loc28_34.2: type = converted %T.ref.loc28_33, %T.as_type.loc28_34 [symbolic = %T.as_type.loc28_27.1 (constants.%T.as_type)] -// CHECK:STDOUT: %U.ref.loc28_34: %J.assoc_type = name_ref U, @U.%assoc0 [concrete = constants.%assoc0.ebd] -// CHECK:STDOUT: %impl.elem0.loc28_34.2: type = impl_witness_access constants.%J.lookup_impl_witness.264, element0 [symbolic = %impl.elem0.loc28_34.1 (constants.%impl.elem0.560)] -// CHECK:STDOUT: } -// CHECK:STDOUT: %u: @GenericCallF.%impl.elem0.loc28_34.1 (%impl.elem0.560) = value_binding u, %u.param -// CHECK:STDOUT: %return.param: ref @GenericCallF.%impl.elem0.loc28_34.1 (%impl.elem0.560) = out_param call_param2 -// CHECK:STDOUT: %return: ref @GenericCallF.%impl.elem0.loc28_34.1 (%impl.elem0.560) = return_slot %return.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %CallGeneric.decl: %CallGeneric.type = fn_decl @CallGeneric [concrete = constants.%CallGeneric] { -// CHECK:STDOUT: %e.param_patt: %pattern_type.99f = value_param_pattern [concrete] -// CHECK:STDOUT: %e.patt: %pattern_type.99f = at_binding_pattern e, %e.param_patt [concrete] -// CHECK:STDOUT: %return.param_patt: %pattern_type.7ce = out_param_pattern [concrete] -// CHECK:STDOUT: %return.patt: %pattern_type.7ce = return_slot_pattern %return.param_patt, %i32 [concrete] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %i32: type = type_literal constants.%i32 [concrete = constants.%i32] -// CHECK:STDOUT: %.loc32: Core.Form = init_form %i32 [concrete = constants.%.ff5] -// CHECK:STDOUT: %e.param: %E = value_param call_param0 -// CHECK:STDOUT: %E.ref: type = name_ref E, file.%E.decl [concrete = constants.%E] -// CHECK:STDOUT: %e: %E = value_binding e, %e.param -// CHECK:STDOUT: %return.param: ref %i32 = out_param call_param1 -// CHECK:STDOUT: %return: ref %i32 = return_slot %return.param -// CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: interface @J { -// CHECK:STDOUT: %Self: %J.type = symbolic_binding Self, 0 [symbolic = constants.%Self.8a1] -// CHECK:STDOUT: %J.WithSelf.decl = interface_with_self_decl @J [concrete] -// CHECK:STDOUT: -// CHECK:STDOUT: !with Self: -// CHECK:STDOUT: %U: type = assoc_const_decl @U [concrete] { -// CHECK:STDOUT: %assoc0: %J.assoc_type = assoc_entity element0, @J.WithSelf.%U [concrete = constants.%assoc0.ebd] -// CHECK:STDOUT: } -// CHECK:STDOUT: %J.WithSelf.F.decl: @J.WithSelf.%J.WithSelf.F.type (%J.WithSelf.F.type.adb) = fn_decl @J.WithSelf.F [symbolic = @J.WithSelf.%J.WithSelf.F (constants.%J.WithSelf.F.569)] { -// CHECK:STDOUT: %u.param_patt: @J.WithSelf.F.%pattern_type (%pattern_type.c1a) = value_param_pattern [concrete] -// CHECK:STDOUT: %u.patt: @J.WithSelf.F.%pattern_type (%pattern_type.c1a) = at_binding_pattern u, %u.param_patt [concrete] -// CHECK:STDOUT: %return.param_patt: @J.WithSelf.F.%pattern_type (%pattern_type.c1a) = out_param_pattern [concrete] -// CHECK:STDOUT: %return.patt: @J.WithSelf.F.%pattern_type (%pattern_type.c1a) = return_slot_pattern %return.param_patt, %U.ref.loc5_17 [concrete] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %impl.elem0.loc5_17: type = impl_witness_access constants.%J.lookup_impl_witness.89e, element0 [symbolic = %impl.elem0.loc5_11.1 (constants.%impl.elem0.335)] -// CHECK:STDOUT: %U.ref.loc5_17: type = name_ref U, %impl.elem0.loc5_17 [symbolic = %impl.elem0.loc5_11.1 (constants.%impl.elem0.335)] -// CHECK:STDOUT: %.loc5_17.2: Core.Form = init_form %U.ref.loc5_17 [symbolic = %.loc5_17.1 (constants.%.77f)] -// CHECK:STDOUT: %u.param: @J.WithSelf.F.%impl.elem0.loc5_11.1 (%impl.elem0.335) = value_param call_param0 -// CHECK:STDOUT: %.loc5_11: type = splice_block %U.ref.loc5_11 [symbolic = %impl.elem0.loc5_11.1 (constants.%impl.elem0.335)] { -// CHECK:STDOUT: %impl.elem0.loc5_11.2: type = impl_witness_access constants.%J.lookup_impl_witness.89e, element0 [symbolic = %impl.elem0.loc5_11.1 (constants.%impl.elem0.335)] -// CHECK:STDOUT: %U.ref.loc5_11: type = name_ref U, %impl.elem0.loc5_11.2 [symbolic = %impl.elem0.loc5_11.1 (constants.%impl.elem0.335)] -// CHECK:STDOUT: } -// CHECK:STDOUT: %u: @J.WithSelf.F.%impl.elem0.loc5_11.1 (%impl.elem0.335) = value_binding u, %u.param -// CHECK:STDOUT: %return.param: ref @J.WithSelf.F.%impl.elem0.loc5_11.1 (%impl.elem0.335) = out_param call_param1 -// CHECK:STDOUT: %return: ref @J.WithSelf.F.%impl.elem0.loc5_11.1 (%impl.elem0.335) = return_slot %return.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %assoc1: %J.assoc_type = assoc_entity element1, %J.WithSelf.F.decl [concrete = constants.%assoc1.eeb] -// CHECK:STDOUT: %J.WithSelf.G.decl: @J.WithSelf.%J.WithSelf.G.type (%J.WithSelf.G.type.ace) = fn_decl @J.WithSelf.G [symbolic = @J.WithSelf.%J.WithSelf.G (constants.%J.WithSelf.G.6e7)] { -// CHECK:STDOUT: %self.param_patt: @J.WithSelf.G.%pattern_type.loc6_12 (%pattern_type.909) = value_param_pattern [concrete] -// CHECK:STDOUT: %self.patt: @J.WithSelf.G.%pattern_type.loc6_12 (%pattern_type.909) = at_binding_pattern self, %self.param_patt [concrete] -// CHECK:STDOUT: %v.param_patt: @J.WithSelf.G.%pattern_type.loc6_21 (%pattern_type.c1a) = value_param_pattern [concrete] -// CHECK:STDOUT: %v.patt: @J.WithSelf.G.%pattern_type.loc6_21 (%pattern_type.c1a) = at_binding_pattern v, %v.param_patt [concrete] -// CHECK:STDOUT: %return.param_patt: @J.WithSelf.G.%pattern_type.loc6_21 (%pattern_type.c1a) = out_param_pattern [concrete] -// CHECK:STDOUT: %return.patt: @J.WithSelf.G.%pattern_type.loc6_21 (%pattern_type.c1a) = return_slot_pattern %return.param_patt, %U.ref.loc6_29 [concrete] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %impl.elem0.loc6_29: type = impl_witness_access constants.%J.lookup_impl_witness.89e, element0 [symbolic = %impl.elem0.loc6_23.1 (constants.%impl.elem0.335)] -// CHECK:STDOUT: %U.ref.loc6_29: type = name_ref U, %impl.elem0.loc6_29 [symbolic = %impl.elem0.loc6_23.1 (constants.%impl.elem0.335)] -// CHECK:STDOUT: %.loc6_29.2: Core.Form = init_form %U.ref.loc6_29 [symbolic = %.loc6_29.1 (constants.%.77f)] -// CHECK:STDOUT: %self.param: @J.WithSelf.G.%Self.as_type.loc6_14.1 (%Self.as_type.9ea) = value_param call_param0 -// CHECK:STDOUT: %.loc6_14.1: type = splice_block %.loc6_14.2 [symbolic = %Self.as_type.loc6_14.1 (constants.%Self.as_type.9ea)] { -// CHECK:STDOUT: %Self.ref: %J.type = name_ref Self, @J.%Self [symbolic = %Self (constants.%Self.8a1)] -// CHECK:STDOUT: %Self.as_type.loc6_14.2: type = facet_access_type %Self.ref [symbolic = %Self.as_type.loc6_14.1 (constants.%Self.as_type.9ea)] -// CHECK:STDOUT: %.loc6_14.2: type = converted %Self.ref, %Self.as_type.loc6_14.2 [symbolic = %Self.as_type.loc6_14.1 (constants.%Self.as_type.9ea)] -// CHECK:STDOUT: } -// CHECK:STDOUT: %self: @J.WithSelf.G.%Self.as_type.loc6_14.1 (%Self.as_type.9ea) = value_binding self, %self.param -// CHECK:STDOUT: %v.param: @J.WithSelf.G.%impl.elem0.loc6_23.1 (%impl.elem0.335) = value_param call_param1 -// CHECK:STDOUT: %.loc6_23: type = splice_block %U.ref.loc6_23 [symbolic = %impl.elem0.loc6_23.1 (constants.%impl.elem0.335)] { -// CHECK:STDOUT: %impl.elem0.loc6_23.2: type = impl_witness_access constants.%J.lookup_impl_witness.89e, element0 [symbolic = %impl.elem0.loc6_23.1 (constants.%impl.elem0.335)] -// CHECK:STDOUT: %U.ref.loc6_23: type = name_ref U, %impl.elem0.loc6_23.2 [symbolic = %impl.elem0.loc6_23.1 (constants.%impl.elem0.335)] -// CHECK:STDOUT: } -// CHECK:STDOUT: %v: @J.WithSelf.G.%impl.elem0.loc6_23.1 (%impl.elem0.335) = value_binding v, %v.param -// CHECK:STDOUT: %return.param: ref @J.WithSelf.G.%impl.elem0.loc6_23.1 (%impl.elem0.335) = out_param call_param2 -// CHECK:STDOUT: %return: ref @J.WithSelf.G.%impl.elem0.loc6_23.1 (%impl.elem0.335) = return_slot %return.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %assoc2: %J.assoc_type = assoc_entity element2, %J.WithSelf.G.decl [concrete = constants.%assoc2] -// CHECK:STDOUT: -// CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = %Self -// CHECK:STDOUT: .U = @U.%assoc0 -// CHECK:STDOUT: .F = @J.WithSelf.%assoc1 -// CHECK:STDOUT: .G = @J.WithSelf.%assoc2 -// CHECK:STDOUT: witness = (@J.WithSelf.%U, @J.WithSelf.%J.WithSelf.F.decl, @J.WithSelf.%J.WithSelf.G.decl) -// CHECK:STDOUT: -// CHECK:STDOUT: !requires: -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: impl @E.as.J.impl: %Self.ref as %.loc10_20 { -// CHECK:STDOUT: %E.as.J.impl.F.decl: %E.as.J.impl.F.type = fn_decl @E.as.J.impl.F [concrete = constants.%E.as.J.impl.F] { -// CHECK:STDOUT: %u.param_patt: %pattern_type.7ce = value_param_pattern [concrete] -// CHECK:STDOUT: %u.patt: %pattern_type.7ce = at_binding_pattern u, %u.param_patt [concrete] -// CHECK:STDOUT: %return.param_patt: %pattern_type.7ce = out_param_pattern [concrete] -// CHECK:STDOUT: %return.patt: %pattern_type.7ce = return_slot_pattern %return.param_patt, %i32.loc11_21 [concrete] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %i32.loc11_21: type = type_literal constants.%i32 [concrete = constants.%i32] -// CHECK:STDOUT: %.loc11: Core.Form = init_form %i32.loc11_21 [concrete = constants.%.ff5] -// CHECK:STDOUT: %u.param: %i32 = value_param call_param0 -// CHECK:STDOUT: %i32.loc11_13: type = type_literal constants.%i32 [concrete = constants.%i32] -// CHECK:STDOUT: %u: %i32 = value_binding u, %u.param -// CHECK:STDOUT: %return.param: ref %i32 = out_param call_param1 -// CHECK:STDOUT: %return: ref %i32 = return_slot %return.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %E.as.J.impl.G.decl: %E.as.J.impl.G.type = fn_decl @E.as.J.impl.G [concrete = constants.%E.as.J.impl.G] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.99f = value_param_pattern [concrete] -// CHECK:STDOUT: %self.patt: %pattern_type.99f = at_binding_pattern self, %self.param_patt [concrete] -// CHECK:STDOUT: %v.param_patt: %pattern_type.7ce = value_param_pattern [concrete] -// CHECK:STDOUT: %v.patt: %pattern_type.7ce = at_binding_pattern v, %v.param_patt [concrete] -// CHECK:STDOUT: %return.param_patt: %pattern_type.7ce = out_param_pattern [concrete] -// CHECK:STDOUT: %return.patt: %pattern_type.7ce = return_slot_pattern %return.param_patt, %i32.loc14_40 [concrete] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %i32.loc14_40: type = type_literal constants.%i32 [concrete = constants.%i32] -// CHECK:STDOUT: %.loc14: Core.Form = init_form %i32.loc14_40 [concrete = constants.%.ff5] -// CHECK:STDOUT: %self.param: %E = value_param call_param0 -// CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%E [concrete = constants.%E] -// CHECK:STDOUT: %self: %E = value_binding self, %self.param -// CHECK:STDOUT: %v.param: %i32 = value_param call_param1 -// CHECK:STDOUT: %i32.loc14_32: type = type_literal constants.%i32 [concrete = constants.%i32] -// CHECK:STDOUT: %v: %i32 = value_binding v, %v.param -// CHECK:STDOUT: %return.param: ref %i32 = out_param call_param2 -// CHECK:STDOUT: %return: ref %i32 = return_slot %return.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %J.impl_witness_table = impl_witness_table (%impl_witness_assoc_constant, %E.as.J.impl.F.decl, %E.as.J.impl.G.decl), @E.as.J.impl [concrete] -// CHECK:STDOUT: %J.impl_witness: = impl_witness %J.impl_witness_table [concrete = constants.%J.impl_witness] -// CHECK:STDOUT: %impl_witness_assoc_constant: type = impl_witness_assoc_constant constants.%i32 [concrete = constants.%i32] -// CHECK:STDOUT: -// CHECK:STDOUT: !members: -// CHECK:STDOUT: .F = %E.as.J.impl.F.decl -// CHECK:STDOUT: .G = %E.as.J.impl.G.decl -// CHECK:STDOUT: witness = %J.impl_witness -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: class @E { -// CHECK:STDOUT: impl_decl @E.as.J.impl [concrete] {} { -// CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%E [concrete = constants.%E] -// CHECK:STDOUT: %J.ref: type = name_ref J, file.%J.decl [concrete = constants.%J.type] -// CHECK:STDOUT: %.Self: %J.type = symbolic_binding .Self [symbolic_self = constants.%.Self.2fa] -// CHECK:STDOUT: %.Self.ref: %J.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self.2fa] -// CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref [symbolic_self = constants.%.Self.as_type] -// CHECK:STDOUT: %.loc10_26: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.as_type] -// CHECK:STDOUT: %U.ref: %J.assoc_type = name_ref U, @U.%assoc0 [concrete = constants.%assoc0.ebd] -// CHECK:STDOUT: %impl.elem0: type = impl_witness_access constants.%J.lookup_impl_witness.46a, element0 [symbolic_self = constants.%impl.elem0.a58] -// CHECK:STDOUT: %i32: type = type_literal constants.%i32 [concrete = constants.%i32] -// CHECK:STDOUT: %.loc10_20: type = where_expr [concrete = constants.%J_where.type] { -// CHECK:STDOUT: requirement_base_facet_type %J.ref -// CHECK:STDOUT: requirement_rewrite %impl.elem0, %i32 -// CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: %complete_type: = complete_type_witness constants.%empty_struct_type [concrete = constants.%complete_type.357] -// CHECK:STDOUT: complete_type_witness = %complete_type -// CHECK:STDOUT: -// CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = constants.%E -// CHECK:STDOUT: .J = -// CHECK:STDOUT: .F = -// CHECK:STDOUT: .G = -// CHECK:STDOUT: extend @E.as.J.impl.%.loc10_20 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generic fn @J.WithSelf.F(@J.%Self: %J.type) { -// CHECK:STDOUT: %Self: %J.type = symbolic_binding Self, 0 [symbolic = %Self (constants.%Self.8a1)] -// CHECK:STDOUT: %J.lookup_impl_witness: = lookup_impl_witness %Self, @J [symbolic = %J.lookup_impl_witness (constants.%J.lookup_impl_witness.89e)] -// CHECK:STDOUT: %impl.elem0.loc5_11.1: type = impl_witness_access %J.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc5_11.1 (constants.%impl.elem0.335)] -// CHECK:STDOUT: %pattern_type: type = pattern_type %impl.elem0.loc5_11.1 [symbolic = %pattern_type (constants.%pattern_type.c1a)] -// CHECK:STDOUT: %.loc5_17.1: Core.Form = init_form %impl.elem0.loc5_11.1 [symbolic = %.loc5_17.1 (constants.%.77f)] -// CHECK:STDOUT: -// CHECK:STDOUT: fn(%u.param: @J.WithSelf.F.%impl.elem0.loc5_11.1 (%impl.elem0.335)) -> out %return.param: @J.WithSelf.F.%impl.elem0.loc5_11.1 (%impl.elem0.335); -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generic fn @J.WithSelf.G(@J.%Self: %J.type) { -// CHECK:STDOUT: %Self: %J.type = symbolic_binding Self, 0 [symbolic = %Self (constants.%Self.8a1)] -// CHECK:STDOUT: %Self.as_type.loc6_14.1: type = facet_access_type %Self [symbolic = %Self.as_type.loc6_14.1 (constants.%Self.as_type.9ea)] -// CHECK:STDOUT: %pattern_type.loc6_12: type = pattern_type %Self.as_type.loc6_14.1 [symbolic = %pattern_type.loc6_12 (constants.%pattern_type.909)] -// CHECK:STDOUT: %J.lookup_impl_witness: = lookup_impl_witness %Self, @J [symbolic = %J.lookup_impl_witness (constants.%J.lookup_impl_witness.89e)] -// CHECK:STDOUT: %impl.elem0.loc6_23.1: type = impl_witness_access %J.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc6_23.1 (constants.%impl.elem0.335)] -// CHECK:STDOUT: %pattern_type.loc6_21: type = pattern_type %impl.elem0.loc6_23.1 [symbolic = %pattern_type.loc6_21 (constants.%pattern_type.c1a)] -// CHECK:STDOUT: %.loc6_29.1: Core.Form = init_form %impl.elem0.loc6_23.1 [symbolic = %.loc6_29.1 (constants.%.77f)] -// CHECK:STDOUT: -// CHECK:STDOUT: fn(%self.param: @J.WithSelf.G.%Self.as_type.loc6_14.1 (%Self.as_type.9ea), %v.param: @J.WithSelf.G.%impl.elem0.loc6_23.1 (%impl.elem0.335)) -> out %return.param: @J.WithSelf.G.%impl.elem0.loc6_23.1 (%impl.elem0.335); -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @E.as.J.impl.F(%u.param: %i32) -> out %return.param: %i32 { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %u.ref: %i32 = name_ref u, %u -// CHECK:STDOUT: %impl.elem1: %.b16 = impl_witness_access constants.%Negate.impl_witness.536, element1 [concrete = constants.%Int.as.Negate.impl.Op.619] -// CHECK:STDOUT: %bound_method.loc12_14.1: = bound_method %u.ref, %impl.elem1 -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem1, @Int.as.Negate.impl.Op(constants.%int_32) [concrete = constants.%Int.as.Negate.impl.Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc12_14.2: = bound_method %u.ref, %specific_fn -// CHECK:STDOUT: %Int.as.Negate.impl.Op.call: init %i32 = call %bound_method.loc12_14.2(%u.ref) -// CHECK:STDOUT: return %Int.as.Negate.impl.Op.call -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @E.as.J.impl.G(%self.param: %E, %v.param: %i32) -> out %return.param: %i32 { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %v.ref: %i32 = name_ref v, %v -// CHECK:STDOUT: %impl.elem1: %.b16 = impl_witness_access constants.%Negate.impl_witness.536, element1 [concrete = constants.%Int.as.Negate.impl.Op.619] -// CHECK:STDOUT: %bound_method.loc15_14.1: = bound_method %v.ref, %impl.elem1 -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem1, @Int.as.Negate.impl.Op(constants.%int_32) [concrete = constants.%Int.as.Negate.impl.Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc15_14.2: = bound_method %v.ref, %specific_fn -// CHECK:STDOUT: %Int.as.Negate.impl.Op.call: init %i32 = call %bound_method.loc15_14.2(%v.ref) -// CHECK:STDOUT: return %Int.as.Negate.impl.Op.call -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: fn @CallBoth(%e.param: %E) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: name_binding_decl { // CHECK:STDOUT: %e1.patt: %pattern_type.7ce = value_binding_pattern e1 [concrete] // CHECK:STDOUT: } -// CHECK:STDOUT: %e.ref.loc21: %E = name_ref e, %e -// CHECK:STDOUT: %F.ref.loc21: %J.assoc_type = name_ref F, @J.WithSelf.%assoc1 [concrete = constants.%assoc1.eeb] -// CHECK:STDOUT: %impl.elem1.loc21: %.ff2 = impl_witness_access constants.%J.impl_witness, element1 [concrete = constants.%E.as.J.impl.F] +// CHECK:STDOUT: %e.ref.loc22: %E = name_ref e, %e +// CHECK:STDOUT: %F.ref.loc22: %J.assoc_type = name_ref F, @J.WithSelf.%assoc1 [concrete = constants.%assoc1.eeb] +// CHECK:STDOUT: %impl.elem1.loc22: %.ff2 = impl_witness_access constants.%J.impl_witness, element1 [concrete = constants.%E.as.J.impl.F] // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc] -// CHECK:STDOUT: %impl.elem0.loc21: %.9db = impl_witness_access constants.%ImplicitAs.impl_witness.ac5, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.f1a] -// CHECK:STDOUT: %bound_method.loc21_28.1: = bound_method %int_2, %impl.elem0.loc21 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.9cb] -// CHECK:STDOUT: %specific_fn.loc21: = specific_function %impl.elem0.loc21, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] -// CHECK:STDOUT: %bound_method.loc21_28.2: = bound_method %int_2, %specific_fn.loc21 [concrete = constants.%bound_method.419] -// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc21: init %i32 = call %bound_method.loc21_28.2(%int_2) [concrete = constants.%int_2.ef8] -// CHECK:STDOUT: %.loc21_28.1: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc21 [concrete = constants.%int_2.ef8] -// CHECK:STDOUT: %.loc21_28.2: %i32 = converted %int_2, %.loc21_28.1 [concrete = constants.%int_2.ef8] -// CHECK:STDOUT: %E.as.J.impl.F.call.loc21: init %i32 = call %impl.elem1.loc21(%.loc21_28.2) -// CHECK:STDOUT: %i32.loc21: type = type_literal constants.%i32 [concrete = constants.%i32] -// CHECK:STDOUT: %.loc21_29.1: %i32 = value_of_initializer %E.as.J.impl.F.call.loc21 -// CHECK:STDOUT: %.loc21_29.2: %i32 = converted %E.as.J.impl.F.call.loc21, %.loc21_29.1 -// CHECK:STDOUT: %e1: %i32 = value_binding e1, %.loc21_29.2 +// CHECK:STDOUT: %impl.elem0.loc22: %.9db = impl_witness_access constants.%ImplicitAs.impl_witness.ac5, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.f1a] +// CHECK:STDOUT: %bound_method.loc22_28.1: = bound_method %int_2, %impl.elem0.loc22 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.9cb] +// CHECK:STDOUT: %specific_fn.loc22: = specific_function %impl.elem0.loc22, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] +// CHECK:STDOUT: %bound_method.loc22_28.2: = bound_method %int_2, %specific_fn.loc22 [concrete = constants.%bound_method.419] +// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc22: init %i32 = call %bound_method.loc22_28.2(%int_2) [concrete = constants.%int_2.ef8] +// CHECK:STDOUT: %.loc22_28.1: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc22 [concrete = constants.%int_2.ef8] +// CHECK:STDOUT: %.loc22_28.2: %i32 = converted %int_2, %.loc22_28.1 [concrete = constants.%int_2.ef8] +// CHECK:STDOUT: %E.as.J.impl.F.call.loc22: init %i32 = call %impl.elem1.loc22(%.loc22_28.2) +// CHECK:STDOUT: %i32.loc22: type = type_literal constants.%i32 [concrete = constants.%i32] +// CHECK:STDOUT: %.loc22_29.1: %i32 = value_of_initializer %E.as.J.impl.F.call.loc22 +// CHECK:STDOUT: %.loc22_29.2: %i32 = converted %E.as.J.impl.F.call.loc22, %.loc22_29.1 +// CHECK:STDOUT: %e1: %i32 = value_binding e1, %.loc22_29.2 // CHECK:STDOUT: name_binding_decl { // CHECK:STDOUT: %e2.patt: %pattern_type.7ce = value_binding_pattern e2 [concrete] // CHECK:STDOUT: } -// CHECK:STDOUT: %e.ref.loc22: %E = name_ref e, %e -// CHECK:STDOUT: %G.ref.loc22: %J.assoc_type = name_ref G, @J.WithSelf.%assoc2 [concrete = constants.%assoc2] -// CHECK:STDOUT: %impl.elem2.loc22: %.825 = impl_witness_access constants.%J.impl_witness, element2 [concrete = constants.%E.as.J.impl.G] -// CHECK:STDOUT: %bound_method.loc22_25: = bound_method %e.ref.loc22, %impl.elem2.loc22 +// CHECK:STDOUT: %e.ref.loc23: %E = name_ref e, %e +// CHECK:STDOUT: %G.ref.loc23: %J.assoc_type = name_ref G, @J.WithSelf.%assoc2 [concrete = constants.%assoc2] +// CHECK:STDOUT: %impl.elem2.loc23: %.825 = impl_witness_access constants.%J.impl_witness, element2 [concrete = constants.%E.as.J.impl.G] +// CHECK:STDOUT: %bound_method.loc23_25: = bound_method %e.ref.loc23, %impl.elem2.loc23 // CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [concrete = constants.%int_3.1ba] -// CHECK:STDOUT: %impl.elem0.loc22: %.9db = impl_witness_access constants.%ImplicitAs.impl_witness.ac5, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.f1a] -// CHECK:STDOUT: %bound_method.loc22_28.1: = bound_method %int_3, %impl.elem0.loc22 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.aca] -// CHECK:STDOUT: %specific_fn.loc22: = specific_function %impl.elem0.loc22, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] -// CHECK:STDOUT: %bound_method.loc22_28.2: = bound_method %int_3, %specific_fn.loc22 [concrete = constants.%bound_method.5b5] -// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc22: init %i32 = call %bound_method.loc22_28.2(%int_3) [concrete = constants.%int_3.822] -// CHECK:STDOUT: %.loc22_28.1: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc22 [concrete = constants.%int_3.822] -// CHECK:STDOUT: %.loc22_28.2: %i32 = converted %int_3, %.loc22_28.1 [concrete = constants.%int_3.822] -// CHECK:STDOUT: %E.as.J.impl.G.call.loc22: init %i32 = call %bound_method.loc22_25(%e.ref.loc22, %.loc22_28.2) -// CHECK:STDOUT: %i32.loc22: type = type_literal constants.%i32 [concrete = constants.%i32] -// CHECK:STDOUT: %.loc22_29.1: %i32 = value_of_initializer %E.as.J.impl.G.call.loc22 -// CHECK:STDOUT: %.loc22_29.2: %i32 = converted %E.as.J.impl.G.call.loc22, %.loc22_29.1 -// CHECK:STDOUT: %e2: %i32 = value_binding e2, %.loc22_29.2 +// CHECK:STDOUT: %impl.elem0.loc23: %.9db = impl_witness_access constants.%ImplicitAs.impl_witness.ac5, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.f1a] +// CHECK:STDOUT: %bound_method.loc23_28.1: = bound_method %int_3, %impl.elem0.loc23 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.aca] +// CHECK:STDOUT: %specific_fn.loc23: = specific_function %impl.elem0.loc23, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] +// CHECK:STDOUT: %bound_method.loc23_28.2: = bound_method %int_3, %specific_fn.loc23 [concrete = constants.%bound_method.5b5] +// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc23: init %i32 = call %bound_method.loc23_28.2(%int_3) [concrete = constants.%int_3.822] +// CHECK:STDOUT: %.loc23_28.1: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc23 [concrete = constants.%int_3.822] +// CHECK:STDOUT: %.loc23_28.2: %i32 = converted %int_3, %.loc23_28.1 [concrete = constants.%int_3.822] +// CHECK:STDOUT: %E.as.J.impl.G.call.loc23: init %i32 = call %bound_method.loc23_25(%e.ref.loc23, %.loc23_28.2) +// CHECK:STDOUT: %i32.loc23: type = type_literal constants.%i32 [concrete = constants.%i32] +// CHECK:STDOUT: %.loc23_29.1: %i32 = value_of_initializer %E.as.J.impl.G.call.loc23 +// CHECK:STDOUT: %.loc23_29.2: %i32 = converted %E.as.J.impl.G.call.loc23, %.loc23_29.1 +// CHECK:STDOUT: %e2: %i32 = value_binding e2, %.loc23_29.2 // CHECK:STDOUT: name_binding_decl { // CHECK:STDOUT: %e3.patt: %pattern_type.7ce = value_binding_pattern e3 [concrete] // CHECK:STDOUT: } -// CHECK:STDOUT: %E.ref.loc23: type = name_ref E, file.%E.decl [concrete = constants.%E] -// CHECK:STDOUT: %F.ref.loc23: %J.assoc_type = name_ref F, @J.WithSelf.%assoc1 [concrete = constants.%assoc1.eeb] -// CHECK:STDOUT: %impl.elem1.loc23: %.ff2 = impl_witness_access constants.%J.impl_witness, element1 [concrete = constants.%E.as.J.impl.F] +// CHECK:STDOUT: %E.ref.loc24: type = name_ref E, file.%E.decl [concrete = constants.%E] +// CHECK:STDOUT: %F.ref.loc24: %J.assoc_type = name_ref F, @J.WithSelf.%assoc1 [concrete = constants.%assoc1.eeb] +// CHECK:STDOUT: %impl.elem1.loc24: %.ff2 = impl_witness_access constants.%J.impl_witness, element1 [concrete = constants.%E.as.J.impl.F] // CHECK:STDOUT: %int_4: Core.IntLiteral = int_value 4 [concrete = constants.%int_4.0c1] -// CHECK:STDOUT: %impl.elem0.loc23: %.9db = impl_witness_access constants.%ImplicitAs.impl_witness.ac5, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.f1a] -// CHECK:STDOUT: %bound_method.loc23_28.1: = bound_method %int_4, %impl.elem0.loc23 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.cca] -// CHECK:STDOUT: %specific_fn.loc23: = specific_function %impl.elem0.loc23, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] -// CHECK:STDOUT: %bound_method.loc23_28.2: = bound_method %int_4, %specific_fn.loc23 [concrete = constants.%bound_method.ca9] -// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc23: init %i32 = call %bound_method.loc23_28.2(%int_4) [concrete = constants.%int_4.940] -// CHECK:STDOUT: %.loc23_28.1: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc23 [concrete = constants.%int_4.940] -// CHECK:STDOUT: %.loc23_28.2: %i32 = converted %int_4, %.loc23_28.1 [concrete = constants.%int_4.940] -// CHECK:STDOUT: %E.as.J.impl.F.call.loc23: init %i32 = call %impl.elem1.loc23(%.loc23_28.2) -// CHECK:STDOUT: %i32.loc23: type = type_literal constants.%i32 [concrete = constants.%i32] -// CHECK:STDOUT: %.loc23_29.1: %i32 = value_of_initializer %E.as.J.impl.F.call.loc23 -// CHECK:STDOUT: %.loc23_29.2: %i32 = converted %E.as.J.impl.F.call.loc23, %.loc23_29.1 -// CHECK:STDOUT: %e3: %i32 = value_binding e3, %.loc23_29.2 +// CHECK:STDOUT: %impl.elem0.loc24: %.9db = impl_witness_access constants.%ImplicitAs.impl_witness.ac5, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.f1a] +// CHECK:STDOUT: %bound_method.loc24_28.1: = bound_method %int_4, %impl.elem0.loc24 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.cca] +// CHECK:STDOUT: %specific_fn.loc24: = specific_function %impl.elem0.loc24, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] +// CHECK:STDOUT: %bound_method.loc24_28.2: = bound_method %int_4, %specific_fn.loc24 [concrete = constants.%bound_method.ca9] +// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc24: init %i32 = call %bound_method.loc24_28.2(%int_4) [concrete = constants.%int_4.940] +// CHECK:STDOUT: %.loc24_28.1: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc24 [concrete = constants.%int_4.940] +// CHECK:STDOUT: %.loc24_28.2: %i32 = converted %int_4, %.loc24_28.1 [concrete = constants.%int_4.940] +// CHECK:STDOUT: %E.as.J.impl.F.call.loc24: init %i32 = call %impl.elem1.loc24(%.loc24_28.2) +// CHECK:STDOUT: %i32.loc24: type = type_literal constants.%i32 [concrete = constants.%i32] +// CHECK:STDOUT: %.loc24_29.1: %i32 = value_of_initializer %E.as.J.impl.F.call.loc24 +// CHECK:STDOUT: %.loc24_29.2: %i32 = converted %E.as.J.impl.F.call.loc24, %.loc24_29.1 +// CHECK:STDOUT: %e3: %i32 = value_binding e3, %.loc24_29.2 // CHECK:STDOUT: name_binding_decl { // CHECK:STDOUT: %e4.patt: %pattern_type.7ce = value_binding_pattern e4 [concrete] // CHECK:STDOUT: } -// CHECK:STDOUT: %e.ref.loc24: %E = name_ref e, %e -// CHECK:STDOUT: %E.ref.loc24: type = name_ref E, file.%E.decl [concrete = constants.%E] -// CHECK:STDOUT: %G.ref.loc24: %J.assoc_type = name_ref G, @J.WithSelf.%assoc2 [concrete = constants.%assoc2] -// CHECK:STDOUT: %impl.elem2.loc24: %.825 = impl_witness_access constants.%J.impl_witness, element2 [concrete = constants.%E.as.J.impl.G] -// CHECK:STDOUT: %bound_method.loc24_25: = bound_method %e.ref.loc24, %impl.elem2.loc24 -// CHECK:STDOUT: %int_5: Core.IntLiteral = int_value 5 [concrete = constants.%int_5.64b] -// CHECK:STDOUT: %impl.elem0.loc24: %.9db = impl_witness_access constants.%ImplicitAs.impl_witness.ac5, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.f1a] -// CHECK:STDOUT: %bound_method.loc24_32.1: = bound_method %int_5, %impl.elem0.loc24 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.b65] -// CHECK:STDOUT: %specific_fn.loc24: = specific_function %impl.elem0.loc24, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] -// CHECK:STDOUT: %bound_method.loc24_32.2: = bound_method %int_5, %specific_fn.loc24 [concrete = constants.%bound_method.7a5] -// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc24: init %i32 = call %bound_method.loc24_32.2(%int_5) [concrete = constants.%int_5.0f6] -// CHECK:STDOUT: %.loc24_32.1: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc24 [concrete = constants.%int_5.0f6] -// CHECK:STDOUT: %.loc24_32.2: %i32 = converted %int_5, %.loc24_32.1 [concrete = constants.%int_5.0f6] -// CHECK:STDOUT: %E.as.J.impl.G.call.loc24: init %i32 = call %bound_method.loc24_25(%e.ref.loc24, %.loc24_32.2) -// CHECK:STDOUT: %i32.loc24: type = type_literal constants.%i32 [concrete = constants.%i32] -// CHECK:STDOUT: %.loc24_33.1: %i32 = value_of_initializer %E.as.J.impl.G.call.loc24 -// CHECK:STDOUT: %.loc24_33.2: %i32 = converted %E.as.J.impl.G.call.loc24, %.loc24_33.1 -// CHECK:STDOUT: %e4: %i32 = value_binding e4, %.loc24_33.2 -// CHECK:STDOUT: name_binding_decl { -// CHECK:STDOUT: %e5.patt: %pattern_type.7ce = value_binding_pattern e5 [concrete] -// CHECK:STDOUT: } // CHECK:STDOUT: %e.ref.loc25: %E = name_ref e, %e -// CHECK:STDOUT: %J.ref: type = name_ref J, file.%J.decl [concrete = constants.%J.type] +// CHECK:STDOUT: %E.ref.loc25: type = name_ref E, file.%E.decl [concrete = constants.%E] // CHECK:STDOUT: %G.ref.loc25: %J.assoc_type = name_ref G, @J.WithSelf.%assoc2 [concrete = constants.%assoc2] // CHECK:STDOUT: %impl.elem2.loc25: %.825 = impl_witness_access constants.%J.impl_witness, element2 [concrete = constants.%E.as.J.impl.G] // CHECK:STDOUT: %bound_method.loc25_25: = bound_method %e.ref.loc25, %impl.elem2.loc25 -// CHECK:STDOUT: %int_6: Core.IntLiteral = int_value 6 [concrete = constants.%int_6.462] +// CHECK:STDOUT: %int_5: Core.IntLiteral = int_value 5 [concrete = constants.%int_5.64b] // CHECK:STDOUT: %impl.elem0.loc25: %.9db = impl_witness_access constants.%ImplicitAs.impl_witness.ac5, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.f1a] -// CHECK:STDOUT: %bound_method.loc25_32.1: = bound_method %int_6, %impl.elem0.loc25 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.0b7] +// CHECK:STDOUT: %bound_method.loc25_32.1: = bound_method %int_5, %impl.elem0.loc25 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.b65] // CHECK:STDOUT: %specific_fn.loc25: = specific_function %impl.elem0.loc25, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] -// CHECK:STDOUT: %bound_method.loc25_32.2: = bound_method %int_6, %specific_fn.loc25 [concrete = constants.%bound_method.3ec] -// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc25: init %i32 = call %bound_method.loc25_32.2(%int_6) [concrete = constants.%int_6.e56] -// CHECK:STDOUT: %.loc25_32.1: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc25 [concrete = constants.%int_6.e56] -// CHECK:STDOUT: %.loc25_32.2: %i32 = converted %int_6, %.loc25_32.1 [concrete = constants.%int_6.e56] +// CHECK:STDOUT: %bound_method.loc25_32.2: = bound_method %int_5, %specific_fn.loc25 [concrete = constants.%bound_method.7a5] +// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc25: init %i32 = call %bound_method.loc25_32.2(%int_5) [concrete = constants.%int_5.0f6] +// CHECK:STDOUT: %.loc25_32.1: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc25 [concrete = constants.%int_5.0f6] +// CHECK:STDOUT: %.loc25_32.2: %i32 = converted %int_5, %.loc25_32.1 [concrete = constants.%int_5.0f6] // CHECK:STDOUT: %E.as.J.impl.G.call.loc25: init %i32 = call %bound_method.loc25_25(%e.ref.loc25, %.loc25_32.2) // CHECK:STDOUT: %i32.loc25: type = type_literal constants.%i32 [concrete = constants.%i32] // CHECK:STDOUT: %.loc25_33.1: %i32 = value_of_initializer %E.as.J.impl.G.call.loc25 // CHECK:STDOUT: %.loc25_33.2: %i32 = converted %E.as.J.impl.G.call.loc25, %.loc25_33.1 -// CHECK:STDOUT: %e5: %i32 = value_binding e5, %.loc25_33.2 +// CHECK:STDOUT: %e4: %i32 = value_binding e4, %.loc25_33.2 +// CHECK:STDOUT: name_binding_decl { +// CHECK:STDOUT: %e5.patt: %pattern_type.7ce = value_binding_pattern e5 [concrete] +// CHECK:STDOUT: } +// CHECK:STDOUT: %e.ref.loc26: %E = name_ref e, %e +// CHECK:STDOUT: %J.ref: type = name_ref J, file.%J.decl [concrete = constants.%J.type] +// CHECK:STDOUT: %G.ref.loc26: %J.assoc_type = name_ref G, @J.WithSelf.%assoc2 [concrete = constants.%assoc2] +// CHECK:STDOUT: %impl.elem2.loc26: %.825 = impl_witness_access constants.%J.impl_witness, element2 [concrete = constants.%E.as.J.impl.G] +// CHECK:STDOUT: %bound_method.loc26_25: = bound_method %e.ref.loc26, %impl.elem2.loc26 +// CHECK:STDOUT: %int_6: Core.IntLiteral = int_value 6 [concrete = constants.%int_6.462] +// CHECK:STDOUT: %impl.elem0.loc26: %.9db = impl_witness_access constants.%ImplicitAs.impl_witness.ac5, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.f1a] +// CHECK:STDOUT: %bound_method.loc26_32.1: = bound_method %int_6, %impl.elem0.loc26 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.0b7] +// CHECK:STDOUT: %specific_fn.loc26: = specific_function %impl.elem0.loc26, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] +// CHECK:STDOUT: %bound_method.loc26_32.2: = bound_method %int_6, %specific_fn.loc26 [concrete = constants.%bound_method.3ec] +// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc26: init %i32 = call %bound_method.loc26_32.2(%int_6) [concrete = constants.%int_6.e56] +// CHECK:STDOUT: %.loc26_32.1: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc26 [concrete = constants.%int_6.e56] +// CHECK:STDOUT: %.loc26_32.2: %i32 = converted %int_6, %.loc26_32.1 [concrete = constants.%int_6.e56] +// CHECK:STDOUT: %E.as.J.impl.G.call.loc26: init %i32 = call %bound_method.loc26_25(%e.ref.loc26, %.loc26_32.2) +// CHECK:STDOUT: %i32.loc26: type = type_literal constants.%i32 [concrete = constants.%i32] +// CHECK:STDOUT: %.loc26_33.1: %i32 = value_of_initializer %E.as.J.impl.G.call.loc26 +// CHECK:STDOUT: %.loc26_33.2: %i32 = converted %E.as.J.impl.G.call.loc26, %.loc26_33.1 +// CHECK:STDOUT: %e5: %i32 = value_binding e5, %.loc26_33.2 +// CHECK:STDOUT: +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: --- use_associated_fn_in_impl.carbon +// CHECK:STDOUT: +// CHECK:STDOUT: constants { +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] +// CHECK:STDOUT: %E.as.J.impl.F.type: type = fn_type @E.as.J.impl.F [concrete] +// CHECK:STDOUT: %E.as.J.impl.F: %E.as.J.impl.F.type = struct_value () [concrete] +// CHECK:STDOUT: %E.as.J.impl.G.type: type = fn_type @E.as.J.impl.G [concrete] +// CHECK:STDOUT: %E.as.J.impl.G: %E.as.J.impl.G.type = struct_value () [concrete] +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: impl @E.as.J.impl: %E.ref as %J.ref { +// CHECK:STDOUT: +// CHECK:STDOUT: %E.as.J.impl.G.decl: %E.as.J.impl.G.type = fn_decl @E.as.J.impl.G [concrete = constants.%E.as.J.impl.G] {} {} +// CHECK:STDOUT: +// CHECK:STDOUT: +// CHECK:STDOUT: !members: +// CHECK:STDOUT: .F = %E.as.J.impl.F.decl +// CHECK:STDOUT: .G = %E.as.J.impl.G.decl +// CHECK:STDOUT: extend %J.ref +// CHECK:STDOUT: witness = %J.impl_witness +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: fn @E.as.J.impl.G() { +// CHECK:STDOUT: !entry: +// CHECK:STDOUT: %F.ref: %E.as.J.impl.F.type = name_ref F, @E.as.J.impl.%E.as.J.impl.F.decl [concrete = constants.%E.as.J.impl.F] +// CHECK:STDOUT: %E.as.J.impl.F.call: init %empty_tuple.type = call %F.ref() // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @GenericCallF(%T.loc28_18.2: %J.type) { -// CHECK:STDOUT: %T.loc28_18.1: %J.type = symbolic_binding T, 0 [symbolic = %T.loc28_18.1 (constants.%T)] -// CHECK:STDOUT: %T.as_type.loc28_27.1: type = facet_access_type %T.loc28_18.1 [symbolic = %T.as_type.loc28_27.1 (constants.%T.as_type)] -// CHECK:STDOUT: %pattern_type.loc28_25: type = pattern_type %T.as_type.loc28_27.1 [symbolic = %pattern_type.loc28_25 (constants.%pattern_type.5a3)] -// CHECK:STDOUT: %J.lookup_impl_witness: = lookup_impl_witness %T.loc28_18.1, @J [symbolic = %J.lookup_impl_witness (constants.%J.lookup_impl_witness.264)] -// CHECK:STDOUT: %impl.elem0.loc28_34.1: type = impl_witness_access %J.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc28_34.1 (constants.%impl.elem0.560)] -// CHECK:STDOUT: %pattern_type.loc28_31: type = pattern_type %impl.elem0.loc28_34.1 [symbolic = %pattern_type.loc28_31 (constants.%pattern_type.ad6)] -// CHECK:STDOUT: %.loc28_42.2: Core.Form = init_form %impl.elem0.loc28_34.1 [symbolic = %.loc28_42.2 (constants.%.a8e)] -// CHECK:STDOUT: -// CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete.loc28_25: = require_complete_type %T.as_type.loc28_27.1 [symbolic = %require_complete.loc28_25 (constants.%require_complete.bee)] -// CHECK:STDOUT: %require_complete.loc28_31: = require_complete_type %impl.elem0.loc28_34.1 [symbolic = %require_complete.loc28_31 (constants.%require_complete.06a)] -// CHECK:STDOUT: %J.WithSelf.F.type: type = fn_type @J.WithSelf.F, @J.WithSelf(%T.loc28_18.1) [symbolic = %J.WithSelf.F.type (constants.%J.WithSelf.F.type.41f)] -// CHECK:STDOUT: %.loc29: type = fn_type_with_self_type %J.WithSelf.F.type, %T.loc28_18.1 [symbolic = %.loc29 (constants.%.43f)] -// CHECK:STDOUT: %impl.elem1.loc29_11.2: @GenericCallF.%.loc29 (%.43f) = impl_witness_access %J.lookup_impl_witness, element1 [symbolic = %impl.elem1.loc29_11.2 (constants.%impl.elem1)] -// CHECK:STDOUT: %specific_impl_fn.loc29_11.2: = specific_impl_function %impl.elem1.loc29_11.2, @J.WithSelf.F(%T.loc28_18.1) [symbolic = %specific_impl_fn.loc29_11.2 (constants.%specific_impl_fn)] -// CHECK:STDOUT: -// CHECK:STDOUT: fn(%t.param: @GenericCallF.%T.as_type.loc28_27.1 (%T.as_type), %u.param: @GenericCallF.%impl.elem0.loc28_34.1 (%impl.elem0.560)) -> out %return.param: @GenericCallF.%impl.elem0.loc28_34.1 (%impl.elem0.560) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %t.ref: @GenericCallF.%T.as_type.loc28_27.1 (%T.as_type) = name_ref t, %t -// CHECK:STDOUT: %F.ref: %J.assoc_type = name_ref F, @J.WithSelf.%assoc1 [concrete = constants.%assoc1.eeb] -// CHECK:STDOUT: %impl.elem1.loc29_11.1: @GenericCallF.%.loc29 (%.43f) = impl_witness_access constants.%J.lookup_impl_witness.264, element1 [symbolic = %impl.elem1.loc29_11.2 (constants.%impl.elem1)] -// CHECK:STDOUT: %u.ref: @GenericCallF.%impl.elem0.loc28_34.1 (%impl.elem0.560) = name_ref u, %u -// CHECK:STDOUT: %specific_impl_fn.loc29_11.1: = specific_impl_function %impl.elem1.loc29_11.1, @J.WithSelf.F(constants.%T) [symbolic = %specific_impl_fn.loc29_11.2 (constants.%specific_impl_fn)] -// CHECK:STDOUT: %.loc28_42.1: ref @GenericCallF.%impl.elem0.loc28_34.1 (%impl.elem0.560) = splice_block %return.param {} -// CHECK:STDOUT: %J.WithSelf.F.call: init @GenericCallF.%impl.elem0.loc28_34.1 (%impl.elem0.560) to %.loc28_42.1 = call %specific_impl_fn.loc29_11.1(%u.ref) -// CHECK:STDOUT: return %J.WithSelf.F.call to %return.param -// CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @CallGeneric(%e.param: %E) -> out %return.param: %i32 { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %GenericCallF.ref: %GenericCallF.type = name_ref GenericCallF, file.%GenericCallF.decl [concrete = constants.%GenericCallF] -// CHECK:STDOUT: %e.ref: %E = name_ref e, %e -// CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc] -// CHECK:STDOUT: %J.facet: %J.type = facet_value constants.%E, (constants.%J.impl_witness) [concrete = constants.%J.facet] -// CHECK:STDOUT: %.loc33_27: %J.type = converted constants.%E, %J.facet [concrete = constants.%J.facet] -// CHECK:STDOUT: %GenericCallF.specific_fn: = specific_function %GenericCallF.ref, @GenericCallF(constants.%J.facet) [concrete = constants.%GenericCallF.specific_fn] -// CHECK:STDOUT: %impl.elem0: %.9db = impl_witness_access constants.%ImplicitAs.impl_witness.ac5, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.f1a] -// CHECK:STDOUT: %bound_method.loc33_26.1: = bound_method %int_2, %impl.elem0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.9cb] -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] -// CHECK:STDOUT: %bound_method.loc33_26.2: = bound_method %int_2, %specific_fn [concrete = constants.%bound_method.419] -// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call: init %i32 = call %bound_method.loc33_26.2(%int_2) [concrete = constants.%int_2.ef8] -// CHECK:STDOUT: %.loc33_26.1: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call [concrete = constants.%int_2.ef8] -// CHECK:STDOUT: %.loc33_26.2: %i32 = converted %int_2, %.loc33_26.1 [concrete = constants.%int_2.ef8] -// CHECK:STDOUT: %GenericCallF.call: init %i32 = call %GenericCallF.specific_fn(%e.ref, %.loc33_26.2) -// CHECK:STDOUT: return %GenericCallF.call -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: specific @J.WithSelf(constants.%Self.8a1) { -// CHECK:STDOUT: !definition: -// CHECK:STDOUT: %Self => constants.%Self.8a1 -// CHECK:STDOUT: %J.WithSelf.F.type => constants.%J.WithSelf.F.type.adb -// CHECK:STDOUT: %J.WithSelf.F => constants.%J.WithSelf.F.569 -// CHECK:STDOUT: %J.WithSelf.G.type => constants.%J.WithSelf.G.type.ace -// CHECK:STDOUT: %J.WithSelf.G => constants.%J.WithSelf.G.6e7 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: specific @J.WithSelf.F(constants.%Self.8a1) { -// CHECK:STDOUT: %Self => constants.%Self.8a1 -// CHECK:STDOUT: %J.lookup_impl_witness => constants.%J.lookup_impl_witness.89e -// CHECK:STDOUT: %impl.elem0.loc5_11.1 => constants.%impl.elem0.335 -// CHECK:STDOUT: %pattern_type => constants.%pattern_type.c1a -// CHECK:STDOUT: %.loc5_17.1 => constants.%.77f -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: specific @J.WithSelf.G(constants.%Self.8a1) { -// CHECK:STDOUT: %Self => constants.%Self.8a1 -// CHECK:STDOUT: %Self.as_type.loc6_14.1 => constants.%Self.as_type.9ea -// CHECK:STDOUT: %pattern_type.loc6_12 => constants.%pattern_type.909 -// CHECK:STDOUT: %J.lookup_impl_witness => constants.%J.lookup_impl_witness.89e -// CHECK:STDOUT: %impl.elem0.loc6_23.1 => constants.%impl.elem0.335 -// CHECK:STDOUT: %pattern_type.loc6_21 => constants.%pattern_type.c1a -// CHECK:STDOUT: %.loc6_29.1 => constants.%.77f -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: specific @J.WithSelf(constants.%.Self.2fa) { -// CHECK:STDOUT: !definition: -// CHECK:STDOUT: %Self => constants.%.Self.2fa -// CHECK:STDOUT: %J.WithSelf.F.type => constants.%J.WithSelf.F.type.e19 -// CHECK:STDOUT: %J.WithSelf.F => constants.%J.WithSelf.F.659 -// CHECK:STDOUT: %J.WithSelf.G.type => constants.%J.WithSelf.G.type.2cf -// CHECK:STDOUT: %J.WithSelf.G => constants.%J.WithSelf.G.4f5 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: specific @J.WithSelf(constants.%J.facet) { -// CHECK:STDOUT: !definition: -// CHECK:STDOUT: %Self => constants.%J.facet -// CHECK:STDOUT: %J.WithSelf.F.type => constants.%J.WithSelf.F.type.7ab -// CHECK:STDOUT: %J.WithSelf.F => constants.%J.WithSelf.F.ef0 -// CHECK:STDOUT: %J.WithSelf.G.type => constants.%J.WithSelf.G.type.caf -// CHECK:STDOUT: %J.WithSelf.G => constants.%J.WithSelf.G.f88 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: specific @J.WithSelf.F(constants.%J.facet) { -// CHECK:STDOUT: %Self => constants.%J.facet -// CHECK:STDOUT: %J.lookup_impl_witness => constants.%J.impl_witness -// CHECK:STDOUT: %impl.elem0.loc5_11.1 => constants.%i32 -// CHECK:STDOUT: %pattern_type => constants.%pattern_type.7ce -// CHECK:STDOUT: %.loc5_17.1 => constants.%.ff5 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: specific @J.WithSelf.G(constants.%J.facet) { -// CHECK:STDOUT: %Self => constants.%J.facet -// CHECK:STDOUT: %Self.as_type.loc6_14.1 => constants.%E -// CHECK:STDOUT: %pattern_type.loc6_12 => constants.%pattern_type.99f -// CHECK:STDOUT: %J.lookup_impl_witness => constants.%J.impl_witness -// CHECK:STDOUT: %impl.elem0.loc6_23.1 => constants.%i32 -// CHECK:STDOUT: %pattern_type.loc6_21 => constants.%pattern_type.7ce -// CHECK:STDOUT: %.loc6_29.1 => constants.%.ff5 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: specific @J.WithSelf(constants.%E.type.facet) { -// CHECK:STDOUT: !definition: -// CHECK:STDOUT: %Self => constants.%E.type.facet -// CHECK:STDOUT: %J.WithSelf.F.type => constants.%J.WithSelf.F.type.d1c -// CHECK:STDOUT: %J.WithSelf.F => constants.%J.WithSelf.F.1a6 -// CHECK:STDOUT: %J.WithSelf.G.type => constants.%J.WithSelf.G.type.d39 -// CHECK:STDOUT: %J.WithSelf.G => constants.%J.WithSelf.G.a50 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: specific @J.WithSelf(constants.%T) { -// CHECK:STDOUT: !definition: -// CHECK:STDOUT: %Self => constants.%T -// CHECK:STDOUT: %J.WithSelf.F.type => constants.%J.WithSelf.F.type.41f -// CHECK:STDOUT: %J.WithSelf.F => constants.%J.WithSelf.F.f01 -// CHECK:STDOUT: %J.WithSelf.G.type => constants.%J.WithSelf.G.type.b2e -// CHECK:STDOUT: %J.WithSelf.G => constants.%J.WithSelf.G.310 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: specific @GenericCallF(constants.%T) { -// CHECK:STDOUT: %T.loc28_18.1 => constants.%T -// CHECK:STDOUT: %T.as_type.loc28_27.1 => constants.%T.as_type -// CHECK:STDOUT: %pattern_type.loc28_25 => constants.%pattern_type.5a3 -// CHECK:STDOUT: %J.lookup_impl_witness => constants.%J.lookup_impl_witness.264 -// CHECK:STDOUT: %impl.elem0.loc28_34.1 => constants.%impl.elem0.560 -// CHECK:STDOUT: %pattern_type.loc28_31 => constants.%pattern_type.ad6 -// CHECK:STDOUT: %.loc28_42.2 => constants.%.a8e -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: specific @J.WithSelf.F(constants.%T) { -// CHECK:STDOUT: %Self => constants.%T -// CHECK:STDOUT: %J.lookup_impl_witness => constants.%J.lookup_impl_witness.264 -// CHECK:STDOUT: %impl.elem0.loc5_11.1 => constants.%impl.elem0.560 -// CHECK:STDOUT: %pattern_type => constants.%pattern_type.ad6 -// CHECK:STDOUT: %.loc5_17.1 => constants.%.a8e -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: specific @GenericCallF(constants.%J.facet) { -// CHECK:STDOUT: %T.loc28_18.1 => constants.%J.facet -// CHECK:STDOUT: %T.as_type.loc28_27.1 => constants.%E -// CHECK:STDOUT: %pattern_type.loc28_25 => constants.%pattern_type.99f -// CHECK:STDOUT: %J.lookup_impl_witness => constants.%J.impl_witness -// CHECK:STDOUT: %impl.elem0.loc28_34.1 => constants.%i32 -// CHECK:STDOUT: %pattern_type.loc28_31 => constants.%pattern_type.7ce -// CHECK:STDOUT: %.loc28_42.2 => constants.%.ff5 -// CHECK:STDOUT: -// CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete.loc28_25 => constants.%complete_type.357 -// CHECK:STDOUT: %require_complete.loc28_31 => constants.%complete_type.f8a -// CHECK:STDOUT: %J.WithSelf.F.type => constants.%J.WithSelf.F.type.7ab -// CHECK:STDOUT: %.loc29 => constants.%.ff2 -// CHECK:STDOUT: %impl.elem1.loc29_11.2 => constants.%E.as.J.impl.F -// CHECK:STDOUT: %specific_impl_fn.loc29_11.2 => constants.%E.as.J.impl.F -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: --- use_constraint_on_associated_type.carbon -// CHECK:STDOUT: -// CHECK:STDOUT: constants { -// CHECK:STDOUT: %I.type: type = facet_type <@I> [concrete] -// CHECK:STDOUT: %Self.ab9: %I.type = symbolic_binding Self, 0 [symbolic] -// CHECK:STDOUT: %Self.as_type.a26: type = facet_access_type %Self.ab9 [symbolic] -// CHECK:STDOUT: %pattern_type.965: type = pattern_type %Self.as_type.a26 [symbolic] -// CHECK:STDOUT: %.eb0: Core.Form = init_form %Self.as_type.a26 [symbolic] -// CHECK:STDOUT: %I.WithSelf.Op.type.71c: type = fn_type @I.WithSelf.Op, @I.WithSelf(%Self.ab9) [symbolic] -// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] -// CHECK:STDOUT: %I.WithSelf.Op.ae1: %I.WithSelf.Op.type.71c = struct_value () [symbolic] -// CHECK:STDOUT: %I.assoc_type: type = assoc_entity_type @I [concrete] -// CHECK:STDOUT: %assoc0.aa8: %I.assoc_type = assoc_entity element0, @I.WithSelf.%I.WithSelf.Op.decl [concrete] -// CHECK:STDOUT: %J.type: type = facet_type <@J> [concrete] -// CHECK:STDOUT: %Self.8a1: %J.type = symbolic_binding Self, 0 [symbolic] -// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %BitAndWith.type.f2e: type = generic_interface_type @BitAndWith [concrete] -// CHECK:STDOUT: %BitAndWith.generic: %BitAndWith.type.f2e = struct_value () [concrete] -// CHECK:STDOUT: %facet_type: type = facet_type <@I & @Destroy> [concrete] -// CHECK:STDOUT: %J.assoc_type: type = assoc_entity_type @J [concrete] -// CHECK:STDOUT: %assoc0.445: %J.assoc_type = assoc_entity element0, @J.WithSelf.%U [concrete] -// CHECK:STDOUT: %J.lookup_impl_witness.89e: = lookup_impl_witness %Self.8a1, @J [symbolic] -// CHECK:STDOUT: %impl.elem0.193: %facet_type = impl_witness_access %J.lookup_impl_witness.89e, element0 [symbolic] -// CHECK:STDOUT: %as_type.d83: type = facet_access_type %impl.elem0.193 [symbolic] -// CHECK:STDOUT: %pattern_type.d76: type = pattern_type %as_type.d83 [symbolic] -// CHECK:STDOUT: %.3f9: Core.Form = init_form %as_type.d83 [symbolic] -// CHECK:STDOUT: %J.WithSelf.F.type.adb: type = fn_type @J.WithSelf.F, @J.WithSelf(%Self.8a1) [symbolic] -// CHECK:STDOUT: %J.WithSelf.F.569: %J.WithSelf.F.type.adb = struct_value () [symbolic] -// CHECK:STDOUT: %assoc1: %J.assoc_type = assoc_entity element1, @J.WithSelf.%J.WithSelf.F.decl [concrete] -// CHECK:STDOUT: %type: type = facet_type [concrete] -// CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self] -// CHECK:STDOUT: %pattern_type.f76: type = pattern_type %J.type [concrete] -// CHECK:STDOUT: %T: %J.type = symbolic_binding T, 0 [symbolic] -// CHECK:STDOUT: %T.as_type: type = facet_access_type %T [symbolic] -// CHECK:STDOUT: %pattern_type.5a3: type = pattern_type %T.as_type [symbolic] -// CHECK:STDOUT: %J.WithSelf.F.type.41f: type = fn_type @J.WithSelf.F, @J.WithSelf(%T) [symbolic] -// CHECK:STDOUT: %J.WithSelf.F.f01: %J.WithSelf.F.type.41f = struct_value () [symbolic] -// CHECK:STDOUT: %J.lookup_impl_witness.264: = lookup_impl_witness %T, @J [symbolic] -// CHECK:STDOUT: %impl.elem0.397: %facet_type = impl_witness_access %J.lookup_impl_witness.264, element0 [symbolic] -// CHECK:STDOUT: %as_type.baf: type = facet_access_type %impl.elem0.397 [symbolic] -// CHECK:STDOUT: %pattern_type.bba: type = pattern_type %as_type.baf [symbolic] -// CHECK:STDOUT: %.076: Core.Form = init_form %as_type.baf [symbolic] -// CHECK:STDOUT: %GenericResult.type: type = fn_type @GenericResult [concrete] -// CHECK:STDOUT: %GenericResult: %GenericResult.type = struct_value () [concrete] -// CHECK:STDOUT: %require_complete.bee: = require_complete_type %T.as_type [symbolic] -// CHECK:STDOUT: %require_complete.9b3: = require_complete_type %as_type.baf [symbolic] -// CHECK:STDOUT: %.43f: type = fn_type_with_self_type %J.WithSelf.F.type.41f, %T [symbolic] -// CHECK:STDOUT: %impl.elem1: %.43f = impl_witness_access %J.lookup_impl_witness.264, element1 [symbolic] -// CHECK:STDOUT: %specific_impl_fn.a64: = specific_impl_function %impl.elem1, @J.WithSelf.F(%T) [symbolic] -// CHECK:STDOUT: %I.lookup_impl_witness: = lookup_impl_witness %impl.elem0.397, @I [symbolic] -// CHECK:STDOUT: %I.facet: %I.type = facet_value %as_type.baf, (%I.lookup_impl_witness) [symbolic] -// CHECK:STDOUT: %I.WithSelf.Op.type.25c: type = fn_type @I.WithSelf.Op, @I.WithSelf(%I.facet) [symbolic] -// CHECK:STDOUT: %I.WithSelf.Op.fdc: %I.WithSelf.Op.type.25c = struct_value () [symbolic] -// CHECK:STDOUT: %.73b: type = fn_type_with_self_type %I.WithSelf.Op.type.25c, %I.facet [symbolic] -// CHECK:STDOUT: %impl.elem0.d74: %.73b = impl_witness_access %I.lookup_impl_witness, element0 [symbolic] -// CHECK:STDOUT: %specific_impl_fn.b45: = specific_impl_function %impl.elem0.d74, @I.WithSelf.Op(%I.facet) [symbolic] -// CHECK:STDOUT: %Destroy.lookup_impl_witness: = lookup_impl_witness %impl.elem0.397, @Destroy [symbolic] -// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %as_type.baf, (%Destroy.lookup_impl_witness) [symbolic] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.077: type = fn_type @Destroy.WithSelf.Op, @Destroy.WithSelf(%Destroy.facet) [symbolic] -// CHECK:STDOUT: %.0e3: type = fn_type_with_self_type %Destroy.WithSelf.Op.type.077, %Destroy.facet [symbolic] -// CHECK:STDOUT: %impl.elem0.4a3: %.0e3 = impl_witness_access %Destroy.lookup_impl_witness, element0 [symbolic] -// CHECK:STDOUT: %specific_impl_fn.86e: = specific_impl_function %impl.elem0.4a3, @Destroy.WithSelf.Op(%Destroy.facet) [symbolic] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: imports { -// CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { -// CHECK:STDOUT: .Destroy = %Core.Destroy -// CHECK:STDOUT: .BitAndWith = %Core.BitAndWith -// CHECK:STDOUT: import Core//prelude -// CHECK:STDOUT: import Core//prelude/... -// CHECK:STDOUT: } -// CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: %Core.BitAndWith: %BitAndWith.type.f2e = import_ref Core//prelude/parts/as, BitAndWith, loaded [concrete = constants.%BitAndWith.generic] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: file { -// CHECK:STDOUT: package: = namespace [concrete] { -// CHECK:STDOUT: .Core = imports.%Core -// CHECK:STDOUT: .I = %I.decl -// CHECK:STDOUT: .J = %J.decl -// CHECK:STDOUT: .GenericResult = %GenericResult.decl -// CHECK:STDOUT: } -// CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %I.decl: type = interface_decl @I [concrete = constants.%I.type] {} {} -// CHECK:STDOUT: %J.decl: type = interface_decl @J [concrete = constants.%J.type] {} {} -// CHECK:STDOUT: %GenericResult.decl: %GenericResult.type = fn_decl @GenericResult [concrete = constants.%GenericResult] { -// CHECK:STDOUT: %T.patt: %pattern_type.f76 = symbolic_binding_pattern T, 0 [concrete] -// CHECK:STDOUT: %t.param_patt: @GenericResult.%pattern_type.loc12_26 (%pattern_type.5a3) = value_param_pattern [concrete] -// CHECK:STDOUT: %t.patt: @GenericResult.%pattern_type.loc12_26 (%pattern_type.5a3) = at_binding_pattern t, %t.param_patt [concrete] -// CHECK:STDOUT: %u.param_patt: @GenericResult.%pattern_type.loc12_32 (%pattern_type.bba) = value_param_pattern [concrete] -// CHECK:STDOUT: %u.patt: @GenericResult.%pattern_type.loc12_32 (%pattern_type.bba) = at_binding_pattern u, %u.param_patt [concrete] -// CHECK:STDOUT: %return.param_patt: @GenericResult.%pattern_type.loc12_32 (%pattern_type.bba) = out_param_pattern [concrete] -// CHECK:STDOUT: %return.patt: @GenericResult.%pattern_type.loc12_32 (%pattern_type.bba) = return_slot_pattern %return.param_patt, %.loc12_43.4 [concrete] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %T.ref.loc12_42: %J.type = name_ref T, %T.loc12_19.2 [symbolic = %T.loc12_19.1 (constants.%T)] -// CHECK:STDOUT: %T.as_type.loc12_43: type = facet_access_type %T.ref.loc12_42 [symbolic = %T.as_type.loc12_28.1 (constants.%T.as_type)] -// CHECK:STDOUT: %.loc12_43.3: type = converted %T.ref.loc12_42, %T.as_type.loc12_43 [symbolic = %T.as_type.loc12_28.1 (constants.%T.as_type)] -// CHECK:STDOUT: %U.ref.loc12_43: %J.assoc_type = name_ref U, @U.%assoc0 [concrete = constants.%assoc0.445] -// CHECK:STDOUT: %impl.elem0.loc12_43: %facet_type = impl_witness_access constants.%J.lookup_impl_witness.264, element0 [symbolic = %impl.elem0.loc12_35.1 (constants.%impl.elem0.397)] -// CHECK:STDOUT: %as_type.loc12_43: type = facet_access_type %impl.elem0.loc12_43 [symbolic = %as_type.loc12_35.1 (constants.%as_type.baf)] -// CHECK:STDOUT: %.loc12_43.4: type = converted %impl.elem0.loc12_43, %as_type.loc12_43 [symbolic = %as_type.loc12_35.1 (constants.%as_type.baf)] -// CHECK:STDOUT: %.loc12_43.5: Core.Form = init_form %.loc12_43.4 [symbolic = %.loc12_43.2 (constants.%.076)] -// CHECK:STDOUT: %.loc12_22: type = splice_block %J.ref [concrete = constants.%J.type] { -// CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self = constants.%.Self] -// CHECK:STDOUT: %J.ref: type = name_ref J, file.%J.decl [concrete = constants.%J.type] -// CHECK:STDOUT: } -// CHECK:STDOUT: %T.loc12_19.2: %J.type = symbolic_binding T, 0 [symbolic = %T.loc12_19.1 (constants.%T)] -// CHECK:STDOUT: %t.param: @GenericResult.%T.as_type.loc12_28.1 (%T.as_type) = value_param call_param0 -// CHECK:STDOUT: %.loc12_28.1: type = splice_block %.loc12_28.2 [symbolic = %T.as_type.loc12_28.1 (constants.%T.as_type)] { -// CHECK:STDOUT: %T.ref.loc12_28: %J.type = name_ref T, %T.loc12_19.2 [symbolic = %T.loc12_19.1 (constants.%T)] -// CHECK:STDOUT: %T.as_type.loc12_28.2: type = facet_access_type %T.ref.loc12_28 [symbolic = %T.as_type.loc12_28.1 (constants.%T.as_type)] -// CHECK:STDOUT: %.loc12_28.2: type = converted %T.ref.loc12_28, %T.as_type.loc12_28.2 [symbolic = %T.as_type.loc12_28.1 (constants.%T.as_type)] -// CHECK:STDOUT: } -// CHECK:STDOUT: %t: @GenericResult.%T.as_type.loc12_28.1 (%T.as_type) = value_binding t, %t.param -// CHECK:STDOUT: %u.param: @GenericResult.%as_type.loc12_35.1 (%as_type.baf) = value_param call_param1 -// CHECK:STDOUT: %.loc12_35.1: type = splice_block %.loc12_35.3 [symbolic = %as_type.loc12_35.1 (constants.%as_type.baf)] { -// CHECK:STDOUT: %T.ref.loc12_34: %J.type = name_ref T, %T.loc12_19.2 [symbolic = %T.loc12_19.1 (constants.%T)] -// CHECK:STDOUT: %T.as_type.loc12_35: type = facet_access_type %T.ref.loc12_34 [symbolic = %T.as_type.loc12_28.1 (constants.%T.as_type)] -// CHECK:STDOUT: %.loc12_35.2: type = converted %T.ref.loc12_34, %T.as_type.loc12_35 [symbolic = %T.as_type.loc12_28.1 (constants.%T.as_type)] -// CHECK:STDOUT: %U.ref.loc12_35: %J.assoc_type = name_ref U, @U.%assoc0 [concrete = constants.%assoc0.445] -// CHECK:STDOUT: %impl.elem0.loc12_35.2: %facet_type = impl_witness_access constants.%J.lookup_impl_witness.264, element0 [symbolic = %impl.elem0.loc12_35.1 (constants.%impl.elem0.397)] -// CHECK:STDOUT: %as_type.loc12_35.2: type = facet_access_type %impl.elem0.loc12_35.2 [symbolic = %as_type.loc12_35.1 (constants.%as_type.baf)] -// CHECK:STDOUT: %.loc12_35.3: type = converted %impl.elem0.loc12_35.2, %as_type.loc12_35.2 [symbolic = %as_type.loc12_35.1 (constants.%as_type.baf)] -// CHECK:STDOUT: } -// CHECK:STDOUT: %u: @GenericResult.%as_type.loc12_35.1 (%as_type.baf) = value_binding u, %u.param -// CHECK:STDOUT: %return.param: ref @GenericResult.%as_type.loc12_35.1 (%as_type.baf) = out_param call_param2 -// CHECK:STDOUT: %return: ref @GenericResult.%as_type.loc12_35.1 (%as_type.baf) = return_slot %return.param -// CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: interface @I { -// CHECK:STDOUT: %Self: %I.type = symbolic_binding Self, 0 [symbolic = constants.%Self.ab9] -// CHECK:STDOUT: %I.WithSelf.decl = interface_with_self_decl @I [concrete] -// CHECK:STDOUT: -// CHECK:STDOUT: !with Self: -// CHECK:STDOUT: %I.WithSelf.Op.decl: @I.WithSelf.%I.WithSelf.Op.type (%I.WithSelf.Op.type.71c) = fn_decl @I.WithSelf.Op [symbolic = @I.WithSelf.%I.WithSelf.Op (constants.%I.WithSelf.Op.ae1)] { -// CHECK:STDOUT: %self.param_patt: @I.WithSelf.Op.%pattern_type (%pattern_type.965) = value_param_pattern [concrete] -// CHECK:STDOUT: %self.patt: @I.WithSelf.Op.%pattern_type (%pattern_type.965) = at_binding_pattern self, %self.param_patt [concrete] -// CHECK:STDOUT: %b.param_patt: @I.WithSelf.Op.%pattern_type (%pattern_type.965) = value_param_pattern [concrete] -// CHECK:STDOUT: %b.patt: @I.WithSelf.Op.%pattern_type (%pattern_type.965) = at_binding_pattern b, %b.param_patt [concrete] -// CHECK:STDOUT: %return.param_patt: @I.WithSelf.Op.%pattern_type (%pattern_type.965) = out_param_pattern [concrete] -// CHECK:STDOUT: %return.patt: @I.WithSelf.Op.%pattern_type (%pattern_type.965) = return_slot_pattern %return.param_patt, %.loc4_33.2 [concrete] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %Self.ref.loc4_33: %I.type = name_ref Self, @I.%Self [symbolic = %Self (constants.%Self.ab9)] -// CHECK:STDOUT: %Self.as_type.loc4_33: type = facet_access_type %Self.ref.loc4_33 [symbolic = %Self.as_type.loc4_15.1 (constants.%Self.as_type.a26)] -// CHECK:STDOUT: %.loc4_33.2: type = converted %Self.ref.loc4_33, %Self.as_type.loc4_33 [symbolic = %Self.as_type.loc4_15.1 (constants.%Self.as_type.a26)] -// CHECK:STDOUT: %.loc4_33.3: Core.Form = init_form %.loc4_33.2 [symbolic = %.loc4_33.1 (constants.%.eb0)] -// CHECK:STDOUT: %self.param: @I.WithSelf.Op.%Self.as_type.loc4_15.1 (%Self.as_type.a26) = value_param call_param0 -// CHECK:STDOUT: %.loc4_15.1: type = splice_block %.loc4_15.2 [symbolic = %Self.as_type.loc4_15.1 (constants.%Self.as_type.a26)] { -// CHECK:STDOUT: %Self.ref.loc4_15: %I.type = name_ref Self, @I.%Self [symbolic = %Self (constants.%Self.ab9)] -// CHECK:STDOUT: %Self.as_type.loc4_15.2: type = facet_access_type %Self.ref.loc4_15 [symbolic = %Self.as_type.loc4_15.1 (constants.%Self.as_type.a26)] -// CHECK:STDOUT: %.loc4_15.2: type = converted %Self.ref.loc4_15, %Self.as_type.loc4_15.2 [symbolic = %Self.as_type.loc4_15.1 (constants.%Self.as_type.a26)] -// CHECK:STDOUT: } -// CHECK:STDOUT: %self: @I.WithSelf.Op.%Self.as_type.loc4_15.1 (%Self.as_type.a26) = value_binding self, %self.param -// CHECK:STDOUT: %b.param: @I.WithSelf.Op.%Self.as_type.loc4_15.1 (%Self.as_type.a26) = value_param call_param1 -// CHECK:STDOUT: %.loc4_24.1: type = splice_block %.loc4_24.2 [symbolic = %Self.as_type.loc4_15.1 (constants.%Self.as_type.a26)] { -// CHECK:STDOUT: %Self.ref.loc4_24: %I.type = name_ref Self, @I.%Self [symbolic = %Self (constants.%Self.ab9)] -// CHECK:STDOUT: %Self.as_type.loc4_24: type = facet_access_type %Self.ref.loc4_24 [symbolic = %Self.as_type.loc4_15.1 (constants.%Self.as_type.a26)] -// CHECK:STDOUT: %.loc4_24.2: type = converted %Self.ref.loc4_24, %Self.as_type.loc4_24 [symbolic = %Self.as_type.loc4_15.1 (constants.%Self.as_type.a26)] -// CHECK:STDOUT: } -// CHECK:STDOUT: %b: @I.WithSelf.Op.%Self.as_type.loc4_15.1 (%Self.as_type.a26) = value_binding b, %b.param -// CHECK:STDOUT: %return.param: ref @I.WithSelf.Op.%Self.as_type.loc4_15.1 (%Self.as_type.a26) = out_param call_param2 -// CHECK:STDOUT: %return: ref @I.WithSelf.Op.%Self.as_type.loc4_15.1 (%Self.as_type.a26) = return_slot %return.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, %I.WithSelf.Op.decl [concrete = constants.%assoc0.aa8] -// CHECK:STDOUT: -// CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = %Self -// CHECK:STDOUT: .Op = @I.WithSelf.%assoc0 -// CHECK:STDOUT: witness = (@I.WithSelf.%I.WithSelf.Op.decl) -// CHECK:STDOUT: -// CHECK:STDOUT: !requires: -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: interface @J { -// CHECK:STDOUT: %Self: %J.type = symbolic_binding Self, 0 [symbolic = constants.%Self.8a1] -// CHECK:STDOUT: %J.WithSelf.decl = interface_with_self_decl @J [concrete] -// CHECK:STDOUT: -// CHECK:STDOUT: !with Self: -// CHECK:STDOUT: %U: %facet_type = assoc_const_decl @U [concrete] { -// CHECK:STDOUT: %assoc0: %J.assoc_type = assoc_entity element0, @J.WithSelf.%U [concrete = constants.%assoc0.445] -// CHECK:STDOUT: } -// CHECK:STDOUT: %J.WithSelf.F.decl: @J.WithSelf.%J.WithSelf.F.type (%J.WithSelf.F.type.adb) = fn_decl @J.WithSelf.F [symbolic = @J.WithSelf.%J.WithSelf.F (constants.%J.WithSelf.F.569)] { -// CHECK:STDOUT: %u.param_patt: @J.WithSelf.F.%pattern_type (%pattern_type.d76) = value_param_pattern [concrete] -// CHECK:STDOUT: %u.patt: @J.WithSelf.F.%pattern_type (%pattern_type.d76) = at_binding_pattern u, %u.param_patt [concrete] -// CHECK:STDOUT: %return.param_patt: @J.WithSelf.F.%pattern_type (%pattern_type.d76) = out_param_pattern [concrete] -// CHECK:STDOUT: %return.patt: @J.WithSelf.F.%pattern_type (%pattern_type.d76) = return_slot_pattern %return.param_patt, %.loc9_17.2 [concrete] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %impl.elem0.loc9_17: %facet_type = impl_witness_access constants.%J.lookup_impl_witness.89e, element0 [symbolic = %impl.elem0.loc9_11.1 (constants.%impl.elem0.193)] -// CHECK:STDOUT: %U.ref.loc9_17: %facet_type = name_ref U, %impl.elem0.loc9_17 [symbolic = %impl.elem0.loc9_11.1 (constants.%impl.elem0.193)] -// CHECK:STDOUT: %U.as_type.loc9_17: type = facet_access_type %U.ref.loc9_17 [symbolic = %as_type (constants.%as_type.d83)] -// CHECK:STDOUT: %.loc9_17.2: type = converted %U.ref.loc9_17, %U.as_type.loc9_17 [symbolic = %as_type (constants.%as_type.d83)] -// CHECK:STDOUT: %.loc9_17.3: Core.Form = init_form %.loc9_17.2 [symbolic = %.loc9_17.1 (constants.%.3f9)] -// CHECK:STDOUT: %u.param: @J.WithSelf.F.%as_type (%as_type.d83) = value_param call_param0 -// CHECK:STDOUT: %.loc9_11.1: type = splice_block %.loc9_11.2 [symbolic = %as_type (constants.%as_type.d83)] { -// CHECK:STDOUT: %impl.elem0.loc9_11.2: %facet_type = impl_witness_access constants.%J.lookup_impl_witness.89e, element0 [symbolic = %impl.elem0.loc9_11.1 (constants.%impl.elem0.193)] -// CHECK:STDOUT: %U.ref.loc9_11: %facet_type = name_ref U, %impl.elem0.loc9_11.2 [symbolic = %impl.elem0.loc9_11.1 (constants.%impl.elem0.193)] -// CHECK:STDOUT: %U.as_type.loc9_11: type = facet_access_type %U.ref.loc9_11 [symbolic = %as_type (constants.%as_type.d83)] -// CHECK:STDOUT: %.loc9_11.2: type = converted %U.ref.loc9_11, %U.as_type.loc9_11 [symbolic = %as_type (constants.%as_type.d83)] -// CHECK:STDOUT: } -// CHECK:STDOUT: %u: @J.WithSelf.F.%as_type (%as_type.d83) = value_binding u, %u.param -// CHECK:STDOUT: %return.param: ref @J.WithSelf.F.%as_type (%as_type.d83) = out_param call_param1 -// CHECK:STDOUT: %return: ref @J.WithSelf.F.%as_type (%as_type.d83) = return_slot %return.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %assoc1: %J.assoc_type = assoc_entity element1, %J.WithSelf.F.decl [concrete = constants.%assoc1] -// CHECK:STDOUT: -// CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = %Self -// CHECK:STDOUT: .I = -// CHECK:STDOUT: .I = -// CHECK:STDOUT: .U = @U.%assoc0 -// CHECK:STDOUT: .F = @J.WithSelf.%assoc1 -// CHECK:STDOUT: witness = (@J.WithSelf.%U, @J.WithSelf.%J.WithSelf.F.decl) -// CHECK:STDOUT: -// CHECK:STDOUT: !requires: -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generic fn @I.WithSelf.Op(@I.%Self: %I.type) { -// CHECK:STDOUT: %Self: %I.type = symbolic_binding Self, 0 [symbolic = %Self (constants.%Self.ab9)] -// CHECK:STDOUT: %Self.as_type.loc4_15.1: type = facet_access_type %Self [symbolic = %Self.as_type.loc4_15.1 (constants.%Self.as_type.a26)] -// CHECK:STDOUT: %pattern_type: type = pattern_type %Self.as_type.loc4_15.1 [symbolic = %pattern_type (constants.%pattern_type.965)] -// CHECK:STDOUT: %.loc4_33.1: Core.Form = init_form %Self.as_type.loc4_15.1 [symbolic = %.loc4_33.1 (constants.%.eb0)] -// CHECK:STDOUT: -// CHECK:STDOUT: fn(%self.param: @I.WithSelf.Op.%Self.as_type.loc4_15.1 (%Self.as_type.a26), %b.param: @I.WithSelf.Op.%Self.as_type.loc4_15.1 (%Self.as_type.a26)) -> out %return.param: @I.WithSelf.Op.%Self.as_type.loc4_15.1 (%Self.as_type.a26); -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generic fn @J.WithSelf.F(@J.%Self: %J.type) { -// CHECK:STDOUT: %Self: %J.type = symbolic_binding Self, 0 [symbolic = %Self (constants.%Self.8a1)] -// CHECK:STDOUT: %J.lookup_impl_witness: = lookup_impl_witness %Self, @J [symbolic = %J.lookup_impl_witness (constants.%J.lookup_impl_witness.89e)] -// CHECK:STDOUT: %impl.elem0.loc9_11.1: %facet_type = impl_witness_access %J.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc9_11.1 (constants.%impl.elem0.193)] -// CHECK:STDOUT: %as_type: type = facet_access_type %impl.elem0.loc9_11.1 [symbolic = %as_type (constants.%as_type.d83)] -// CHECK:STDOUT: %pattern_type: type = pattern_type %as_type [symbolic = %pattern_type (constants.%pattern_type.d76)] -// CHECK:STDOUT: %.loc9_17.1: Core.Form = init_form %as_type [symbolic = %.loc9_17.1 (constants.%.3f9)] -// CHECK:STDOUT: -// CHECK:STDOUT: fn(%u.param: @J.WithSelf.F.%as_type (%as_type.d83)) -> out %return.param: @J.WithSelf.F.%as_type (%as_type.d83); -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generic fn @GenericResult(%T.loc12_19.2: %J.type) { -// CHECK:STDOUT: %T.loc12_19.1: %J.type = symbolic_binding T, 0 [symbolic = %T.loc12_19.1 (constants.%T)] -// CHECK:STDOUT: %T.as_type.loc12_28.1: type = facet_access_type %T.loc12_19.1 [symbolic = %T.as_type.loc12_28.1 (constants.%T.as_type)] -// CHECK:STDOUT: %pattern_type.loc12_26: type = pattern_type %T.as_type.loc12_28.1 [symbolic = %pattern_type.loc12_26 (constants.%pattern_type.5a3)] -// CHECK:STDOUT: %J.lookup_impl_witness: = lookup_impl_witness %T.loc12_19.1, @J [symbolic = %J.lookup_impl_witness (constants.%J.lookup_impl_witness.264)] -// CHECK:STDOUT: %impl.elem0.loc12_35.1: %facet_type = impl_witness_access %J.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc12_35.1 (constants.%impl.elem0.397)] -// CHECK:STDOUT: %as_type.loc12_35.1: type = facet_access_type %impl.elem0.loc12_35.1 [symbolic = %as_type.loc12_35.1 (constants.%as_type.baf)] -// CHECK:STDOUT: %pattern_type.loc12_32: type = pattern_type %as_type.loc12_35.1 [symbolic = %pattern_type.loc12_32 (constants.%pattern_type.bba)] -// CHECK:STDOUT: %.loc12_43.2: Core.Form = init_form %as_type.loc12_35.1 [symbolic = %.loc12_43.2 (constants.%.076)] -// CHECK:STDOUT: -// CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete.loc12_26: = require_complete_type %T.as_type.loc12_28.1 [symbolic = %require_complete.loc12_26 (constants.%require_complete.bee)] -// CHECK:STDOUT: %require_complete.loc12_32: = require_complete_type %as_type.loc12_35.1 [symbolic = %require_complete.loc12_32 (constants.%require_complete.9b3)] -// CHECK:STDOUT: %J.WithSelf.F.type: type = fn_type @J.WithSelf.F, @J.WithSelf(%T.loc12_19.1) [symbolic = %J.WithSelf.F.type (constants.%J.WithSelf.F.type.41f)] -// CHECK:STDOUT: %.loc13_11: type = fn_type_with_self_type %J.WithSelf.F.type, %T.loc12_19.1 [symbolic = %.loc13_11 (constants.%.43f)] -// CHECK:STDOUT: %impl.elem1.loc13_11.2: @GenericResult.%.loc13_11 (%.43f) = impl_witness_access %J.lookup_impl_witness, element1 [symbolic = %impl.elem1.loc13_11.2 (constants.%impl.elem1)] -// CHECK:STDOUT: %specific_impl_fn.loc13_11.2: = specific_impl_function %impl.elem1.loc13_11.2, @J.WithSelf.F(%T.loc12_19.1) [symbolic = %specific_impl_fn.loc13_11.2 (constants.%specific_impl_fn.a64)] -// CHECK:STDOUT: %I.lookup_impl_witness: = lookup_impl_witness %impl.elem0.loc12_35.1, @I [symbolic = %I.lookup_impl_witness (constants.%I.lookup_impl_witness)] -// CHECK:STDOUT: %I.facet.loc13_16: %I.type = facet_value %as_type.loc12_35.1, (%I.lookup_impl_witness) [symbolic = %I.facet.loc13_16 (constants.%I.facet)] -// CHECK:STDOUT: %I.WithSelf.Op.type: type = fn_type @I.WithSelf.Op, @I.WithSelf(%I.facet.loc13_16) [symbolic = %I.WithSelf.Op.type (constants.%I.WithSelf.Op.type.25c)] -// CHECK:STDOUT: %.loc13_16: type = fn_type_with_self_type %I.WithSelf.Op.type, %I.facet.loc13_16 [symbolic = %.loc13_16 (constants.%.73b)] -// CHECK:STDOUT: %impl.elem0.loc13_16.2: @GenericResult.%.loc13_16 (%.73b) = impl_witness_access %I.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc13_16.2 (constants.%impl.elem0.d74)] -// CHECK:STDOUT: %specific_impl_fn.loc13_16.2: = specific_impl_function %impl.elem0.loc13_16.2, @I.WithSelf.Op(%I.facet.loc13_16) [symbolic = %specific_impl_fn.loc13_16.2 (constants.%specific_impl_fn.b45)] -// CHECK:STDOUT: %Destroy.lookup_impl_witness: = lookup_impl_witness %impl.elem0.loc12_35.1, @Destroy [symbolic = %Destroy.lookup_impl_witness (constants.%Destroy.lookup_impl_witness)] -// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %as_type.loc12_35.1, (%Destroy.lookup_impl_witness) [symbolic = %Destroy.facet (constants.%Destroy.facet)] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type: type = fn_type @Destroy.WithSelf.Op, @Destroy.WithSelf(%Destroy.facet) [symbolic = %Destroy.WithSelf.Op.type (constants.%Destroy.WithSelf.Op.type.077)] -// CHECK:STDOUT: %.loc13_29.5: type = fn_type_with_self_type %Destroy.WithSelf.Op.type, %Destroy.facet [symbolic = %.loc13_29.5 (constants.%.0e3)] -// CHECK:STDOUT: %impl.elem0.loc13_29.2: @GenericResult.%.loc13_29.5 (%.0e3) = impl_witness_access %Destroy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc13_29.2 (constants.%impl.elem0.4a3)] -// CHECK:STDOUT: %specific_impl_fn.loc13_29.2: = specific_impl_function %impl.elem0.loc13_29.2, @Destroy.WithSelf.Op(%Destroy.facet) [symbolic = %specific_impl_fn.loc13_29.2 (constants.%specific_impl_fn.86e)] -// CHECK:STDOUT: -// CHECK:STDOUT: fn(%t.param: @GenericResult.%T.as_type.loc12_28.1 (%T.as_type), %u.param: @GenericResult.%as_type.loc12_35.1 (%as_type.baf)) -> out %return.param: @GenericResult.%as_type.loc12_35.1 (%as_type.baf) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %t.ref: @GenericResult.%T.as_type.loc12_28.1 (%T.as_type) = name_ref t, %t -// CHECK:STDOUT: %F.ref.loc13_11: %J.assoc_type = name_ref F, @J.WithSelf.%assoc1 [concrete = constants.%assoc1] -// CHECK:STDOUT: %impl.elem1.loc13_11.1: @GenericResult.%.loc13_11 (%.43f) = impl_witness_access constants.%J.lookup_impl_witness.264, element1 [symbolic = %impl.elem1.loc13_11.2 (constants.%impl.elem1)] -// CHECK:STDOUT: %u.ref.loc13_14: @GenericResult.%as_type.loc12_35.1 (%as_type.baf) = name_ref u, %u -// CHECK:STDOUT: %.loc13_15.1: %facet_type = converted constants.%as_type.baf, constants.%impl.elem0.397 [symbolic = %impl.elem0.loc12_35.1 (constants.%impl.elem0.397)] -// CHECK:STDOUT: %specific_impl_fn.loc13_11.1: = specific_impl_function %impl.elem1.loc13_11.1, @J.WithSelf.F(constants.%T) [symbolic = %specific_impl_fn.loc13_11.2 (constants.%specific_impl_fn.a64)] -// CHECK:STDOUT: %.loc13_15.2: ref @GenericResult.%as_type.loc12_35.1 (%as_type.baf) = temporary_storage -// CHECK:STDOUT: %J.WithSelf.F.call.loc13_15: init @GenericResult.%as_type.loc12_35.1 (%as_type.baf) to %.loc13_15.2 = call %specific_impl_fn.loc13_11.1(%u.ref.loc13_14) -// CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [concrete = constants.%I.type] -// CHECK:STDOUT: %Op.ref: %I.assoc_type = name_ref Op, @I.WithSelf.%assoc0 [concrete = constants.%assoc0.aa8] -// CHECK:STDOUT: %impl.elem0.loc13_16.1: @GenericResult.%.loc13_16 (%.73b) = impl_witness_access constants.%I.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc13_16.2 (constants.%impl.elem0.d74)] -// CHECK:STDOUT: %bound_method.loc13_16: = bound_method %J.WithSelf.F.call.loc13_15, %impl.elem0.loc13_16.1 -// CHECK:STDOUT: %T.ref.loc13: %J.type = name_ref T, %T.loc12_19.2 [symbolic = %T.loc12_19.1 (constants.%T)] -// CHECK:STDOUT: %T.as_type.loc13: type = facet_access_type %T.ref.loc13 [symbolic = %T.as_type.loc12_28.1 (constants.%T.as_type)] -// CHECK:STDOUT: %.loc13_25: type = converted %T.ref.loc13, %T.as_type.loc13 [symbolic = %T.as_type.loc12_28.1 (constants.%T.as_type)] -// CHECK:STDOUT: %F.ref.loc13_25: %J.assoc_type = name_ref F, @J.WithSelf.%assoc1 [concrete = constants.%assoc1] -// CHECK:STDOUT: %impl.elem1.loc13_25: @GenericResult.%.loc13_11 (%.43f) = impl_witness_access constants.%J.lookup_impl_witness.264, element1 [symbolic = %impl.elem1.loc13_11.2 (constants.%impl.elem1)] -// CHECK:STDOUT: %u.ref.loc13_28: @GenericResult.%as_type.loc12_35.1 (%as_type.baf) = name_ref u, %u -// CHECK:STDOUT: %.loc13_29.1: %facet_type = converted constants.%as_type.baf, constants.%impl.elem0.397 [symbolic = %impl.elem0.loc12_35.1 (constants.%impl.elem0.397)] -// CHECK:STDOUT: %specific_impl_fn.loc13_25: = specific_impl_function %impl.elem1.loc13_25, @J.WithSelf.F(constants.%T) [symbolic = %specific_impl_fn.loc13_11.2 (constants.%specific_impl_fn.a64)] -// CHECK:STDOUT: %.loc13_29.2: ref @GenericResult.%as_type.loc12_35.1 (%as_type.baf) = temporary_storage -// CHECK:STDOUT: %J.WithSelf.F.call.loc13_29: init @GenericResult.%as_type.loc12_35.1 (%as_type.baf) to %.loc13_29.2 = call %specific_impl_fn.loc13_25(%u.ref.loc13_28) -// CHECK:STDOUT: %I.facet.loc13_30: %I.type = facet_value constants.%as_type.baf, (constants.%I.lookup_impl_witness) [symbolic = %I.facet.loc13_16 (constants.%I.facet)] -// CHECK:STDOUT: %.loc13_30: %I.type = converted constants.%as_type.baf, %I.facet.loc13_30 [symbolic = %I.facet.loc13_16 (constants.%I.facet)] -// CHECK:STDOUT: %specific_impl_fn.loc13_16.1: = specific_impl_function %impl.elem0.loc13_16.1, @I.WithSelf.Op(constants.%I.facet) [symbolic = %specific_impl_fn.loc13_16.2 (constants.%specific_impl_fn.b45)] -// CHECK:STDOUT: %bound_method.loc13_30: = bound_method %J.WithSelf.F.call.loc13_15, %specific_impl_fn.loc13_16.1 -// CHECK:STDOUT: %.loc12_43.1: ref @GenericResult.%as_type.loc12_35.1 (%as_type.baf) = splice_block %return.param {} -// CHECK:STDOUT: %.loc13_15.3: ref @GenericResult.%as_type.loc12_35.1 (%as_type.baf) = temporary %.loc13_15.2, %J.WithSelf.F.call.loc13_15 -// CHECK:STDOUT: %.loc13_15.4: @GenericResult.%as_type.loc12_35.1 (%as_type.baf) = acquire_value %.loc13_15.3 -// CHECK:STDOUT: %.loc13_29.3: ref @GenericResult.%as_type.loc12_35.1 (%as_type.baf) = temporary %.loc13_29.2, %J.WithSelf.F.call.loc13_29 -// CHECK:STDOUT: %.loc13_29.4: @GenericResult.%as_type.loc12_35.1 (%as_type.baf) = acquire_value %.loc13_29.3 -// CHECK:STDOUT: %I.WithSelf.Op.call: init @GenericResult.%as_type.loc12_35.1 (%as_type.baf) to %.loc12_43.1 = call %bound_method.loc13_30(%.loc13_15.4, %.loc13_29.4) -// CHECK:STDOUT: %impl.elem0.loc13_29.1: @GenericResult.%.loc13_29.5 (%.0e3) = impl_witness_access constants.%Destroy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc13_29.2 (constants.%impl.elem0.4a3)] -// CHECK:STDOUT: %bound_method.loc13_29.1: = bound_method %.loc13_29.3, %impl.elem0.loc13_29.1 -// CHECK:STDOUT: %specific_impl_fn.loc13_29.1: = specific_impl_function %impl.elem0.loc13_29.1, @Destroy.WithSelf.Op(constants.%Destroy.facet) [symbolic = %specific_impl_fn.loc13_29.2 (constants.%specific_impl_fn.86e)] -// CHECK:STDOUT: %bound_method.loc13_29.2: = bound_method %.loc13_29.3, %specific_impl_fn.loc13_29.1 -// CHECK:STDOUT: %Destroy.WithSelf.Op.call.loc13_29: init %empty_tuple.type = call %bound_method.loc13_29.2(%.loc13_29.3) -// CHECK:STDOUT: %impl.elem0.loc13_15: @GenericResult.%.loc13_29.5 (%.0e3) = impl_witness_access constants.%Destroy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc13_29.2 (constants.%impl.elem0.4a3)] -// CHECK:STDOUT: %bound_method.loc13_15.1: = bound_method %.loc13_15.3, %impl.elem0.loc13_15 -// CHECK:STDOUT: %specific_impl_fn.loc13_15: = specific_impl_function %impl.elem0.loc13_15, @Destroy.WithSelf.Op(constants.%Destroy.facet) [symbolic = %specific_impl_fn.loc13_29.2 (constants.%specific_impl_fn.86e)] -// CHECK:STDOUT: %bound_method.loc13_15.2: = bound_method %.loc13_15.3, %specific_impl_fn.loc13_15 -// CHECK:STDOUT: %Destroy.WithSelf.Op.call.loc13_15: init %empty_tuple.type = call %bound_method.loc13_15.2(%.loc13_15.3) -// CHECK:STDOUT: return %I.WithSelf.Op.call to %return.param -// CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: specific @I.WithSelf(constants.%Self.ab9) { -// CHECK:STDOUT: !definition: -// CHECK:STDOUT: %Self => constants.%Self.ab9 -// CHECK:STDOUT: %I.WithSelf.Op.type => constants.%I.WithSelf.Op.type.71c -// CHECK:STDOUT: %I.WithSelf.Op => constants.%I.WithSelf.Op.ae1 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: specific @I.WithSelf.Op(constants.%Self.ab9) { -// CHECK:STDOUT: %Self => constants.%Self.ab9 -// CHECK:STDOUT: %Self.as_type.loc4_15.1 => constants.%Self.as_type.a26 -// CHECK:STDOUT: %pattern_type => constants.%pattern_type.965 -// CHECK:STDOUT: %.loc4_33.1 => constants.%.eb0 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: specific @J.WithSelf(constants.%Self.8a1) { -// CHECK:STDOUT: !definition: -// CHECK:STDOUT: %Self => constants.%Self.8a1 -// CHECK:STDOUT: %J.WithSelf.F.type => constants.%J.WithSelf.F.type.adb -// CHECK:STDOUT: %J.WithSelf.F => constants.%J.WithSelf.F.569 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: specific @J.WithSelf.F(constants.%Self.8a1) { -// CHECK:STDOUT: %Self => constants.%Self.8a1 -// CHECK:STDOUT: %J.lookup_impl_witness => constants.%J.lookup_impl_witness.89e -// CHECK:STDOUT: %impl.elem0.loc9_11.1 => constants.%impl.elem0.193 -// CHECK:STDOUT: %as_type => constants.%as_type.d83 -// CHECK:STDOUT: %pattern_type => constants.%pattern_type.d76 -// CHECK:STDOUT: %.loc9_17.1 => constants.%.3f9 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: specific @J.WithSelf(constants.%T) { -// CHECK:STDOUT: !definition: -// CHECK:STDOUT: %Self => constants.%T -// CHECK:STDOUT: %J.WithSelf.F.type => constants.%J.WithSelf.F.type.41f -// CHECK:STDOUT: %J.WithSelf.F => constants.%J.WithSelf.F.f01 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: specific @GenericResult(constants.%T) { -// CHECK:STDOUT: %T.loc12_19.1 => constants.%T -// CHECK:STDOUT: %T.as_type.loc12_28.1 => constants.%T.as_type -// CHECK:STDOUT: %pattern_type.loc12_26 => constants.%pattern_type.5a3 -// CHECK:STDOUT: %J.lookup_impl_witness => constants.%J.lookup_impl_witness.264 -// CHECK:STDOUT: %impl.elem0.loc12_35.1 => constants.%impl.elem0.397 -// CHECK:STDOUT: %as_type.loc12_35.1 => constants.%as_type.baf -// CHECK:STDOUT: %pattern_type.loc12_32 => constants.%pattern_type.bba -// CHECK:STDOUT: %.loc12_43.2 => constants.%.076 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: specific @J.WithSelf.F(constants.%T) { -// CHECK:STDOUT: %Self => constants.%T -// CHECK:STDOUT: %J.lookup_impl_witness => constants.%J.lookup_impl_witness.264 -// CHECK:STDOUT: %impl.elem0.loc9_11.1 => constants.%impl.elem0.397 -// CHECK:STDOUT: %as_type => constants.%as_type.baf -// CHECK:STDOUT: %pattern_type => constants.%pattern_type.bba -// CHECK:STDOUT: %.loc9_17.1 => constants.%.076 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: specific @I.WithSelf(constants.%I.facet) { -// CHECK:STDOUT: !definition: -// CHECK:STDOUT: %Self => constants.%I.facet -// CHECK:STDOUT: %I.WithSelf.Op.type => constants.%I.WithSelf.Op.type.25c -// CHECK:STDOUT: %I.WithSelf.Op => constants.%I.WithSelf.Op.fdc -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: specific @I.WithSelf.Op(constants.%I.facet) { -// CHECK:STDOUT: %Self => constants.%I.facet -// CHECK:STDOUT: %Self.as_type.loc4_15.1 => constants.%as_type.baf -// CHECK:STDOUT: %pattern_type => constants.%pattern_type.bba -// CHECK:STDOUT: %.loc4_33.1 => constants.%.076 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: --- interface_qualified.carbon +// CHECK:STDOUT: --- use_associated_constant_in_impl.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %J.type: type = facet_type <@J> [concrete] -// CHECK:STDOUT: %Self: %J.type = symbolic_binding Self, 0 [symbolic] -// CHECK:STDOUT: %J.assoc_type: type = assoc_entity_type @J [concrete] -// CHECK:STDOUT: %assoc0: %J.assoc_type = assoc_entity element0, @J.WithSelf.%U [concrete] -// CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self [symbolic] -// CHECK:STDOUT: %pattern_type.909: type = pattern_type %Self.as_type [symbolic] -// CHECK:STDOUT: %J.lookup_impl_witness.89e: = lookup_impl_witness %Self, @J [symbolic] -// CHECK:STDOUT: %impl.elem0.335: type = impl_witness_access %J.lookup_impl_witness.89e, element0 [symbolic] -// CHECK:STDOUT: %pattern_type.c1a: type = pattern_type %impl.elem0.335 [symbolic] -// CHECK:STDOUT: %.77f: Core.Form = init_form %impl.elem0.335 [symbolic] -// CHECK:STDOUT: %J.WithSelf.G.type.ace: type = fn_type @J.WithSelf.G, @J.WithSelf(%Self) [symbolic] -// CHECK:STDOUT: %J.WithSelf.G.6e7: %J.WithSelf.G.type.ace = struct_value () [symbolic] -// CHECK:STDOUT: %assoc1: %J.assoc_type = assoc_entity element1, @J.WithSelf.%J.WithSelf.G.decl [concrete] -// CHECK:STDOUT: %type: type = facet_type [concrete] -// CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self] -// CHECK:STDOUT: %pattern_type.f76: type = pattern_type %J.type [concrete] -// CHECK:STDOUT: %T: %J.type = symbolic_binding T, 0 [symbolic] -// CHECK:STDOUT: %T.as_type: type = facet_access_type %T [symbolic] -// CHECK:STDOUT: %pattern_type.5a3: type = pattern_type %T.as_type [symbolic] -// CHECK:STDOUT: %J.WithSelf.G.type.b2e: type = fn_type @J.WithSelf.G, @J.WithSelf(%T) [symbolic] -// CHECK:STDOUT: %J.WithSelf.G.310: %J.WithSelf.G.type.b2e = struct_value () [symbolic] -// CHECK:STDOUT: %J.lookup_impl_witness.264: = lookup_impl_witness %T, @J [symbolic] -// CHECK:STDOUT: %impl.elem0.560: type = impl_witness_access %J.lookup_impl_witness.264, element0 [symbolic] -// CHECK:STDOUT: %pattern_type.ad6: type = pattern_type %impl.elem0.560 [symbolic] -// CHECK:STDOUT: %.a8e: Core.Form = init_form %impl.elem0.560 [symbolic] -// CHECK:STDOUT: %GenericCallInterfaceQualified.type: type = fn_type @GenericCallInterfaceQualified [concrete] -// CHECK:STDOUT: %GenericCallInterfaceQualified: %GenericCallInterfaceQualified.type = struct_value () [concrete] -// CHECK:STDOUT: %require_complete.bee: = require_complete_type %T.as_type [symbolic] -// CHECK:STDOUT: %require_complete.06a: = require_complete_type %impl.elem0.560 [symbolic] -// CHECK:STDOUT: %.298: type = fn_type_with_self_type %J.WithSelf.G.type.b2e, %T [symbolic] -// CHECK:STDOUT: %impl.elem1: %.298 = impl_witness_access %J.lookup_impl_witness.264, element1 [symbolic] -// CHECK:STDOUT: %specific_impl_fn: = specific_impl_function %impl.elem1, @J.WithSelf.G(%T) [symbolic] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: imports { -// CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { -// CHECK:STDOUT: import Core//prelude -// CHECK:STDOUT: import Core//prelude/... -// CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: file { -// CHECK:STDOUT: package: = namespace [concrete] { -// CHECK:STDOUT: .Core = imports.%Core -// CHECK:STDOUT: .J = %J.decl -// CHECK:STDOUT: .GenericCallInterfaceQualified = %GenericCallInterfaceQualified.decl -// CHECK:STDOUT: } -// CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %J.decl: type = interface_decl @J [concrete = constants.%J.type] {} {} -// CHECK:STDOUT: %GenericCallInterfaceQualified.decl: %GenericCallInterfaceQualified.type = fn_decl @GenericCallInterfaceQualified [concrete = constants.%GenericCallInterfaceQualified] { -// CHECK:STDOUT: %T.patt: %pattern_type.f76 = symbolic_binding_pattern T, 0 [concrete] -// CHECK:STDOUT: %t.param_patt: @GenericCallInterfaceQualified.%pattern_type.loc8_42 (%pattern_type.5a3) = value_param_pattern [concrete] -// CHECK:STDOUT: %t.patt: @GenericCallInterfaceQualified.%pattern_type.loc8_42 (%pattern_type.5a3) = at_binding_pattern t, %t.param_patt [concrete] -// CHECK:STDOUT: %u.param_patt: @GenericCallInterfaceQualified.%pattern_type.loc8_48 (%pattern_type.ad6) = value_param_pattern [concrete] -// CHECK:STDOUT: %u.patt: @GenericCallInterfaceQualified.%pattern_type.loc8_48 (%pattern_type.ad6) = at_binding_pattern u, %u.param_patt [concrete] -// CHECK:STDOUT: %return.param_patt: @GenericCallInterfaceQualified.%pattern_type.loc8_48 (%pattern_type.ad6) = out_param_pattern [concrete] -// CHECK:STDOUT: %return.patt: @GenericCallInterfaceQualified.%pattern_type.loc8_48 (%pattern_type.ad6) = return_slot_pattern %return.param_patt, %impl.elem0.loc8_59 [concrete] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %T.ref.loc8_58: %J.type = name_ref T, %T.loc8_35.2 [symbolic = %T.loc8_35.1 (constants.%T)] -// CHECK:STDOUT: %T.as_type.loc8_59: type = facet_access_type %T.ref.loc8_58 [symbolic = %T.as_type.loc8_44.1 (constants.%T.as_type)] -// CHECK:STDOUT: %.loc8_59.3: type = converted %T.ref.loc8_58, %T.as_type.loc8_59 [symbolic = %T.as_type.loc8_44.1 (constants.%T.as_type)] -// CHECK:STDOUT: %U.ref.loc8_59: %J.assoc_type = name_ref U, @U.%assoc0 [concrete = constants.%assoc0] -// CHECK:STDOUT: %impl.elem0.loc8_59: type = impl_witness_access constants.%J.lookup_impl_witness.264, element0 [symbolic = %impl.elem0.loc8_51.1 (constants.%impl.elem0.560)] -// CHECK:STDOUT: %.loc8_59.4: Core.Form = init_form %impl.elem0.loc8_59 [symbolic = %.loc8_59.2 (constants.%.a8e)] -// CHECK:STDOUT: %.loc8_38: type = splice_block %J.ref.loc8 [concrete = constants.%J.type] { -// CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self = constants.%.Self] -// CHECK:STDOUT: %J.ref.loc8: type = name_ref J, file.%J.decl [concrete = constants.%J.type] -// CHECK:STDOUT: } -// CHECK:STDOUT: %T.loc8_35.2: %J.type = symbolic_binding T, 0 [symbolic = %T.loc8_35.1 (constants.%T)] -// CHECK:STDOUT: %t.param: @GenericCallInterfaceQualified.%T.as_type.loc8_44.1 (%T.as_type) = value_param call_param0 -// CHECK:STDOUT: %.loc8_44.1: type = splice_block %.loc8_44.2 [symbolic = %T.as_type.loc8_44.1 (constants.%T.as_type)] { -// CHECK:STDOUT: %T.ref.loc8_44: %J.type = name_ref T, %T.loc8_35.2 [symbolic = %T.loc8_35.1 (constants.%T)] -// CHECK:STDOUT: %T.as_type.loc8_44.2: type = facet_access_type %T.ref.loc8_44 [symbolic = %T.as_type.loc8_44.1 (constants.%T.as_type)] -// CHECK:STDOUT: %.loc8_44.2: type = converted %T.ref.loc8_44, %T.as_type.loc8_44.2 [symbolic = %T.as_type.loc8_44.1 (constants.%T.as_type)] -// CHECK:STDOUT: } -// CHECK:STDOUT: %t: @GenericCallInterfaceQualified.%T.as_type.loc8_44.1 (%T.as_type) = value_binding t, %t.param -// CHECK:STDOUT: %u.param: @GenericCallInterfaceQualified.%impl.elem0.loc8_51.1 (%impl.elem0.560) = value_param call_param1 -// CHECK:STDOUT: %.loc8_51.1: type = splice_block %impl.elem0.loc8_51.2 [symbolic = %impl.elem0.loc8_51.1 (constants.%impl.elem0.560)] { -// CHECK:STDOUT: %T.ref.loc8_50: %J.type = name_ref T, %T.loc8_35.2 [symbolic = %T.loc8_35.1 (constants.%T)] -// CHECK:STDOUT: %T.as_type.loc8_51: type = facet_access_type %T.ref.loc8_50 [symbolic = %T.as_type.loc8_44.1 (constants.%T.as_type)] -// CHECK:STDOUT: %.loc8_51.2: type = converted %T.ref.loc8_50, %T.as_type.loc8_51 [symbolic = %T.as_type.loc8_44.1 (constants.%T.as_type)] -// CHECK:STDOUT: %U.ref.loc8_51: %J.assoc_type = name_ref U, @U.%assoc0 [concrete = constants.%assoc0] -// CHECK:STDOUT: %impl.elem0.loc8_51.2: type = impl_witness_access constants.%J.lookup_impl_witness.264, element0 [symbolic = %impl.elem0.loc8_51.1 (constants.%impl.elem0.560)] -// CHECK:STDOUT: } -// CHECK:STDOUT: %u: @GenericCallInterfaceQualified.%impl.elem0.loc8_51.1 (%impl.elem0.560) = value_binding u, %u.param -// CHECK:STDOUT: %return.param: ref @GenericCallInterfaceQualified.%impl.elem0.loc8_51.1 (%impl.elem0.560) = out_param call_param2 -// CHECK:STDOUT: %return: ref @GenericCallInterfaceQualified.%impl.elem0.loc8_51.1 (%impl.elem0.560) = return_slot %return.param -// CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: interface @J { -// CHECK:STDOUT: %Self: %J.type = symbolic_binding Self, 0 [symbolic = constants.%Self] -// CHECK:STDOUT: %J.WithSelf.decl = interface_with_self_decl @J [concrete] -// CHECK:STDOUT: -// CHECK:STDOUT: !with Self: -// CHECK:STDOUT: %U: type = assoc_const_decl @U [concrete] { -// CHECK:STDOUT: %assoc0: %J.assoc_type = assoc_entity element0, @J.WithSelf.%U [concrete = constants.%assoc0] -// CHECK:STDOUT: } -// CHECK:STDOUT: %J.WithSelf.G.decl: @J.WithSelf.%J.WithSelf.G.type (%J.WithSelf.G.type.ace) = fn_decl @J.WithSelf.G [symbolic = @J.WithSelf.%J.WithSelf.G (constants.%J.WithSelf.G.6e7)] { -// CHECK:STDOUT: %self.param_patt: @J.WithSelf.G.%pattern_type.loc5_12 (%pattern_type.909) = value_param_pattern [concrete] -// CHECK:STDOUT: %self.patt: @J.WithSelf.G.%pattern_type.loc5_12 (%pattern_type.909) = at_binding_pattern self, %self.param_patt [concrete] -// CHECK:STDOUT: %v.param_patt: @J.WithSelf.G.%pattern_type.loc5_21 (%pattern_type.c1a) = value_param_pattern [concrete] -// CHECK:STDOUT: %v.patt: @J.WithSelf.G.%pattern_type.loc5_21 (%pattern_type.c1a) = at_binding_pattern v, %v.param_patt [concrete] -// CHECK:STDOUT: %return.param_patt: @J.WithSelf.G.%pattern_type.loc5_21 (%pattern_type.c1a) = out_param_pattern [concrete] -// CHECK:STDOUT: %return.patt: @J.WithSelf.G.%pattern_type.loc5_21 (%pattern_type.c1a) = return_slot_pattern %return.param_patt, %U.ref.loc5_29 [concrete] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %impl.elem0.loc5_29: type = impl_witness_access constants.%J.lookup_impl_witness.89e, element0 [symbolic = %impl.elem0.loc5_23.1 (constants.%impl.elem0.335)] -// CHECK:STDOUT: %U.ref.loc5_29: type = name_ref U, %impl.elem0.loc5_29 [symbolic = %impl.elem0.loc5_23.1 (constants.%impl.elem0.335)] -// CHECK:STDOUT: %.loc5_29.2: Core.Form = init_form %U.ref.loc5_29 [symbolic = %.loc5_29.1 (constants.%.77f)] -// CHECK:STDOUT: %self.param: @J.WithSelf.G.%Self.as_type.loc5_14.1 (%Self.as_type) = value_param call_param0 -// CHECK:STDOUT: %.loc5_14.1: type = splice_block %.loc5_14.2 [symbolic = %Self.as_type.loc5_14.1 (constants.%Self.as_type)] { -// CHECK:STDOUT: %Self.ref: %J.type = name_ref Self, @J.%Self [symbolic = %Self (constants.%Self)] -// CHECK:STDOUT: %Self.as_type.loc5_14.2: type = facet_access_type %Self.ref [symbolic = %Self.as_type.loc5_14.1 (constants.%Self.as_type)] -// CHECK:STDOUT: %.loc5_14.2: type = converted %Self.ref, %Self.as_type.loc5_14.2 [symbolic = %Self.as_type.loc5_14.1 (constants.%Self.as_type)] -// CHECK:STDOUT: } -// CHECK:STDOUT: %self: @J.WithSelf.G.%Self.as_type.loc5_14.1 (%Self.as_type) = value_binding self, %self.param -// CHECK:STDOUT: %v.param: @J.WithSelf.G.%impl.elem0.loc5_23.1 (%impl.elem0.335) = value_param call_param1 -// CHECK:STDOUT: %.loc5_23: type = splice_block %U.ref.loc5_23 [symbolic = %impl.elem0.loc5_23.1 (constants.%impl.elem0.335)] { -// CHECK:STDOUT: %impl.elem0.loc5_23.2: type = impl_witness_access constants.%J.lookup_impl_witness.89e, element0 [symbolic = %impl.elem0.loc5_23.1 (constants.%impl.elem0.335)] -// CHECK:STDOUT: %U.ref.loc5_23: type = name_ref U, %impl.elem0.loc5_23.2 [symbolic = %impl.elem0.loc5_23.1 (constants.%impl.elem0.335)] -// CHECK:STDOUT: } -// CHECK:STDOUT: %v: @J.WithSelf.G.%impl.elem0.loc5_23.1 (%impl.elem0.335) = value_binding v, %v.param -// CHECK:STDOUT: %return.param: ref @J.WithSelf.G.%impl.elem0.loc5_23.1 (%impl.elem0.335) = out_param call_param2 -// CHECK:STDOUT: %return: ref @J.WithSelf.G.%impl.elem0.loc5_23.1 (%impl.elem0.335) = return_slot %return.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %assoc1: %J.assoc_type = assoc_entity element1, %J.WithSelf.G.decl [concrete = constants.%assoc1] -// CHECK:STDOUT: -// CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = %Self -// CHECK:STDOUT: .U = @U.%assoc0 -// CHECK:STDOUT: .G = @J.WithSelf.%assoc1 -// CHECK:STDOUT: witness = (@J.WithSelf.%U, @J.WithSelf.%J.WithSelf.G.decl) -// CHECK:STDOUT: -// CHECK:STDOUT: !requires: -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generic fn @J.WithSelf.G(@J.%Self: %J.type) { -// CHECK:STDOUT: %Self: %J.type = symbolic_binding Self, 0 [symbolic = %Self (constants.%Self)] -// CHECK:STDOUT: %Self.as_type.loc5_14.1: type = facet_access_type %Self [symbolic = %Self.as_type.loc5_14.1 (constants.%Self.as_type)] -// CHECK:STDOUT: %pattern_type.loc5_12: type = pattern_type %Self.as_type.loc5_14.1 [symbolic = %pattern_type.loc5_12 (constants.%pattern_type.909)] -// CHECK:STDOUT: %J.lookup_impl_witness: = lookup_impl_witness %Self, @J [symbolic = %J.lookup_impl_witness (constants.%J.lookup_impl_witness.89e)] -// CHECK:STDOUT: %impl.elem0.loc5_23.1: type = impl_witness_access %J.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc5_23.1 (constants.%impl.elem0.335)] -// CHECK:STDOUT: %pattern_type.loc5_21: type = pattern_type %impl.elem0.loc5_23.1 [symbolic = %pattern_type.loc5_21 (constants.%pattern_type.c1a)] -// CHECK:STDOUT: %.loc5_29.1: Core.Form = init_form %impl.elem0.loc5_23.1 [symbolic = %.loc5_29.1 (constants.%.77f)] -// CHECK:STDOUT: -// CHECK:STDOUT: fn(%self.param: @J.WithSelf.G.%Self.as_type.loc5_14.1 (%Self.as_type), %v.param: @J.WithSelf.G.%impl.elem0.loc5_23.1 (%impl.elem0.335)) -> out %return.param: @J.WithSelf.G.%impl.elem0.loc5_23.1 (%impl.elem0.335); -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generic fn @GenericCallInterfaceQualified(%T.loc8_35.2: %J.type) { -// CHECK:STDOUT: %T.loc8_35.1: %J.type = symbolic_binding T, 0 [symbolic = %T.loc8_35.1 (constants.%T)] -// CHECK:STDOUT: %T.as_type.loc8_44.1: type = facet_access_type %T.loc8_35.1 [symbolic = %T.as_type.loc8_44.1 (constants.%T.as_type)] -// CHECK:STDOUT: %pattern_type.loc8_42: type = pattern_type %T.as_type.loc8_44.1 [symbolic = %pattern_type.loc8_42 (constants.%pattern_type.5a3)] -// CHECK:STDOUT: %J.lookup_impl_witness: = lookup_impl_witness %T.loc8_35.1, @J [symbolic = %J.lookup_impl_witness (constants.%J.lookup_impl_witness.264)] -// CHECK:STDOUT: %impl.elem0.loc8_51.1: type = impl_witness_access %J.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc8_51.1 (constants.%impl.elem0.560)] -// CHECK:STDOUT: %pattern_type.loc8_48: type = pattern_type %impl.elem0.loc8_51.1 [symbolic = %pattern_type.loc8_48 (constants.%pattern_type.ad6)] -// CHECK:STDOUT: %.loc8_59.2: Core.Form = init_form %impl.elem0.loc8_51.1 [symbolic = %.loc8_59.2 (constants.%.a8e)] -// CHECK:STDOUT: -// CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete.loc8_42: = require_complete_type %T.as_type.loc8_44.1 [symbolic = %require_complete.loc8_42 (constants.%require_complete.bee)] -// CHECK:STDOUT: %require_complete.loc8_48: = require_complete_type %impl.elem0.loc8_51.1 [symbolic = %require_complete.loc8_48 (constants.%require_complete.06a)] -// CHECK:STDOUT: %J.WithSelf.G.type: type = fn_type @J.WithSelf.G, @J.WithSelf(%T.loc8_35.1) [symbolic = %J.WithSelf.G.type (constants.%J.WithSelf.G.type.b2e)] -// CHECK:STDOUT: %.loc9: type = fn_type_with_self_type %J.WithSelf.G.type, %T.loc8_35.1 [symbolic = %.loc9 (constants.%.298)] -// CHECK:STDOUT: %impl.elem1.loc9_11.2: @GenericCallInterfaceQualified.%.loc9 (%.298) = impl_witness_access %J.lookup_impl_witness, element1 [symbolic = %impl.elem1.loc9_11.2 (constants.%impl.elem1)] -// CHECK:STDOUT: %specific_impl_fn.loc9_11.2: = specific_impl_function %impl.elem1.loc9_11.2, @J.WithSelf.G(%T.loc8_35.1) [symbolic = %specific_impl_fn.loc9_11.2 (constants.%specific_impl_fn)] -// CHECK:STDOUT: -// CHECK:STDOUT: fn(%t.param: @GenericCallInterfaceQualified.%T.as_type.loc8_44.1 (%T.as_type), %u.param: @GenericCallInterfaceQualified.%impl.elem0.loc8_51.1 (%impl.elem0.560)) -> out %return.param: @GenericCallInterfaceQualified.%impl.elem0.loc8_51.1 (%impl.elem0.560) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %t.ref: @GenericCallInterfaceQualified.%T.as_type.loc8_44.1 (%T.as_type) = name_ref t, %t -// CHECK:STDOUT: %J.ref.loc9: type = name_ref J, file.%J.decl [concrete = constants.%J.type] -// CHECK:STDOUT: %G.ref: %J.assoc_type = name_ref G, @J.WithSelf.%assoc1 [concrete = constants.%assoc1] -// CHECK:STDOUT: %impl.elem1.loc9_11.1: @GenericCallInterfaceQualified.%.loc9 (%.298) = impl_witness_access constants.%J.lookup_impl_witness.264, element1 [symbolic = %impl.elem1.loc9_11.2 (constants.%impl.elem1)] -// CHECK:STDOUT: %bound_method.loc9_11: = bound_method %t.ref, %impl.elem1.loc9_11.1 -// CHECK:STDOUT: %u.ref: @GenericCallInterfaceQualified.%impl.elem0.loc8_51.1 (%impl.elem0.560) = name_ref u, %u -// CHECK:STDOUT: %specific_impl_fn.loc9_11.1: = specific_impl_function %impl.elem1.loc9_11.1, @J.WithSelf.G(constants.%T) [symbolic = %specific_impl_fn.loc9_11.2 (constants.%specific_impl_fn)] -// CHECK:STDOUT: %bound_method.loc9_19: = bound_method %t.ref, %specific_impl_fn.loc9_11.1 -// CHECK:STDOUT: %.loc8_59.1: ref @GenericCallInterfaceQualified.%impl.elem0.loc8_51.1 (%impl.elem0.560) = splice_block %return.param {} -// CHECK:STDOUT: %J.WithSelf.G.call: init @GenericCallInterfaceQualified.%impl.elem0.loc8_51.1 (%impl.elem0.560) to %.loc8_59.1 = call %bound_method.loc9_19(%t.ref, %u.ref) -// CHECK:STDOUT: return %J.WithSelf.G.call to %return.param -// CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: specific @J.WithSelf(constants.%Self) { -// CHECK:STDOUT: !definition: -// CHECK:STDOUT: %Self => constants.%Self -// CHECK:STDOUT: %J.WithSelf.G.type => constants.%J.WithSelf.G.type.ace -// CHECK:STDOUT: %J.WithSelf.G => constants.%J.WithSelf.G.6e7 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: specific @J.WithSelf.G(constants.%Self) { -// CHECK:STDOUT: %Self => constants.%Self -// CHECK:STDOUT: %Self.as_type.loc5_14.1 => constants.%Self.as_type -// CHECK:STDOUT: %pattern_type.loc5_12 => constants.%pattern_type.909 -// CHECK:STDOUT: %J.lookup_impl_witness => constants.%J.lookup_impl_witness.89e -// CHECK:STDOUT: %impl.elem0.loc5_23.1 => constants.%impl.elem0.335 -// CHECK:STDOUT: %pattern_type.loc5_21 => constants.%pattern_type.c1a -// CHECK:STDOUT: %.loc5_29.1 => constants.%.77f -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: specific @J.WithSelf(constants.%T) { -// CHECK:STDOUT: !definition: -// CHECK:STDOUT: %Self => constants.%T -// CHECK:STDOUT: %J.WithSelf.G.type => constants.%J.WithSelf.G.type.b2e -// CHECK:STDOUT: %J.WithSelf.G => constants.%J.WithSelf.G.310 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: specific @GenericCallInterfaceQualified(constants.%T) { -// CHECK:STDOUT: %T.loc8_35.1 => constants.%T -// CHECK:STDOUT: %T.as_type.loc8_44.1 => constants.%T.as_type -// CHECK:STDOUT: %pattern_type.loc8_42 => constants.%pattern_type.5a3 -// CHECK:STDOUT: %J.lookup_impl_witness => constants.%J.lookup_impl_witness.264 -// CHECK:STDOUT: %impl.elem0.loc8_51.1 => constants.%impl.elem0.560 -// CHECK:STDOUT: %pattern_type.loc8_48 => constants.%pattern_type.ad6 -// CHECK:STDOUT: %.loc8_59.2 => constants.%.a8e -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: specific @J.WithSelf.G(constants.%T) { -// CHECK:STDOUT: %Self => constants.%T -// CHECK:STDOUT: %Self.as_type.loc5_14.1 => constants.%T.as_type -// CHECK:STDOUT: %pattern_type.loc5_12 => constants.%pattern_type.5a3 -// CHECK:STDOUT: %J.lookup_impl_witness => constants.%J.lookup_impl_witness.264 -// CHECK:STDOUT: %impl.elem0.loc5_23.1 => constants.%impl.elem0.560 -// CHECK:STDOUT: %pattern_type.loc5_21 => constants.%pattern_type.ad6 -// CHECK:STDOUT: %.loc5_29.1 => constants.%.a8e -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: --- use_where.carbon -// CHECK:STDOUT: -// CHECK:STDOUT: constants { -// CHECK:STDOUT: %J.type: type = facet_type <@J> [concrete] -// CHECK:STDOUT: %Self.8a1: %J.type = symbolic_binding Self, 0 [symbolic] -// CHECK:STDOUT: %J.assoc_type: type = assoc_entity_type @J [concrete] -// CHECK:STDOUT: %assoc0.ebd: %J.assoc_type = assoc_entity element0, @J.WithSelf.%U [concrete] -// CHECK:STDOUT: %J.lookup_impl_witness.89e: = lookup_impl_witness %Self.8a1, @J [symbolic] -// CHECK:STDOUT: %impl.elem0.335: type = impl_witness_access %J.lookup_impl_witness.89e, element0 [symbolic] -// CHECK:STDOUT: %pattern_type.c1a: type = pattern_type %impl.elem0.335 [symbolic] -// CHECK:STDOUT: %.77f: Core.Form = init_form %impl.elem0.335 [symbolic] -// CHECK:STDOUT: %J.WithSelf.F.type.adb: type = fn_type @J.WithSelf.F, @J.WithSelf(%Self.8a1) [symbolic] -// CHECK:STDOUT: %J.WithSelf.F.569: %J.WithSelf.F.type.adb = struct_value () [symbolic] -// CHECK:STDOUT: %assoc1: %J.assoc_type = assoc_entity element1, @J.WithSelf.%J.WithSelf.F.decl [concrete] -// CHECK:STDOUT: %type: type = facet_type [concrete] -// CHECK:STDOUT: %.Self.c39: %type = symbolic_binding .Self [symbolic_self] -// CHECK:STDOUT: %.Self.2fa: %J.type = symbolic_binding .Self [symbolic_self] -// CHECK:STDOUT: %J.WithSelf.F.type.e19: type = fn_type @J.WithSelf.F, @J.WithSelf(%.Self.2fa) [symbolic_self] -// CHECK:STDOUT: %J.WithSelf.F.659: %J.WithSelf.F.type.e19 = struct_value () [symbolic_self] -// CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.2fa [symbolic_self] -// CHECK:STDOUT: %J.lookup_impl_witness.46a: = lookup_impl_witness %.Self.2fa, @J [symbolic_self] -// CHECK:STDOUT: %impl.elem0.a58: type = impl_witness_access %J.lookup_impl_witness.46a, element0 [symbolic_self] -// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete] -// CHECK:STDOUT: %Int.type: type = generic_class_type @Int [concrete] -// CHECK:STDOUT: %Int.generic: %Int.type = struct_value () [concrete] -// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete] -// CHECK:STDOUT: %J_where.type: type = facet_type <@J where %impl.elem0.a58 = %i32> [concrete] -// CHECK:STDOUT: %pattern_type.6f0: type = pattern_type %J_where.type [concrete] -// CHECK:STDOUT: %T: %J_where.type = symbolic_binding T, 0 [symbolic] -// CHECK:STDOUT: %T.as_type: type = facet_access_type %T [symbolic] -// CHECK:STDOUT: %pattern_type.703: type = pattern_type %T.as_type [symbolic] -// CHECK:STDOUT: %.ff5: Core.Form = init_form %i32 [concrete] -// CHECK:STDOUT: %pattern_type.7ce: type = pattern_type %i32 [concrete] -// CHECK:STDOUT: %GenericCallFI32.type: type = fn_type @GenericCallFI32 [concrete] -// CHECK:STDOUT: %GenericCallFI32: %GenericCallFI32.type = struct_value () [concrete] -// CHECK:STDOUT: %require_complete.f6c: = require_complete_type %T.as_type [symbolic] -// CHECK:STDOUT: %J.WithSelf.F.type.4bb: type = fn_type @J.WithSelf.F, @J.WithSelf(%T) [symbolic] -// CHECK:STDOUT: %J.WithSelf.F.3c9: %J.WithSelf.F.type.4bb = struct_value () [symbolic] -// CHECK:STDOUT: %J.lookup_impl_witness.74d: = lookup_impl_witness %T, @J [symbolic] -// CHECK:STDOUT: %J.facet: %J.type = facet_value %T.as_type, (%J.lookup_impl_witness.74d) [symbolic] -// CHECK:STDOUT: %J.WithSelf.F.type.082: type = fn_type @J.WithSelf.F, @J.WithSelf(%J.facet) [symbolic] -// CHECK:STDOUT: %J.WithSelf.F.efc: %J.WithSelf.F.type.082 = struct_value () [symbolic] -// CHECK:STDOUT: %.075: type = fn_type_with_self_type %J.WithSelf.F.type.082, %J.facet [symbolic] -// CHECK:STDOUT: %impl.elem1: %.075 = impl_witness_access %J.lookup_impl_witness.74d, element1 [symbolic] -// CHECK:STDOUT: %int_2.ecc: Core.IntLiteral = int_value 2 [concrete] -// CHECK:STDOUT: %specific_impl_fn: = specific_impl_function %impl.elem1, @J.WithSelf.F(%J.facet) [symbolic] -// CHECK:STDOUT: %ImplicitAs.type.cc7: type = generic_interface_type @ImplicitAs [concrete] -// CHECK:STDOUT: %ImplicitAs.generic: %ImplicitAs.type.cc7 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.type.e8c: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] -// CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic] -// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.f67: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%To) [symbolic] -// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.8fd: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.f67 = struct_value () [symbolic] -// CHECK:STDOUT: %ImplicitAs.impl_witness.ac5: = impl_witness imports.%ImplicitAs.impl_witness_table.82d, @Core.IntLiteral.as.ImplicitAs.impl(%int_32) [concrete] -// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.a56: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%int_32) [concrete] -// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.f1a: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.a56 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.e8c = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.ac5) [concrete] -// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.b91: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs.WithSelf(%i32, %ImplicitAs.facet) [concrete] -// CHECK:STDOUT: %.9db: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.b91, %ImplicitAs.facet [concrete] -// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound: = bound_method %int_2.ecc, %Core.IntLiteral.as.ImplicitAs.impl.Convert.f1a [concrete] -// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.f1a, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete] -// CHECK:STDOUT: %bound_method: = bound_method %int_2.ecc, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] -// CHECK:STDOUT: %int_2.ef8: %i32 = int_value 2 [concrete] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: imports { -// CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { -// CHECK:STDOUT: .Int = %Core.Int -// CHECK:STDOUT: .ImplicitAs = %Core.ImplicitAs -// CHECK:STDOUT: import Core//prelude -// CHECK:STDOUT: import Core//prelude/... -// CHECK:STDOUT: } -// CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/parts/int, Int, loaded [concrete = constants.%Int.generic] -// CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.cc7 = import_ref Core//prelude/parts/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic] -// CHECK:STDOUT: %Core.import_ref.70a: @Core.IntLiteral.as.ImplicitAs.impl.%Core.IntLiteral.as.ImplicitAs.impl.Convert.type (%Core.IntLiteral.as.ImplicitAs.impl.Convert.type.f67) = import_ref Core//prelude/parts/int, loc{{\d+_\d+}}, loaded [symbolic = @Core.IntLiteral.as.ImplicitAs.impl.%Core.IntLiteral.as.ImplicitAs.impl.Convert (constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.8fd)] -// CHECK:STDOUT: %ImplicitAs.impl_witness_table.82d = impl_witness_table (%Core.import_ref.70a), @Core.IntLiteral.as.ImplicitAs.impl [concrete] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: file { -// CHECK:STDOUT: package: = namespace [concrete] { -// CHECK:STDOUT: .Core = imports.%Core -// CHECK:STDOUT: .J = %J.decl -// CHECK:STDOUT: .GenericCallFI32 = %GenericCallFI32.decl -// CHECK:STDOUT: } -// CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %J.decl: type = interface_decl @J [concrete = constants.%J.type] {} {} -// CHECK:STDOUT: %GenericCallFI32.decl: %GenericCallFI32.type = fn_decl @GenericCallFI32 [concrete = constants.%GenericCallFI32] { -// CHECK:STDOUT: %T.patt: %pattern_type.6f0 = symbolic_binding_pattern T, 0 [concrete] -// CHECK:STDOUT: %t.param_patt: @GenericCallFI32.%pattern_type (%pattern_type.703) = value_param_pattern [concrete] -// CHECK:STDOUT: %t.patt: @GenericCallFI32.%pattern_type (%pattern_type.703) = at_binding_pattern t, %t.param_patt [concrete] -// CHECK:STDOUT: %return.param_patt: %pattern_type.7ce = out_param_pattern [concrete] -// CHECK:STDOUT: %return.patt: %pattern_type.7ce = return_slot_pattern %return.param_patt, %i32.loc8_51 [concrete] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %i32.loc8_51: type = type_literal constants.%i32 [concrete = constants.%i32] -// CHECK:STDOUT: %.loc8_51: Core.Form = init_form %i32.loc8_51 [concrete = constants.%.ff5] -// CHECK:STDOUT: %.loc8_26.1: type = splice_block %.loc8_26.2 [concrete = constants.%J_where.type] { -// CHECK:STDOUT: %.Self.loc8_21: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.c39] -// CHECK:STDOUT: %J.ref: type = name_ref J, file.%J.decl [concrete = constants.%J.type] -// CHECK:STDOUT: %.Self.loc8_26: %J.type = symbolic_binding .Self [symbolic_self = constants.%.Self.2fa] -// CHECK:STDOUT: %.Self.ref: %J.type = name_ref .Self, %.Self.loc8_26 [symbolic_self = constants.%.Self.2fa] -// CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref [symbolic_self = constants.%.Self.as_type] -// CHECK:STDOUT: %.loc8_32: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.as_type] -// CHECK:STDOUT: %U.ref: %J.assoc_type = name_ref U, @U.%assoc0 [concrete = constants.%assoc0.ebd] -// CHECK:STDOUT: %impl.elem0.loc8: type = impl_witness_access constants.%J.lookup_impl_witness.46a, element0 [symbolic_self = constants.%impl.elem0.a58] -// CHECK:STDOUT: %i32.loc8_37: type = type_literal constants.%i32 [concrete = constants.%i32] -// CHECK:STDOUT: %.loc8_26.2: type = where_expr [concrete = constants.%J_where.type] { -// CHECK:STDOUT: requirement_base_facet_type %J.ref -// CHECK:STDOUT: requirement_rewrite %impl.elem0.loc8, %i32.loc8_37 -// CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: %T.loc8_21.2: %J_where.type = symbolic_binding T, 0 [symbolic = %T.loc8_21.1 (constants.%T)] -// CHECK:STDOUT: %t.param: @GenericCallFI32.%T.as_type.loc8_45.1 (%T.as_type) = value_param call_param0 -// CHECK:STDOUT: %.loc8_45.1: type = splice_block %.loc8_45.2 [symbolic = %T.as_type.loc8_45.1 (constants.%T.as_type)] { -// CHECK:STDOUT: %T.ref: %J_where.type = name_ref T, %T.loc8_21.2 [symbolic = %T.loc8_21.1 (constants.%T)] -// CHECK:STDOUT: %T.as_type.loc8_45.2: type = facet_access_type %T.ref [symbolic = %T.as_type.loc8_45.1 (constants.%T.as_type)] -// CHECK:STDOUT: %.loc8_45.2: type = converted %T.ref, %T.as_type.loc8_45.2 [symbolic = %T.as_type.loc8_45.1 (constants.%T.as_type)] -// CHECK:STDOUT: } -// CHECK:STDOUT: %t: @GenericCallFI32.%T.as_type.loc8_45.1 (%T.as_type) = value_binding t, %t.param -// CHECK:STDOUT: %return.param: ref %i32 = out_param call_param1 -// CHECK:STDOUT: %return: ref %i32 = return_slot %return.param -// CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: interface @J { -// CHECK:STDOUT: %Self: %J.type = symbolic_binding Self, 0 [symbolic = constants.%Self.8a1] -// CHECK:STDOUT: %J.WithSelf.decl = interface_with_self_decl @J [concrete] -// CHECK:STDOUT: -// CHECK:STDOUT: !with Self: -// CHECK:STDOUT: %U: type = assoc_const_decl @U [concrete] { -// CHECK:STDOUT: %assoc0: %J.assoc_type = assoc_entity element0, @J.WithSelf.%U [concrete = constants.%assoc0.ebd] -// CHECK:STDOUT: } -// CHECK:STDOUT: %J.WithSelf.F.decl: @J.WithSelf.%J.WithSelf.F.type (%J.WithSelf.F.type.adb) = fn_decl @J.WithSelf.F [symbolic = @J.WithSelf.%J.WithSelf.F (constants.%J.WithSelf.F.569)] { -// CHECK:STDOUT: %u.param_patt: @J.WithSelf.F.%pattern_type (%pattern_type.c1a) = value_param_pattern [concrete] -// CHECK:STDOUT: %u.patt: @J.WithSelf.F.%pattern_type (%pattern_type.c1a) = at_binding_pattern u, %u.param_patt [concrete] -// CHECK:STDOUT: %return.param_patt: @J.WithSelf.F.%pattern_type (%pattern_type.c1a) = out_param_pattern [concrete] -// CHECK:STDOUT: %return.patt: @J.WithSelf.F.%pattern_type (%pattern_type.c1a) = return_slot_pattern %return.param_patt, %U.ref.loc5_17 [concrete] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %impl.elem0.loc5_17: type = impl_witness_access constants.%J.lookup_impl_witness.89e, element0 [symbolic = %impl.elem0.loc5_11.1 (constants.%impl.elem0.335)] -// CHECK:STDOUT: %U.ref.loc5_17: type = name_ref U, %impl.elem0.loc5_17 [symbolic = %impl.elem0.loc5_11.1 (constants.%impl.elem0.335)] -// CHECK:STDOUT: %.loc5_17.2: Core.Form = init_form %U.ref.loc5_17 [symbolic = %.loc5_17.1 (constants.%.77f)] -// CHECK:STDOUT: %u.param: @J.WithSelf.F.%impl.elem0.loc5_11.1 (%impl.elem0.335) = value_param call_param0 -// CHECK:STDOUT: %.loc5_11: type = splice_block %U.ref.loc5_11 [symbolic = %impl.elem0.loc5_11.1 (constants.%impl.elem0.335)] { -// CHECK:STDOUT: %impl.elem0.loc5_11.2: type = impl_witness_access constants.%J.lookup_impl_witness.89e, element0 [symbolic = %impl.elem0.loc5_11.1 (constants.%impl.elem0.335)] -// CHECK:STDOUT: %U.ref.loc5_11: type = name_ref U, %impl.elem0.loc5_11.2 [symbolic = %impl.elem0.loc5_11.1 (constants.%impl.elem0.335)] -// CHECK:STDOUT: } -// CHECK:STDOUT: %u: @J.WithSelf.F.%impl.elem0.loc5_11.1 (%impl.elem0.335) = value_binding u, %u.param -// CHECK:STDOUT: %return.param: ref @J.WithSelf.F.%impl.elem0.loc5_11.1 (%impl.elem0.335) = out_param call_param1 -// CHECK:STDOUT: %return: ref @J.WithSelf.F.%impl.elem0.loc5_11.1 (%impl.elem0.335) = return_slot %return.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %assoc1: %J.assoc_type = assoc_entity element1, %J.WithSelf.F.decl [concrete = constants.%assoc1] -// CHECK:STDOUT: -// CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = %Self -// CHECK:STDOUT: .U = @U.%assoc0 -// CHECK:STDOUT: .F = @J.WithSelf.%assoc1 -// CHECK:STDOUT: witness = (@J.WithSelf.%U, @J.WithSelf.%J.WithSelf.F.decl) -// CHECK:STDOUT: -// CHECK:STDOUT: !requires: -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generic fn @J.WithSelf.F(@J.%Self: %J.type) { -// CHECK:STDOUT: %Self: %J.type = symbolic_binding Self, 0 [symbolic = %Self (constants.%Self.8a1)] -// CHECK:STDOUT: %J.lookup_impl_witness: = lookup_impl_witness %Self, @J [symbolic = %J.lookup_impl_witness (constants.%J.lookup_impl_witness.89e)] -// CHECK:STDOUT: %impl.elem0.loc5_11.1: type = impl_witness_access %J.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc5_11.1 (constants.%impl.elem0.335)] -// CHECK:STDOUT: %pattern_type: type = pattern_type %impl.elem0.loc5_11.1 [symbolic = %pattern_type (constants.%pattern_type.c1a)] -// CHECK:STDOUT: %.loc5_17.1: Core.Form = init_form %impl.elem0.loc5_11.1 [symbolic = %.loc5_17.1 (constants.%.77f)] -// CHECK:STDOUT: -// CHECK:STDOUT: fn(%u.param: @J.WithSelf.F.%impl.elem0.loc5_11.1 (%impl.elem0.335)) -> out %return.param: @J.WithSelf.F.%impl.elem0.loc5_11.1 (%impl.elem0.335); -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generic fn @GenericCallFI32(%T.loc8_21.2: %J_where.type) { -// CHECK:STDOUT: %T.loc8_21.1: %J_where.type = symbolic_binding T, 0 [symbolic = %T.loc8_21.1 (constants.%T)] -// CHECK:STDOUT: %T.as_type.loc8_45.1: type = facet_access_type %T.loc8_21.1 [symbolic = %T.as_type.loc8_45.1 (constants.%T.as_type)] -// CHECK:STDOUT: %pattern_type: type = pattern_type %T.as_type.loc8_45.1 [symbolic = %pattern_type (constants.%pattern_type.703)] -// CHECK:STDOUT: -// CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete: = require_complete_type %T.as_type.loc8_45.1 [symbolic = %require_complete (constants.%require_complete.f6c)] -// CHECK:STDOUT: %J.lookup_impl_witness: = lookup_impl_witness %T.loc8_21.1, @J [symbolic = %J.lookup_impl_witness (constants.%J.lookup_impl_witness.74d)] -// CHECK:STDOUT: %J.facet: %J.type = facet_value %T.as_type.loc8_45.1, (%J.lookup_impl_witness) [symbolic = %J.facet (constants.%J.facet)] -// CHECK:STDOUT: %J.WithSelf.F.type: type = fn_type @J.WithSelf.F, @J.WithSelf(%J.facet) [symbolic = %J.WithSelf.F.type (constants.%J.WithSelf.F.type.082)] -// CHECK:STDOUT: %.loc9_11: type = fn_type_with_self_type %J.WithSelf.F.type, %J.facet [symbolic = %.loc9_11 (constants.%.075)] -// CHECK:STDOUT: %impl.elem1.loc9_11.2: @GenericCallFI32.%.loc9_11 (%.075) = impl_witness_access %J.lookup_impl_witness, element1 [symbolic = %impl.elem1.loc9_11.2 (constants.%impl.elem1)] -// CHECK:STDOUT: %specific_impl_fn.loc9_11.2: = specific_impl_function %impl.elem1.loc9_11.2, @J.WithSelf.F(%J.facet) [symbolic = %specific_impl_fn.loc9_11.2 (constants.%specific_impl_fn)] -// CHECK:STDOUT: -// CHECK:STDOUT: fn(%t.param: @GenericCallFI32.%T.as_type.loc8_45.1 (%T.as_type)) -> out %return.param: %i32 { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %t.ref: @GenericCallFI32.%T.as_type.loc8_45.1 (%T.as_type) = name_ref t, %t -// CHECK:STDOUT: %F.ref: %J.assoc_type = name_ref F, @J.WithSelf.%assoc1 [concrete = constants.%assoc1] -// CHECK:STDOUT: %impl.elem1.loc9_11.1: @GenericCallFI32.%.loc9_11 (%.075) = impl_witness_access constants.%J.lookup_impl_witness.74d, element1 [symbolic = %impl.elem1.loc9_11.2 (constants.%impl.elem1)] -// CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc] -// CHECK:STDOUT: %specific_impl_fn.loc9_11.1: = specific_impl_function %impl.elem1.loc9_11.1, @J.WithSelf.F(constants.%J.facet) [symbolic = %specific_impl_fn.loc9_11.2 (constants.%specific_impl_fn)] -// CHECK:STDOUT: %impl.elem0.loc9: %.9db = impl_witness_access constants.%ImplicitAs.impl_witness.ac5, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.f1a] -// CHECK:STDOUT: %bound_method.loc9_14.1: = bound_method %int_2, %impl.elem0.loc9 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound] -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0.loc9, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] -// CHECK:STDOUT: %bound_method.loc9_14.2: = bound_method %int_2, %specific_fn [concrete = constants.%bound_method] -// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call: init %i32 = call %bound_method.loc9_14.2(%int_2) [concrete = constants.%int_2.ef8] -// CHECK:STDOUT: %.loc9_14.1: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call [concrete = constants.%int_2.ef8] -// CHECK:STDOUT: %.loc9_14.2: %i32 = converted %int_2, %.loc9_14.1 [concrete = constants.%int_2.ef8] -// CHECK:STDOUT: %J.WithSelf.F.call: init %i32 = call %specific_impl_fn.loc9_11.1(%.loc9_14.2) -// CHECK:STDOUT: return %J.WithSelf.F.call -// CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: specific @J.WithSelf(constants.%Self.8a1) { -// CHECK:STDOUT: !definition: -// CHECK:STDOUT: %Self => constants.%Self.8a1 -// CHECK:STDOUT: %J.WithSelf.F.type => constants.%J.WithSelf.F.type.adb -// CHECK:STDOUT: %J.WithSelf.F => constants.%J.WithSelf.F.569 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: specific @J.WithSelf.F(constants.%Self.8a1) { -// CHECK:STDOUT: %Self => constants.%Self.8a1 -// CHECK:STDOUT: %J.lookup_impl_witness => constants.%J.lookup_impl_witness.89e -// CHECK:STDOUT: %impl.elem0.loc5_11.1 => constants.%impl.elem0.335 -// CHECK:STDOUT: %pattern_type => constants.%pattern_type.c1a -// CHECK:STDOUT: %.loc5_17.1 => constants.%.77f -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: specific @J.WithSelf(constants.%.Self.2fa) { -// CHECK:STDOUT: !definition: -// CHECK:STDOUT: %Self => constants.%.Self.2fa -// CHECK:STDOUT: %J.WithSelf.F.type => constants.%J.WithSelf.F.type.e19 -// CHECK:STDOUT: %J.WithSelf.F => constants.%J.WithSelf.F.659 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: specific @GenericCallFI32(constants.%T) { -// CHECK:STDOUT: %T.loc8_21.1 => constants.%T -// CHECK:STDOUT: %T.as_type.loc8_45.1 => constants.%T.as_type -// CHECK:STDOUT: %pattern_type => constants.%pattern_type.703 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: specific @J.WithSelf(constants.%T) { -// CHECK:STDOUT: !definition: -// CHECK:STDOUT: %Self => constants.%T -// CHECK:STDOUT: %J.WithSelf.F.type => constants.%J.WithSelf.F.type.4bb -// CHECK:STDOUT: %J.WithSelf.F => constants.%J.WithSelf.F.3c9 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: specific @J.WithSelf(constants.%J.facet) { -// CHECK:STDOUT: !definition: -// CHECK:STDOUT: %Self => constants.%J.facet -// CHECK:STDOUT: %J.WithSelf.F.type => constants.%J.WithSelf.F.type.082 -// CHECK:STDOUT: %J.WithSelf.F => constants.%J.WithSelf.F.efc -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: specific @J.WithSelf.F(constants.%J.facet) { -// CHECK:STDOUT: %Self => constants.%J.facet -// CHECK:STDOUT: %J.lookup_impl_witness => constants.%J.lookup_impl_witness.74d -// CHECK:STDOUT: %impl.elem0.loc5_11.1 => constants.%i32 -// CHECK:STDOUT: %pattern_type => constants.%pattern_type.7ce -// CHECK:STDOUT: %.loc5_17.1 => constants.%.ff5 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: --- fail_todo_use_associated_constant_in_impl.carbon -// CHECK:STDOUT: -// CHECK:STDOUT: constants { -// CHECK:STDOUT: %J.type: type = facet_type <@J> [concrete] -// CHECK:STDOUT: %Self.8a1: %J.type = symbolic_binding Self, 0 [symbolic] -// CHECK:STDOUT: %J.assoc_type: type = assoc_entity_type @J [concrete] -// CHECK:STDOUT: %assoc0.ebd: %J.assoc_type = assoc_entity element0, @J.WithSelf.%U [concrete] -// CHECK:STDOUT: %J.lookup_impl_witness.89e: = lookup_impl_witness %Self.8a1, @J [symbolic] -// CHECK:STDOUT: %impl.elem0.335: type = impl_witness_access %J.lookup_impl_witness.89e, element0 [symbolic] -// CHECK:STDOUT: %pattern_type.c1a: type = pattern_type %impl.elem0.335 [symbolic] -// CHECK:STDOUT: %.77f: Core.Form = init_form %impl.elem0.335 [symbolic] -// CHECK:STDOUT: %J.WithSelf.F.type.adb: type = fn_type @J.WithSelf.F, @J.WithSelf(%Self.8a1) [symbolic] -// CHECK:STDOUT: %J.WithSelf.F.569: %J.WithSelf.F.type.adb = struct_value () [symbolic] -// CHECK:STDOUT: %assoc1: %J.assoc_type = assoc_entity element1, @J.WithSelf.%J.WithSelf.F.decl [concrete] // CHECK:STDOUT: %E: type = class_type @E [concrete] -// CHECK:STDOUT: %.Self: %J.type = symbolic_binding .Self [symbolic_self] -// CHECK:STDOUT: %J.WithSelf.F.type.e19: type = fn_type @J.WithSelf.F, @J.WithSelf(%.Self) [symbolic_self] -// CHECK:STDOUT: %J.WithSelf.F.659: %J.WithSelf.F.type.e19 = struct_value () [symbolic_self] -// CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self [symbolic_self] -// CHECK:STDOUT: %J.lookup_impl_witness.46a: = lookup_impl_witness %.Self, @J [symbolic_self] -// CHECK:STDOUT: %impl.elem0.a58: type = impl_witness_access %J.lookup_impl_witness.46a, element0 [symbolic_self] // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete] -// CHECK:STDOUT: %Int.type: type = generic_class_type @Int [concrete] -// CHECK:STDOUT: %Int.generic: %Int.type = struct_value () [concrete] +// CHECK:STDOUT: %N: Core.IntLiteral = symbolic_binding N, 0 [symbolic] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete] -// CHECK:STDOUT: %J_where.type: type = facet_type <@J where %impl.elem0.a58 = %i32> [concrete] // CHECK:STDOUT: %J.impl_witness: = impl_witness @E.as.J.impl.%J.impl_witness_table [concrete] -// CHECK:STDOUT: %ImplicitAs.type.cc7: type = generic_interface_type @ImplicitAs [concrete] -// CHECK:STDOUT: %ImplicitAs.generic: %ImplicitAs.type.cc7 = struct_value () [concrete] -// CHECK:STDOUT: %E.as.J.impl.F.type.4b5c2a.1: type = fn_type @E.as.J.impl.F.loc27_21.1 [concrete] -// CHECK:STDOUT: %E.as.J.impl.F.b4e6ab.1: %E.as.J.impl.F.type.4b5c2a.1 = struct_value () [concrete] // CHECK:STDOUT: %J.facet: %J.type = facet_value %E, (%J.impl_witness) [concrete] -// CHECK:STDOUT: %J.WithSelf.F.type.a23: type = fn_type @J.WithSelf.F, @J.WithSelf(%J.facet) [concrete] -// CHECK:STDOUT: %J.WithSelf.F.4a4: %J.WithSelf.F.type.a23 = struct_value () [concrete] // CHECK:STDOUT: %pattern_type.7ce: type = pattern_type %i32 [concrete] // CHECK:STDOUT: %.ff5: Core.Form = init_form %i32 [concrete] -// CHECK:STDOUT: %E.as.J.impl.F.type.4b5c2a.2: type = fn_type @E.as.J.impl.F.loc27_21.2 [concrete] -// CHECK:STDOUT: %E.as.J.impl.F.b4e6ab.2: %E.as.J.impl.F.type.4b5c2a.2 = struct_value () [concrete] -// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] -// CHECK:STDOUT: %complete_type.357: = complete_type_witness %empty_struct_type [concrete] +// CHECK:STDOUT: %E.as.J.impl.F.type: type = fn_type @E.as.J.impl.F [concrete] +// CHECK:STDOUT: %E.as.J.impl.F: %E.as.J.impl.F.type = struct_value () [concrete] +// CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete] +// CHECK:STDOUT: %Int.as.Copy.impl.Op.type.161: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%N) [symbolic] +// CHECK:STDOUT: %Int.as.Copy.impl.Op.012: %Int.as.Copy.impl.Op.type.161 = struct_value () [symbolic] +// CHECK:STDOUT: %Copy.impl_witness.30d: = impl_witness imports.%Copy.impl_witness_table.1ee, @Int.as.Copy.impl(%int_32) [concrete] +// CHECK:STDOUT: %Int.as.Copy.impl.Op.type.aa9: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%int_32) [concrete] +// CHECK:STDOUT: %Int.as.Copy.impl.Op.44b: %Int.as.Copy.impl.Op.type.aa9 = struct_value () [concrete] +// CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value %i32, (%Copy.impl_witness.30d) [concrete] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.cee: type = fn_type @Copy.WithSelf.Op, @Copy.WithSelf(%Copy.facet) [concrete] +// CHECK:STDOUT: %.348: type = fn_type_with_self_type %Copy.WithSelf.Op.type.cee, %Copy.facet [concrete] +// CHECK:STDOUT: %Int.as.Copy.impl.Op.specific_fn: = specific_function %Int.as.Copy.impl.Op.44b, @Int.as.Copy.impl.Op(%int_32) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { -// CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { -// CHECK:STDOUT: .Int = %Core.Int -// CHECK:STDOUT: .ImplicitAs = %Core.ImplicitAs -// CHECK:STDOUT: import Core//prelude -// CHECK:STDOUT: import Core//prelude/... -// CHECK:STDOUT: } -// CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/parts/int, Int, loaded [concrete = constants.%Int.generic] -// CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.cc7 = import_ref Core//prelude/parts/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: file { -// CHECK:STDOUT: package: = namespace [concrete] { -// CHECK:STDOUT: .Core = imports.%Core -// CHECK:STDOUT: .J = %J.decl -// CHECK:STDOUT: .E = %E.decl -// CHECK:STDOUT: } -// CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %J.decl: type = interface_decl @J [concrete = constants.%J.type] {} {} -// CHECK:STDOUT: %E.decl: type = class_decl @E [concrete = constants.%E] {} {} -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: interface @J { -// CHECK:STDOUT: %Self: %J.type = symbolic_binding Self, 0 [symbolic = constants.%Self.8a1] -// CHECK:STDOUT: %J.WithSelf.decl = interface_with_self_decl @J [concrete] -// CHECK:STDOUT: -// CHECK:STDOUT: !with Self: -// CHECK:STDOUT: %U: type = assoc_const_decl @U [concrete] { -// CHECK:STDOUT: %assoc0: %J.assoc_type = assoc_entity element0, @J.WithSelf.%U [concrete = constants.%assoc0.ebd] -// CHECK:STDOUT: } -// CHECK:STDOUT: %J.WithSelf.F.decl: @J.WithSelf.%J.WithSelf.F.type (%J.WithSelf.F.type.adb) = fn_decl @J.WithSelf.F [symbolic = @J.WithSelf.%J.WithSelf.F (constants.%J.WithSelf.F.569)] { -// CHECK:STDOUT: %u.param_patt: @J.WithSelf.F.%pattern_type (%pattern_type.c1a) = value_param_pattern [concrete] -// CHECK:STDOUT: %u.patt: @J.WithSelf.F.%pattern_type (%pattern_type.c1a) = at_binding_pattern u, %u.param_patt [concrete] -// CHECK:STDOUT: %return.param_patt: @J.WithSelf.F.%pattern_type (%pattern_type.c1a) = out_param_pattern [concrete] -// CHECK:STDOUT: %return.patt: @J.WithSelf.F.%pattern_type (%pattern_type.c1a) = return_slot_pattern %return.param_patt, %U.ref.loc5_17 [concrete] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %impl.elem0.loc5_17: type = impl_witness_access constants.%J.lookup_impl_witness.89e, element0 [symbolic = %impl.elem0.loc5_11.1 (constants.%impl.elem0.335)] -// CHECK:STDOUT: %U.ref.loc5_17: type = name_ref U, %impl.elem0.loc5_17 [symbolic = %impl.elem0.loc5_11.1 (constants.%impl.elem0.335)] -// CHECK:STDOUT: %.loc5_17.2: Core.Form = init_form %U.ref.loc5_17 [symbolic = %.loc5_17.1 (constants.%.77f)] -// CHECK:STDOUT: %u.param: @J.WithSelf.F.%impl.elem0.loc5_11.1 (%impl.elem0.335) = value_param call_param0 -// CHECK:STDOUT: %.loc5_11: type = splice_block %U.ref.loc5_11 [symbolic = %impl.elem0.loc5_11.1 (constants.%impl.elem0.335)] { -// CHECK:STDOUT: %impl.elem0.loc5_11.2: type = impl_witness_access constants.%J.lookup_impl_witness.89e, element0 [symbolic = %impl.elem0.loc5_11.1 (constants.%impl.elem0.335)] -// CHECK:STDOUT: %U.ref.loc5_11: type = name_ref U, %impl.elem0.loc5_11.2 [symbolic = %impl.elem0.loc5_11.1 (constants.%impl.elem0.335)] -// CHECK:STDOUT: } -// CHECK:STDOUT: %u: @J.WithSelf.F.%impl.elem0.loc5_11.1 (%impl.elem0.335) = value_binding u, %u.param -// CHECK:STDOUT: %return.param: ref @J.WithSelf.F.%impl.elem0.loc5_11.1 (%impl.elem0.335) = out_param call_param1 -// CHECK:STDOUT: %return: ref @J.WithSelf.F.%impl.elem0.loc5_11.1 (%impl.elem0.335) = return_slot %return.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %assoc1: %J.assoc_type = assoc_entity element1, %J.WithSelf.F.decl [concrete = constants.%assoc1] -// CHECK:STDOUT: -// CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = %Self -// CHECK:STDOUT: .U = @U.%assoc0 -// CHECK:STDOUT: .F = @J.WithSelf.%assoc1 -// CHECK:STDOUT: witness = (@J.WithSelf.%U, @J.WithSelf.%J.WithSelf.F.decl) -// CHECK:STDOUT: -// CHECK:STDOUT: !requires: +// CHECK:STDOUT: %Core.import_ref.dbb: @Int.as.Copy.impl.%Int.as.Copy.impl.Op.type (%Int.as.Copy.impl.Op.type.161) = import_ref Core//prelude/parts/int, loc{{\d+_\d+}}, loaded [symbolic = @Int.as.Copy.impl.%Int.as.Copy.impl.Op (constants.%Int.as.Copy.impl.Op.012)] +// CHECK:STDOUT: %Copy.impl_witness_table.1ee = impl_witness_table (%Core.import_ref.dbb), @Int.as.Copy.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @E.as.J.impl: %Self.ref as %.loc9_20 { -// CHECK:STDOUT: %E.as.J.impl.F.decl.loc27_21.1: %E.as.J.impl.F.type.4b5c2a.1 = fn_decl @E.as.J.impl.F.loc27_21.1 [concrete = constants.%E.as.J.impl.F.b4e6ab.1] { -// CHECK:STDOUT: %u.param_patt: = value_param_pattern [concrete] -// CHECK:STDOUT: %u.patt: = at_binding_pattern u, %u.param_patt [concrete] -// CHECK:STDOUT: %return.patt: = return_slot_pattern , [concrete] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %U.ref.loc27_19: %J.assoc_type = name_ref U, @U.%assoc0 [concrete = constants.%assoc0.ebd] -// CHECK:STDOUT: %.loc27_19: type = converted %U.ref.loc27_19, [concrete = ] -// CHECK:STDOUT: %u.param: = value_param call_param0 -// CHECK:STDOUT: %.1: = splice_block [concrete = ] { -// CHECK:STDOUT: %U.ref.loc27_13: %J.assoc_type = name_ref U, @U.%assoc0 [concrete = constants.%assoc0.ebd] -// CHECK:STDOUT: %.loc27_13: type = converted %U.ref.loc27_13, [concrete = ] -// CHECK:STDOUT: } -// CHECK:STDOUT: %u: = value_binding u, [concrete = ] -// CHECK:STDOUT: %return: = return_slot -// CHECK:STDOUT: } -// CHECK:STDOUT: %.loc5_17.1: type = specific_constant @J.WithSelf.F.%U.ref.loc5_17, @J.WithSelf.F(constants.%J.facet) [concrete = constants.%i32] -// CHECK:STDOUT: %.loc5_17.2: type = specific_constant @J.WithSelf.F.%.loc5_17.2, @J.WithSelf.F(constants.%J.facet) [concrete = constants.%.ff5] -// CHECK:STDOUT: %E.as.J.impl.F.decl.loc27_21.2: %E.as.J.impl.F.type.4b5c2a.2 = fn_decl @E.as.J.impl.F.loc27_21.2 [concrete = constants.%E.as.J.impl.F.b4e6ab.2] { +// CHECK:STDOUT: %E.as.J.impl.F.decl: %E.as.J.impl.F.type = fn_decl @E.as.J.impl.F [concrete = constants.%E.as.J.impl.F] { // CHECK:STDOUT: %u.param_patt: %pattern_type.7ce = value_param_pattern [concrete] // CHECK:STDOUT: %u.patt: %pattern_type.7ce = at_binding_pattern u, %u.param_patt [concrete] // CHECK:STDOUT: %return.param_patt: %pattern_type.7ce = out_param_pattern [concrete] -// CHECK:STDOUT: %return.patt: %pattern_type.7ce = return_slot_pattern %return.param_patt, invalid [concrete] +// CHECK:STDOUT: %return.patt: %pattern_type.7ce = return_slot_pattern %return.param_patt, %U.ref.loc11_19 [concrete] // CHECK:STDOUT: } { +// CHECK:STDOUT: %J.facet.loc11_19: %J.type = facet_value @E.as.J.impl.%Self.ref, (constants.%J.impl_witness) [concrete = constants.%J.facet] +// CHECK:STDOUT: %.loc11_19.1: %J.type = converted @E.as.J.impl.%Self.ref, %J.facet.loc11_19 [concrete = constants.%J.facet] +// CHECK:STDOUT: %impl.elem0.loc11_19: type = impl_witness_access constants.%J.impl_witness, element0 [concrete = constants.%i32] +// CHECK:STDOUT: %U.ref.loc11_19: type = name_ref U, %impl.elem0.loc11_19 [concrete = constants.%i32] +// CHECK:STDOUT: %.loc11_19.2: Core.Form = init_form %U.ref.loc11_19 [concrete = constants.%.ff5] // CHECK:STDOUT: %u.param: %i32 = value_param call_param0 +// CHECK:STDOUT: %.loc11_13.1: type = splice_block %U.ref.loc11_13 [concrete = constants.%i32] { +// CHECK:STDOUT: %J.facet.loc11_13: %J.type = facet_value @E.as.J.impl.%Self.ref, (constants.%J.impl_witness) [concrete = constants.%J.facet] +// CHECK:STDOUT: %.loc11_13.2: %J.type = converted @E.as.J.impl.%Self.ref, %J.facet.loc11_13 [concrete = constants.%J.facet] +// CHECK:STDOUT: %impl.elem0.loc11_13: type = impl_witness_access constants.%J.impl_witness, element0 [concrete = constants.%i32] +// CHECK:STDOUT: %U.ref.loc11_13: type = name_ref U, %impl.elem0.loc11_13 [concrete = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %u: %i32 = value_binding u, %u.param // CHECK:STDOUT: %return.param: ref %i32 = out_param call_param1 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %J.impl_witness_table = impl_witness_table (%impl_witness_assoc_constant, %E.as.J.impl.F.decl.loc27_21.2), @E.as.J.impl [concrete] -// CHECK:STDOUT: %J.impl_witness: = impl_witness %J.impl_witness_table [concrete = constants.%J.impl_witness] -// CHECK:STDOUT: %impl_witness_assoc_constant: type = impl_witness_assoc_constant constants.%i32 [concrete = constants.%i32] +// CHECK:STDOUT: // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .U = -// CHECK:STDOUT: .F = %E.as.J.impl.F.decl.loc27_21.1 +// CHECK:STDOUT: .F = %E.as.J.impl.F.decl +// CHECK:STDOUT: extend %.loc9_20 // CHECK:STDOUT: witness = %J.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @E { -// CHECK:STDOUT: impl_decl @E.as.J.impl [concrete] {} { -// CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%E [concrete = constants.%E] -// CHECK:STDOUT: %J.ref: type = name_ref J, file.%J.decl [concrete = constants.%J.type] -// CHECK:STDOUT: %.Self: %J.type = symbolic_binding .Self [symbolic_self = constants.%.Self] -// CHECK:STDOUT: %.Self.ref: %J.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self] -// CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref [symbolic_self = constants.%.Self.as_type] -// CHECK:STDOUT: %.loc9_26: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.as_type] -// CHECK:STDOUT: %U.ref: %J.assoc_type = name_ref U, @U.%assoc0 [concrete = constants.%assoc0.ebd] -// CHECK:STDOUT: %impl.elem0: type = impl_witness_access constants.%J.lookup_impl_witness.46a, element0 [symbolic_self = constants.%impl.elem0.a58] -// CHECK:STDOUT: %i32: type = type_literal constants.%i32 [concrete = constants.%i32] -// CHECK:STDOUT: %.loc9_20: type = where_expr [concrete = constants.%J_where.type] { -// CHECK:STDOUT: requirement_base_facet_type %J.ref -// CHECK:STDOUT: requirement_rewrite %impl.elem0, %i32 -// CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: %complete_type: = complete_type_witness constants.%empty_struct_type [concrete = constants.%complete_type.357] +// CHECK:STDOUT: // CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%E // CHECK:STDOUT: .J = -// CHECK:STDOUT: .U = // CHECK:STDOUT: extend @E.as.J.impl.%.loc9_20 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @J.WithSelf.F(@J.%Self: %J.type) { -// CHECK:STDOUT: %Self: %J.type = symbolic_binding Self, 0 [symbolic = %Self (constants.%Self.8a1)] -// CHECK:STDOUT: %J.lookup_impl_witness: = lookup_impl_witness %Self, @J [symbolic = %J.lookup_impl_witness (constants.%J.lookup_impl_witness.89e)] -// CHECK:STDOUT: %impl.elem0.loc5_11.1: type = impl_witness_access %J.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc5_11.1 (constants.%impl.elem0.335)] -// CHECK:STDOUT: %pattern_type: type = pattern_type %impl.elem0.loc5_11.1 [symbolic = %pattern_type (constants.%pattern_type.c1a)] -// CHECK:STDOUT: %.loc5_17.1: Core.Form = init_form %impl.elem0.loc5_11.1 [symbolic = %.loc5_17.1 (constants.%.77f)] -// CHECK:STDOUT: -// CHECK:STDOUT: fn(%u.param: @J.WithSelf.F.%impl.elem0.loc5_11.1 (%impl.elem0.335)) -> out %return.param: @J.WithSelf.F.%impl.elem0.loc5_11.1 (%impl.elem0.335); -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @E.as.J.impl.F.loc27_21.1(%u.param: ) -> { +// CHECK:STDOUT: fn @E.as.J.impl.F(%u.param: %i32) -> out %return.param: %i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %u.ref: = name_ref u, %u [concrete = ] -// CHECK:STDOUT: return +// CHECK:STDOUT: %u.ref: %i32 = name_ref u, %u +// CHECK:STDOUT: %impl.elem0.loc12: %.348 = impl_witness_access constants.%Copy.impl_witness.30d, element0 [concrete = constants.%Int.as.Copy.impl.Op.44b] +// CHECK:STDOUT: %bound_method.loc12_14.1: = bound_method %u.ref, %impl.elem0.loc12 +// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0.loc12, @Int.as.Copy.impl.Op(constants.%int_32) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn] +// CHECK:STDOUT: %bound_method.loc12_14.2: = bound_method %u.ref, %specific_fn +// CHECK:STDOUT: %Int.as.Copy.impl.Op.call: init %i32 = call %bound_method.loc12_14.2(%u.ref) +// CHECK:STDOUT: return %Int.as.Copy.impl.Op.call // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @E.as.J.impl.F.loc27_21.2(%u.param: %i32) -> out %return.param: %i32 [thunk @E.as.J.impl.%E.as.J.impl.F.decl.loc27_21.1 for @J.WithSelf.%J.WithSelf.F.decl, @J.WithSelf.F(constants.%J.facet)] { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %F.ref: %E.as.J.impl.F.type.4b5c2a.1 = name_ref F, @E.as.J.impl.%E.as.J.impl.F.decl.loc27_21.1 [concrete = constants.%E.as.J.impl.F.b4e6ab.1] -// CHECK:STDOUT: %E.as.J.impl.F.call: = call %F.ref() -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: specific @J.WithSelf(constants.%Self.8a1) { -// CHECK:STDOUT: !definition: -// CHECK:STDOUT: %Self => constants.%Self.8a1 -// CHECK:STDOUT: %J.WithSelf.F.type => constants.%J.WithSelf.F.type.adb -// CHECK:STDOUT: %J.WithSelf.F => constants.%J.WithSelf.F.569 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: specific @J.WithSelf.F(constants.%Self.8a1) { -// CHECK:STDOUT: %Self => constants.%Self.8a1 -// CHECK:STDOUT: %J.lookup_impl_witness => constants.%J.lookup_impl_witness.89e -// CHECK:STDOUT: %impl.elem0.loc5_11.1 => constants.%impl.elem0.335 -// CHECK:STDOUT: %pattern_type => constants.%pattern_type.c1a -// CHECK:STDOUT: %.loc5_17.1 => constants.%.77f -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: specific @J.WithSelf(constants.%.Self) { -// CHECK:STDOUT: !definition: -// CHECK:STDOUT: %Self => constants.%.Self -// CHECK:STDOUT: %J.WithSelf.F.type => constants.%J.WithSelf.F.type.e19 -// CHECK:STDOUT: %J.WithSelf.F => constants.%J.WithSelf.F.659 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: specific @J.WithSelf(constants.%J.facet) { -// CHECK:STDOUT: !definition: -// CHECK:STDOUT: %Self => constants.%J.facet -// CHECK:STDOUT: %J.WithSelf.F.type => constants.%J.WithSelf.F.type.a23 -// CHECK:STDOUT: %J.WithSelf.F => constants.%J.WithSelf.F.4a4 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: specific @J.WithSelf.F(constants.%J.facet) { -// CHECK:STDOUT: %Self => constants.%J.facet -// CHECK:STDOUT: %J.lookup_impl_witness => constants.%J.impl_witness -// CHECK:STDOUT: %impl.elem0.loc5_11.1 => constants.%i32 -// CHECK:STDOUT: %pattern_type => constants.%pattern_type.7ce -// CHECK:STDOUT: %.loc5_17.1 => constants.%.ff5 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: --- fail_todo_call_extend_fn.carbon +// CHECK:STDOUT: --- call_extend_fn.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %J.type: type = facet_type <@J> [concrete] -// CHECK:STDOUT: %Self: %J.type = symbolic_binding Self, 0 [symbolic] -// CHECK:STDOUT: %J.WithSelf.F.type.adb: type = fn_type @J.WithSelf.F, @J.WithSelf(%Self) [symbolic] -// CHECK:STDOUT: %J.WithSelf.F.569: %J.WithSelf.F.type.adb = struct_value () [symbolic] -// CHECK:STDOUT: %J.assoc_type: type = assoc_entity_type @J [concrete] -// CHECK:STDOUT: %assoc0: %J.assoc_type = assoc_entity element0, @J.WithSelf.%J.WithSelf.F.decl [concrete] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] // CHECK:STDOUT: %E: type = class_type @E [concrete] // CHECK:STDOUT: %J.impl_witness: = impl_witness @E.as.J.impl.%J.impl_witness_table [concrete] // CHECK:STDOUT: %E.as.J.impl.F.type: type = fn_type @E.as.J.impl.F [concrete] // CHECK:STDOUT: %E.as.J.impl.F: %E.as.J.impl.F.type = struct_value () [concrete] // CHECK:STDOUT: %J.facet: %J.type = facet_value %E, (%J.impl_witness) [concrete] // CHECK:STDOUT: %J.WithSelf.F.type.59e: type = fn_type @J.WithSelf.F, @J.WithSelf(%J.facet) [concrete] -// CHECK:STDOUT: %J.WithSelf.F.d37: %J.WithSelf.F.type.59e = struct_value () [concrete] -// CHECK:STDOUT: %E.G.type: type = fn_type @E.G [concrete] -// CHECK:STDOUT: %E.G: %E.G.type = struct_value () [concrete] -// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] -// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: imports { -// CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { -// CHECK:STDOUT: import Core//prelude -// CHECK:STDOUT: import Core//prelude/... -// CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: file { -// CHECK:STDOUT: package: = namespace [concrete] { -// CHECK:STDOUT: .Core = imports.%Core -// CHECK:STDOUT: .J = %J.decl -// CHECK:STDOUT: .E = %E.decl -// CHECK:STDOUT: } -// CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %J.decl: type = interface_decl @J [concrete = constants.%J.type] {} {} -// CHECK:STDOUT: %E.decl: type = class_decl @E [concrete = constants.%E] {} {} -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: interface @J { -// CHECK:STDOUT: %Self: %J.type = symbolic_binding Self, 0 [symbolic = constants.%Self] -// CHECK:STDOUT: %J.WithSelf.decl = interface_with_self_decl @J [concrete] -// CHECK:STDOUT: -// CHECK:STDOUT: !with Self: -// CHECK:STDOUT: %J.WithSelf.F.decl: @J.WithSelf.%J.WithSelf.F.type (%J.WithSelf.F.type.adb) = fn_decl @J.WithSelf.F [symbolic = @J.WithSelf.%J.WithSelf.F (constants.%J.WithSelf.F.569)] {} {} -// CHECK:STDOUT: %assoc0: %J.assoc_type = assoc_entity element0, %J.WithSelf.F.decl [concrete = constants.%assoc0] -// CHECK:STDOUT: -// CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = %Self -// CHECK:STDOUT: .F = @J.WithSelf.%assoc0 -// CHECK:STDOUT: witness = (@J.WithSelf.%J.WithSelf.F.decl) -// CHECK:STDOUT: -// CHECK:STDOUT: !requires: -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: impl @E.as.J.impl: %Self.ref as %J.ref { -// CHECK:STDOUT: %E.as.J.impl.F.decl: %E.as.J.impl.F.type = fn_decl @E.as.J.impl.F [concrete = constants.%E.as.J.impl.F] {} {} -// CHECK:STDOUT: %J.impl_witness_table = impl_witness_table (%E.as.J.impl.F.decl), @E.as.J.impl [concrete] -// CHECK:STDOUT: %J.impl_witness: = impl_witness %J.impl_witness_table [concrete = constants.%J.impl_witness] -// CHECK:STDOUT: -// CHECK:STDOUT: !members: -// CHECK:STDOUT: .F = %E.as.J.impl.F.decl -// CHECK:STDOUT: witness = %J.impl_witness +// CHECK:STDOUT: %.8de: type = fn_type_with_self_type %J.WithSelf.F.type.59e, %J.facet [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @E { -// CHECK:STDOUT: impl_decl @E.as.J.impl [concrete] {} { -// CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%E [concrete = constants.%E] -// CHECK:STDOUT: %J.ref: type = name_ref J, file.%J.decl [concrete = constants.%J.type] -// CHECK:STDOUT: } -// CHECK:STDOUT: %E.G.decl: %E.G.type = fn_decl @E.G [concrete = constants.%E.G] {} {} -// CHECK:STDOUT: %complete_type: = complete_type_witness constants.%empty_struct_type [concrete = constants.%complete_type] +// CHECK:STDOUT: // CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: // CHECK:STDOUT: !members: @@ -2855,320 +1081,46 @@ fn F() { // CHECK:STDOUT: extend @E.as.J.impl.%J.ref // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @J.WithSelf.F(@J.%Self: %J.type) { -// CHECK:STDOUT: !definition: -// CHECK:STDOUT: -// CHECK:STDOUT: fn() { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @E.as.J.impl.F() { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: fn @E.G() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %F.ref: %J.assoc_type = name_ref F, @J.WithSelf.%assoc0 [concrete = constants.%assoc0] -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: specific @J.WithSelf(constants.%Self) { -// CHECK:STDOUT: !definition: -// CHECK:STDOUT: %Self => constants.%Self -// CHECK:STDOUT: %J.WithSelf.F.type => constants.%J.WithSelf.F.type.adb -// CHECK:STDOUT: %J.WithSelf.F => constants.%J.WithSelf.F.569 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: specific @J.WithSelf.F(constants.%Self) {} -// CHECK:STDOUT: -// CHECK:STDOUT: specific @J.WithSelf(constants.%J.facet) { -// CHECK:STDOUT: !definition: -// CHECK:STDOUT: %Self => constants.%J.facet -// CHECK:STDOUT: %J.WithSelf.F.type => constants.%J.WithSelf.F.type.59e -// CHECK:STDOUT: %J.WithSelf.F => constants.%J.WithSelf.F.d37 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: specific @J.WithSelf.F(constants.%J.facet) {} -// CHECK:STDOUT: -// CHECK:STDOUT: --- call_extend_method.carbon -// CHECK:STDOUT: -// CHECK:STDOUT: constants { -// CHECK:STDOUT: %J.type: type = facet_type <@J> [concrete] -// CHECK:STDOUT: %Self: %J.type = symbolic_binding Self, 0 [symbolic] -// CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self [symbolic] -// CHECK:STDOUT: %pattern_type.909: type = pattern_type %Self.as_type [symbolic] -// CHECK:STDOUT: %J.WithSelf.F.type.adb: type = fn_type @J.WithSelf.F, @J.WithSelf(%Self) [symbolic] -// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] -// CHECK:STDOUT: %J.WithSelf.F.569: %J.WithSelf.F.type.adb = struct_value () [symbolic] -// CHECK:STDOUT: %J.assoc_type: type = assoc_entity_type @J [concrete] -// CHECK:STDOUT: %assoc0: %J.assoc_type = assoc_entity element0, @J.WithSelf.%J.WithSelf.F.decl [concrete] -// CHECK:STDOUT: %require_complete: = require_complete_type %Self.as_type [symbolic] -// CHECK:STDOUT: %E: type = class_type @E [concrete] -// CHECK:STDOUT: %J.impl_witness: = impl_witness @E.as.J.impl.%J.impl_witness_table [concrete] -// CHECK:STDOUT: %pattern_type.99f: type = pattern_type %E [concrete] -// CHECK:STDOUT: %E.as.J.impl.F.type: type = fn_type @E.as.J.impl.F [concrete] -// CHECK:STDOUT: %E.as.J.impl.F: %E.as.J.impl.F.type = struct_value () [concrete] -// CHECK:STDOUT: %J.facet: %J.type = facet_value %E, (%J.impl_witness) [concrete] -// CHECK:STDOUT: %J.WithSelf.F.type.59e: type = fn_type @J.WithSelf.F, @J.WithSelf(%J.facet) [concrete] -// CHECK:STDOUT: %J.WithSelf.F.d37: %J.WithSelf.F.type.59e = struct_value () [concrete] -// CHECK:STDOUT: %E.G.type: type = fn_type @E.G [concrete] -// CHECK:STDOUT: %E.G: %E.G.type = struct_value () [concrete] -// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] -// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete] -// CHECK:STDOUT: %type: type = facet_type [concrete] -// CHECK:STDOUT: %E.type.facet: %type = facet_value %E, () [concrete] -// CHECK:STDOUT: %J.WithSelf.F.type.d1c: type = fn_type @J.WithSelf.F, @J.WithSelf(%E.type.facet) [concrete] -// CHECK:STDOUT: %J.WithSelf.F.1a6: %J.WithSelf.F.type.d1c = struct_value () [concrete] -// CHECK:STDOUT: %.8de: type = fn_type_with_self_type %J.WithSelf.F.type.59e, %J.facet [concrete] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: imports { -// CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { -// CHECK:STDOUT: import Core//prelude -// CHECK:STDOUT: import Core//prelude/... -// CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: file { -// CHECK:STDOUT: package: = namespace [concrete] { -// CHECK:STDOUT: .Core = imports.%Core -// CHECK:STDOUT: .J = %J.decl -// CHECK:STDOUT: .E = %E.decl -// CHECK:STDOUT: } -// CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %J.decl: type = interface_decl @J [concrete = constants.%J.type] {} {} -// CHECK:STDOUT: %E.decl: type = class_decl @E [concrete = constants.%E] {} {} -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: interface @J { -// CHECK:STDOUT: %Self: %J.type = symbolic_binding Self, 0 [symbolic = constants.%Self] -// CHECK:STDOUT: %J.WithSelf.decl = interface_with_self_decl @J [concrete] -// CHECK:STDOUT: -// CHECK:STDOUT: !with Self: -// CHECK:STDOUT: %J.WithSelf.F.decl: @J.WithSelf.%J.WithSelf.F.type (%J.WithSelf.F.type.adb) = fn_decl @J.WithSelf.F [symbolic = @J.WithSelf.%J.WithSelf.F (constants.%J.WithSelf.F.569)] { -// CHECK:STDOUT: %self.param_patt: @J.WithSelf.F.%pattern_type (%pattern_type.909) = value_param_pattern [concrete] -// CHECK:STDOUT: %self.patt: @J.WithSelf.F.%pattern_type (%pattern_type.909) = at_binding_pattern self, %self.param_patt [concrete] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: @J.WithSelf.F.%Self.as_type.loc4_21.1 (%Self.as_type) = value_param call_param0 -// CHECK:STDOUT: %.loc4_21.1: type = splice_block %.loc4_21.2 [symbolic = %Self.as_type.loc4_21.1 (constants.%Self.as_type)] { -// CHECK:STDOUT: %Self.ref: %J.type = name_ref Self, @J.%Self [symbolic = %Self (constants.%Self)] -// CHECK:STDOUT: %Self.as_type.loc4_21.2: type = facet_access_type %Self.ref [symbolic = %Self.as_type.loc4_21.1 (constants.%Self.as_type)] -// CHECK:STDOUT: %.loc4_21.2: type = converted %Self.ref, %Self.as_type.loc4_21.2 [symbolic = %Self.as_type.loc4_21.1 (constants.%Self.as_type)] -// CHECK:STDOUT: } -// CHECK:STDOUT: %self: @J.WithSelf.F.%Self.as_type.loc4_21.1 (%Self.as_type) = value_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %assoc0: %J.assoc_type = assoc_entity element0, %J.WithSelf.F.decl [concrete = constants.%assoc0] -// CHECK:STDOUT: -// CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = %Self -// CHECK:STDOUT: .F = @J.WithSelf.%assoc0 -// CHECK:STDOUT: witness = (@J.WithSelf.%J.WithSelf.F.decl) -// CHECK:STDOUT: -// CHECK:STDOUT: !requires: -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: impl @E.as.J.impl: %Self.ref as %J.ref { -// CHECK:STDOUT: %E.as.J.impl.F.decl: %E.as.J.impl.F.type = fn_decl @E.as.J.impl.F [concrete = constants.%E.as.J.impl.F] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.99f = value_param_pattern [concrete] -// CHECK:STDOUT: %self.patt: %pattern_type.99f = at_binding_pattern self, %self.param_patt [concrete] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: %E = value_param call_param0 -// CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%E [concrete = constants.%E] -// CHECK:STDOUT: %self: %E = value_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %J.impl_witness_table = impl_witness_table (%E.as.J.impl.F.decl), @E.as.J.impl [concrete] -// CHECK:STDOUT: %J.impl_witness: = impl_witness %J.impl_witness_table [concrete = constants.%J.impl_witness] -// CHECK:STDOUT: -// CHECK:STDOUT: !members: -// CHECK:STDOUT: .F = %E.as.J.impl.F.decl -// CHECK:STDOUT: witness = %J.impl_witness -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: class @E { -// CHECK:STDOUT: impl_decl @E.as.J.impl [concrete] {} { -// CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%E [concrete = constants.%E] -// CHECK:STDOUT: %J.ref: type = name_ref J, file.%J.decl [concrete = constants.%J.type] -// CHECK:STDOUT: } -// CHECK:STDOUT: %E.G.decl: %E.G.type = fn_decl @E.G [concrete = constants.%E.G] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.99f = value_param_pattern [concrete] -// CHECK:STDOUT: %self.patt: %pattern_type.99f = at_binding_pattern self, %self.param_patt [concrete] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: %E = value_param call_param0 -// CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%E [concrete = constants.%E] -// CHECK:STDOUT: %self: %E = value_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %complete_type: = complete_type_witness constants.%empty_struct_type [concrete = constants.%complete_type] -// CHECK:STDOUT: complete_type_witness = %complete_type -// CHECK:STDOUT: -// CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = constants.%E -// CHECK:STDOUT: .J = -// CHECK:STDOUT: .G = %E.G.decl -// CHECK:STDOUT: .F = -// CHECK:STDOUT: extend @E.as.J.impl.%J.ref -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generic fn @J.WithSelf.F(@J.%Self: %J.type) { -// CHECK:STDOUT: %Self: %J.type = symbolic_binding Self, 0 [symbolic = %Self (constants.%Self)] -// CHECK:STDOUT: %Self.as_type.loc4_21.1: type = facet_access_type %Self [symbolic = %Self.as_type.loc4_21.1 (constants.%Self.as_type)] -// CHECK:STDOUT: %pattern_type: type = pattern_type %Self.as_type.loc4_21.1 [symbolic = %pattern_type (constants.%pattern_type.909)] -// CHECK:STDOUT: -// CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete: = require_complete_type %Self.as_type.loc4_21.1 [symbolic = %require_complete (constants.%require_complete)] -// CHECK:STDOUT: -// CHECK:STDOUT: fn(%self.param: @J.WithSelf.F.%Self.as_type.loc4_21.1 (%Self.as_type)) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @E.as.J.impl.F(%self.param: %E) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @E.G(%self.param: %E) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %self.ref: %E = name_ref self, %self -// CHECK:STDOUT: %F.ref: %J.assoc_type = name_ref F, @J.WithSelf.%assoc0 [concrete = constants.%assoc0] +// CHECK:STDOUT: %J.facet: %J.type = facet_value constants.%E, (constants.%J.impl_witness) [concrete = constants.%J.facet] +// CHECK:STDOUT: %.loc14: %J.type = converted constants.%E, %J.facet [concrete = constants.%J.facet] // CHECK:STDOUT: %impl.elem0: %.8de = impl_witness_access constants.%J.impl_witness, element0 [concrete = constants.%E.as.J.impl.F] -// CHECK:STDOUT: %bound_method: = bound_method %self.ref, %impl.elem0 -// CHECK:STDOUT: %E.as.J.impl.F.call: init %empty_tuple.type = call %bound_method(%self.ref) -// CHECK:STDOUT: return +// CHECK:STDOUT: %F.ref: %.8de = name_ref F, %impl.elem0 [concrete = constants.%E.as.J.impl.F] +// CHECK:STDOUT: %E.as.J.impl.F.call: init %empty_tuple.type = call %F.ref() +// CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @J.WithSelf(constants.%Self) { -// CHECK:STDOUT: !definition: -// CHECK:STDOUT: %Self => constants.%Self -// CHECK:STDOUT: %J.WithSelf.F.type => constants.%J.WithSelf.F.type.adb -// CHECK:STDOUT: %J.WithSelf.F => constants.%J.WithSelf.F.569 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: specific @J.WithSelf.F(constants.%Self) { -// CHECK:STDOUT: %Self => constants.%Self -// CHECK:STDOUT: %Self.as_type.loc4_21.1 => constants.%Self.as_type -// CHECK:STDOUT: %pattern_type => constants.%pattern_type.909 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: specific @J.WithSelf(constants.%J.facet) { -// CHECK:STDOUT: !definition: -// CHECK:STDOUT: %Self => constants.%J.facet -// CHECK:STDOUT: %J.WithSelf.F.type => constants.%J.WithSelf.F.type.59e -// CHECK:STDOUT: %J.WithSelf.F => constants.%J.WithSelf.F.d37 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: specific @J.WithSelf.F(constants.%J.facet) { -// CHECK:STDOUT: %Self => constants.%J.facet -// CHECK:STDOUT: %Self.as_type.loc4_21.1 => constants.%E -// CHECK:STDOUT: %pattern_type => constants.%pattern_type.99f -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: specific @J.WithSelf(constants.%E.type.facet) { -// CHECK:STDOUT: !definition: -// CHECK:STDOUT: %Self => constants.%E.type.facet -// CHECK:STDOUT: %J.WithSelf.F.type => constants.%J.WithSelf.F.type.d1c -// CHECK:STDOUT: %J.WithSelf.F => constants.%J.WithSelf.F.1a6 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: --- fail_todo_use_extend_constant.carbon +// CHECK:STDOUT: --- use_extend_constant.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %J.type: type = facet_type <@J> [concrete] -// CHECK:STDOUT: %Self.8a1: %J.type = symbolic_binding Self, 0 [symbolic] -// CHECK:STDOUT: %J.assoc_type: type = assoc_entity_type @J [concrete] -// CHECK:STDOUT: %assoc0.df0: %J.assoc_type = assoc_entity element0, @J.WithSelf.%X [concrete] // CHECK:STDOUT: %E: type = class_type @E [concrete] -// CHECK:STDOUT: %.Self: %J.type = symbolic_binding .Self [symbolic_self] -// CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self [symbolic_self] -// CHECK:STDOUT: %J.lookup_impl_witness: = lookup_impl_witness %.Self, @J [symbolic_self] -// CHECK:STDOUT: %impl.elem0: type = impl_witness_access %J.lookup_impl_witness, element0 [symbolic_self] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] // CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [concrete] -// CHECK:STDOUT: %J_where.type: type = facet_type <@J where %impl.elem0 = %empty_tuple.type> [concrete] // CHECK:STDOUT: %J.impl_witness: = impl_witness @E.as.J.impl.%J.impl_witness_table [concrete] // CHECK:STDOUT: %J.facet: %J.type = facet_value %E, (%J.impl_witness) [concrete] -// CHECK:STDOUT: %ImplicitAs.type.cc7: type = generic_interface_type @ImplicitAs [concrete] -// CHECK:STDOUT: %ImplicitAs.generic: %ImplicitAs.type.cc7 = struct_value () [concrete] +// CHECK:STDOUT: %.262: Core.Form = init_form %empty_tuple.type [concrete] +// CHECK:STDOUT: %pattern_type: type = pattern_type %empty_tuple.type [concrete] // CHECK:STDOUT: %E.G.type: type = fn_type @E.G [concrete] // CHECK:STDOUT: %E.G: %E.G.type = struct_value () [concrete] -// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] -// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: imports { -// CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { -// CHECK:STDOUT: .ImplicitAs = %Core.ImplicitAs -// CHECK:STDOUT: import Core//prelude -// CHECK:STDOUT: import Core//prelude/... -// CHECK:STDOUT: } -// CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.cc7 = import_ref Core//prelude/parts/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: file { -// CHECK:STDOUT: package: = namespace [concrete] { -// CHECK:STDOUT: .Core = imports.%Core -// CHECK:STDOUT: .J = %J.decl -// CHECK:STDOUT: .E = %E.decl -// CHECK:STDOUT: } -// CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %J.decl: type = interface_decl @J [concrete = constants.%J.type] {} {} -// CHECK:STDOUT: %E.decl: type = class_decl @E [concrete = constants.%E] {} {} -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: interface @J { -// CHECK:STDOUT: %Self: %J.type = symbolic_binding Self, 0 [symbolic = constants.%Self.8a1] -// CHECK:STDOUT: %J.WithSelf.decl = interface_with_self_decl @J [concrete] -// CHECK:STDOUT: -// CHECK:STDOUT: !with Self: -// CHECK:STDOUT: %X: type = assoc_const_decl @X [concrete] { -// CHECK:STDOUT: %assoc0: %J.assoc_type = assoc_entity element0, @J.WithSelf.%X [concrete = constants.%assoc0.df0] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = %Self -// CHECK:STDOUT: .X = @X.%assoc0 -// CHECK:STDOUT: witness = (@J.WithSelf.%X) -// CHECK:STDOUT: -// CHECK:STDOUT: !requires: -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: impl @E.as.J.impl: %Self.ref as %.loc8_20 { -// CHECK:STDOUT: %J.impl_witness_table = impl_witness_table (%impl_witness_assoc_constant), @E.as.J.impl [concrete] -// CHECK:STDOUT: %J.impl_witness: = impl_witness %J.impl_witness_table [concrete = constants.%J.impl_witness] -// CHECK:STDOUT: %impl_witness_assoc_constant: type = impl_witness_assoc_constant constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] -// CHECK:STDOUT: -// CHECK:STDOUT: !members: -// CHECK:STDOUT: witness = %J.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @E { -// CHECK:STDOUT: impl_decl @E.as.J.impl [concrete] {} { -// CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%E [concrete = constants.%E] -// CHECK:STDOUT: %J.ref: type = name_ref J, file.%J.decl [concrete = constants.%J.type] -// CHECK:STDOUT: %.Self: %J.type = symbolic_binding .Self [symbolic_self = constants.%.Self] -// CHECK:STDOUT: %.Self.ref: %J.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self] -// CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref [symbolic_self = constants.%.Self.as_type] -// CHECK:STDOUT: %.loc8_26: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.as_type] -// CHECK:STDOUT: %X.ref: %J.assoc_type = name_ref X, @X.%assoc0 [concrete = constants.%assoc0.df0] -// CHECK:STDOUT: %impl.elem0: type = impl_witness_access constants.%J.lookup_impl_witness, element0 [symbolic_self = constants.%impl.elem0] -// CHECK:STDOUT: %.loc8_32.1: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple] -// CHECK:STDOUT: %.loc8_32.2: type = converted %.loc8_32.1, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] -// CHECK:STDOUT: %.loc8_20: type = where_expr [concrete = constants.%J_where.type] { -// CHECK:STDOUT: requirement_base_facet_type %J.ref -// CHECK:STDOUT: requirement_rewrite %impl.elem0, %.loc8_32.2 -// CHECK:STDOUT: } -// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: %E.G.decl: %E.G.type = fn_decl @E.G [concrete = constants.%E.G] { -// CHECK:STDOUT: %return.patt: = return_slot_pattern , [concrete] +// CHECK:STDOUT: %return.param_patt: %pattern_type = out_param_pattern [concrete] +// CHECK:STDOUT: %return.patt: %pattern_type = return_slot_pattern %return.param_patt, %X.ref [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %X.ref: %J.assoc_type = name_ref X, @X.%assoc0 [concrete = constants.%assoc0.df0] -// CHECK:STDOUT: %.loc18_13: type = converted %X.ref, [concrete = ] -// CHECK:STDOUT: %return: = return_slot +// CHECK:STDOUT: %J.facet: %J.type = facet_value constants.%E, (constants.%J.impl_witness) [concrete = constants.%J.facet] +// CHECK:STDOUT: %.loc11_13.1: %J.type = converted constants.%E, %J.facet [concrete = constants.%J.facet] +// CHECK:STDOUT: %impl.elem0: type = impl_witness_access constants.%J.impl_witness, element0 [concrete = constants.%empty_tuple.type] +// CHECK:STDOUT: %X.ref: type = name_ref X, %impl.elem0 [concrete = constants.%empty_tuple.type] +// CHECK:STDOUT: %.loc11_13.2: Core.Form = init_form %X.ref [concrete = constants.%.262] +// CHECK:STDOUT: %return.param: ref %empty_tuple.type = out_param call_param0 +// CHECK:STDOUT: %return: ref %empty_tuple.type = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %complete_type: = complete_type_witness constants.%empty_struct_type [concrete = constants.%complete_type] +// CHECK:STDOUT: // CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: // CHECK:STDOUT: !members: @@ -3179,1623 +1131,82 @@ fn F() { // CHECK:STDOUT: extend @E.as.J.impl.%.loc8_20 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @E.G() -> { +// CHECK:STDOUT: fn @E.G() -> out %return.param: %empty_tuple.type { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc18_25: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple] -// CHECK:STDOUT: return +// CHECK:STDOUT: %.loc11_25.1: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple] +// CHECK:STDOUT: %.loc11_25.2: init %empty_tuple.type = tuple_init () [concrete = constants.%empty_tuple] +// CHECK:STDOUT: %.loc11_26: init %empty_tuple.type = converted %.loc11_25.1, %.loc11_25.2 [concrete = constants.%empty_tuple] +// CHECK:STDOUT: return %.loc11_26 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @J.WithSelf(constants.%Self.8a1) { -// CHECK:STDOUT: !definition: -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: specific @J.WithSelf(constants.%.Self) { -// CHECK:STDOUT: !definition: -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: specific @J.WithSelf(constants.%J.facet) { -// CHECK:STDOUT: !definition: -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: --- fail_todo_self_period_associated_type.carbon +// CHECK:STDOUT: --- associated_fn_use_in_def_before_decl.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %J2.type: type = facet_type <@J2> [concrete] -// CHECK:STDOUT: %Self: %J2.type = symbolic_binding Self, 0 [symbolic] -// CHECK:STDOUT: %J2.assoc_type: type = assoc_entity_type @J2 [concrete] -// CHECK:STDOUT: %assoc0: %J2.assoc_type = assoc_entity element0, @J2.WithSelf.%U2 [concrete] -// CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self [symbolic] -// CHECK:STDOUT: %pattern_type.307: type = pattern_type %Self.as_type [symbolic] -// CHECK:STDOUT: %J2.WithSelf.F.type.68c: type = fn_type @J2.WithSelf.F, @J2.WithSelf(%Self) [symbolic] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] -// CHECK:STDOUT: %J2.WithSelf.F.643: %J2.WithSelf.F.type.68c = struct_value () [symbolic] -// CHECK:STDOUT: %assoc1: %J2.assoc_type = assoc_entity element1, @J2.WithSelf.%J2.WithSelf.F.decl [concrete] -// CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [concrete] -// CHECK:STDOUT: %.Self: %J2.type = symbolic_binding .Self [symbolic_self] -// CHECK:STDOUT: %J2.WithSelf.F.type.30c: type = fn_type @J2.WithSelf.F, @J2.WithSelf(%.Self) [symbolic_self] -// CHECK:STDOUT: %J2.WithSelf.F.99a: %J2.WithSelf.F.type.30c = struct_value () [symbolic_self] -// CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self [symbolic_self] -// CHECK:STDOUT: %J2.lookup_impl_witness: = lookup_impl_witness %.Self, @J2 [symbolic_self] -// CHECK:STDOUT: %impl.elem0: type = impl_witness_access %J2.lookup_impl_witness, element0 [symbolic_self] -// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] -// CHECK:STDOUT: %empty_struct: %empty_struct_type = struct_value () [concrete] -// CHECK:STDOUT: %J2_where.type.1ad: type = facet_type <@J2 where %impl.elem0 = %empty_struct_type> [concrete] -// CHECK:STDOUT: %J2.impl_witness.941: = impl_witness @empty_tuple.type.as.J2.impl.%J2.impl_witness_table [concrete] -// CHECK:STDOUT: %pattern_type.cb1: type = pattern_type %empty_tuple.type [concrete] -// CHECK:STDOUT: %pattern_type.a96: type = pattern_type %empty_struct_type [concrete] -// CHECK:STDOUT: %.469: Core.Form = init_form %empty_struct_type [concrete] -// CHECK:STDOUT: %empty_tuple.type.as.J2.impl.F.type.56bdaf.1: type = fn_type @empty_tuple.type.as.J2.impl.F.loc23_40.1 [concrete] -// CHECK:STDOUT: %empty_tuple.type.as.J2.impl.F.7b8679.1: %empty_tuple.type.as.J2.impl.F.type.56bdaf.1 = struct_value () [concrete] -// CHECK:STDOUT: %J2.facet.6c9: %J2.type = facet_value %empty_tuple.type, (%J2.impl_witness.941) [concrete] -// CHECK:STDOUT: %J2.WithSelf.F.type.43a: type = fn_type @J2.WithSelf.F, @J2.WithSelf(%J2.facet.6c9) [concrete] -// CHECK:STDOUT: %J2.WithSelf.F.2bb: %J2.WithSelf.F.type.43a = struct_value () [concrete] -// CHECK:STDOUT: %empty_tuple.type.as.J2.impl.F.type.56bdaf.2: type = fn_type @empty_tuple.type.as.J2.impl.F.loc23_40.2 [concrete] -// CHECK:STDOUT: %empty_tuple.type.as.J2.impl.F.7b8679.2: %empty_tuple.type.as.J2.impl.F.type.56bdaf.2 = struct_value () [concrete] -// CHECK:STDOUT: %C2: type = class_type @C2 [concrete] -// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete] -// CHECK:STDOUT: %J2_where.type.de0: type = facet_type <@J2 where %impl.elem0 = %C2> [concrete] -// CHECK:STDOUT: %J2.impl_witness.30f: = impl_witness @C2.as.J2.impl.%J2.impl_witness_table [concrete] -// CHECK:STDOUT: %pattern_type.8df: type = pattern_type %C2 [concrete] -// CHECK:STDOUT: %.d4c: Core.Form = init_form %C2 [concrete] -// CHECK:STDOUT: %C2.as.J2.impl.F.type.d2a210.1: type = fn_type @C2.as.J2.impl.F.loc32_40.1 [concrete] -// CHECK:STDOUT: %C2.as.J2.impl.F.720bb2.1: %C2.as.J2.impl.F.type.d2a210.1 = struct_value () [concrete] -// CHECK:STDOUT: %J2.facet.f19: %J2.type = facet_value %C2, (%J2.impl_witness.30f) [concrete] -// CHECK:STDOUT: %J2.WithSelf.F.type.3cd: type = fn_type @J2.WithSelf.F, @J2.WithSelf(%J2.facet.f19) [concrete] -// CHECK:STDOUT: %J2.WithSelf.F.06e: %J2.WithSelf.F.type.3cd = struct_value () [concrete] -// CHECK:STDOUT: %C2.as.J2.impl.F.type.d2a210.2: type = fn_type @C2.as.J2.impl.F.loc32_40.2 [concrete] -// CHECK:STDOUT: %C2.as.J2.impl.F.720bb2.2: %C2.as.J2.impl.F.type.d2a210.2 = struct_value () [concrete] -// CHECK:STDOUT: %C2.val: %C2 = struct_value () [concrete] +// CHECK:STDOUT: %A.as.J.impl.F.type: type = fn_type @A.as.J.impl.F [concrete] +// CHECK:STDOUT: %A.as.J.impl.F: %A.as.J.impl.F.type = struct_value () [concrete] +// CHECK:STDOUT: %A.as.J.impl.G.type: type = fn_type @A.as.J.impl.G [concrete] +// CHECK:STDOUT: %A.as.J.impl.G: %A.as.J.impl.G.type = struct_value () [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: imports { -// CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { -// CHECK:STDOUT: import Core//prelude -// CHECK:STDOUT: import Core//prelude/... -// CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: file { -// CHECK:STDOUT: package: = namespace [concrete] { -// CHECK:STDOUT: .Core = imports.%Core -// CHECK:STDOUT: .J2 = %J2.decl -// CHECK:STDOUT: .C2 = %C2.decl -// CHECK:STDOUT: } -// CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %J2.decl: type = interface_decl @J2 [concrete = constants.%J2.type] {} {} -// CHECK:STDOUT: impl_decl @empty_tuple.type.as.J2.impl [concrete] {} { -// CHECK:STDOUT: %.loc22_7.1: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple] -// CHECK:STDOUT: %.loc22_7.2: type = converted %.loc22_7.1, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] -// CHECK:STDOUT: %J2.ref: type = name_ref J2, file.%J2.decl [concrete = constants.%J2.type] -// CHECK:STDOUT: %.Self: %J2.type = symbolic_binding .Self [symbolic_self = constants.%.Self] -// CHECK:STDOUT: %.Self.ref: %J2.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self] -// CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref [symbolic_self = constants.%.Self.as_type] -// CHECK:STDOUT: %.loc22_21: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.as_type] -// CHECK:STDOUT: %U2.ref: %J2.assoc_type = name_ref U2, @U2.%assoc0 [concrete = constants.%assoc0] -// CHECK:STDOUT: %impl.elem0: type = impl_witness_access constants.%J2.lookup_impl_witness, element0 [symbolic_self = constants.%impl.elem0] -// CHECK:STDOUT: %.loc22_28.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct] -// CHECK:STDOUT: %.loc22_28.2: type = converted %.loc22_28.1, constants.%empty_struct_type [concrete = constants.%empty_struct_type] -// CHECK:STDOUT: %.loc22_15: type = where_expr [concrete = constants.%J2_where.type.1ad] { -// CHECK:STDOUT: requirement_base_facet_type %J2.ref -// CHECK:STDOUT: requirement_rewrite %impl.elem0, %.loc22_28.2 -// CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: %C2.decl: type = class_decl @C2 [concrete = constants.%C2] {} {} -// CHECK:STDOUT: impl_decl @C2.as.J2.impl [concrete] {} { -// CHECK:STDOUT: %C2.ref.loc31_6: type = name_ref C2, file.%C2.decl [concrete = constants.%C2] -// CHECK:STDOUT: %J2.ref: type = name_ref J2, file.%J2.decl [concrete = constants.%J2.type] -// CHECK:STDOUT: %.Self: %J2.type = symbolic_binding .Self [symbolic_self = constants.%.Self] -// CHECK:STDOUT: %.Self.ref: %J2.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self] -// CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref [symbolic_self = constants.%.Self.as_type] -// CHECK:STDOUT: %.loc31_21: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.as_type] -// CHECK:STDOUT: %U2.ref: %J2.assoc_type = name_ref U2, @U2.%assoc0 [concrete = constants.%assoc0] -// CHECK:STDOUT: %impl.elem0: type = impl_witness_access constants.%J2.lookup_impl_witness, element0 [symbolic_self = constants.%impl.elem0] -// CHECK:STDOUT: %C2.ref.loc31_27: type = name_ref C2, file.%C2.decl [concrete = constants.%C2] -// CHECK:STDOUT: %.loc31_15: type = where_expr [concrete = constants.%J2_where.type.de0] { -// CHECK:STDOUT: requirement_base_facet_type %J2.ref -// CHECK:STDOUT: requirement_rewrite %impl.elem0, %C2.ref.loc31_27 -// CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: interface @J2 { -// CHECK:STDOUT: %Self: %J2.type = symbolic_binding Self, 0 [symbolic = constants.%Self] -// CHECK:STDOUT: %J2.WithSelf.decl = interface_with_self_decl @J2 [concrete] -// CHECK:STDOUT: -// CHECK:STDOUT: !with Self: -// CHECK:STDOUT: %U2: type = assoc_const_decl @U2 [concrete] { -// CHECK:STDOUT: %assoc0: %J2.assoc_type = assoc_entity element0, @J2.WithSelf.%U2 [concrete = constants.%assoc0] -// CHECK:STDOUT: } -// CHECK:STDOUT: %J2.WithSelf.F.decl: @J2.WithSelf.%J2.WithSelf.F.type (%J2.WithSelf.F.type.68c) = fn_decl @J2.WithSelf.F [symbolic = @J2.WithSelf.%J2.WithSelf.F (constants.%J2.WithSelf.F.643)] { -// CHECK:STDOUT: %self.param_patt: @J2.WithSelf.F.%pattern_type (%pattern_type.307) = value_param_pattern [concrete] -// CHECK:STDOUT: %self.patt: @J2.WithSelf.F.%pattern_type (%pattern_type.307) = at_binding_pattern self, %self.param_patt [concrete] -// CHECK:STDOUT: %z.param_patt: = value_param_pattern [concrete] -// CHECK:STDOUT: %z.patt: = at_binding_pattern z, %z.param_patt [concrete] -// CHECK:STDOUT: %return.patt: = return_slot_pattern , [concrete] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %Self.ref.loc19_35: %J2.type = name_ref Self, @J2.%Self [symbolic = %Self (constants.%Self)] -// CHECK:STDOUT: %Self.as_type.loc19_39: type = facet_access_type %Self.ref.loc19_35 [symbolic = %Self.as_type.loc19_14.1 (constants.%Self.as_type)] -// CHECK:STDOUT: %.loc19_39: type = converted %Self.ref.loc19_35, %Self.as_type.loc19_39 [symbolic = %Self.as_type.loc19_14.1 (constants.%Self.as_type)] -// CHECK:STDOUT: %U2.ref.loc19_39: = name_ref U2, [concrete = ] -// CHECK:STDOUT: %self.param: @J2.WithSelf.F.%Self.as_type.loc19_14.1 (%Self.as_type) = value_param call_param0 -// CHECK:STDOUT: %.loc19_14.1: type = splice_block %.loc19_14.2 [symbolic = %Self.as_type.loc19_14.1 (constants.%Self.as_type)] { -// CHECK:STDOUT: %Self.ref.loc19_14: %J2.type = name_ref Self, @J2.%Self [symbolic = %Self (constants.%Self)] -// CHECK:STDOUT: %Self.as_type.loc19_14.2: type = facet_access_type %Self.ref.loc19_14 [symbolic = %Self.as_type.loc19_14.1 (constants.%Self.as_type)] -// CHECK:STDOUT: %.loc19_14.2: type = converted %Self.ref.loc19_14, %Self.as_type.loc19_14.2 [symbolic = %Self.as_type.loc19_14.1 (constants.%Self.as_type)] -// CHECK:STDOUT: } -// CHECK:STDOUT: %self: @J2.WithSelf.F.%Self.as_type.loc19_14.1 (%Self.as_type) = value_binding self, %self.param -// CHECK:STDOUT: %z.param: = value_param call_param1 -// CHECK:STDOUT: %.1: = splice_block [concrete = ] { -// CHECK:STDOUT: %Self.ref.loc19_23: %J2.type = name_ref Self, @J2.%Self [symbolic = %Self (constants.%Self)] -// CHECK:STDOUT: %Self.as_type.loc19_27: type = facet_access_type %Self.ref.loc19_23 [symbolic = %Self.as_type.loc19_14.1 (constants.%Self.as_type)] -// CHECK:STDOUT: %.loc19_27: type = converted %Self.ref.loc19_23, %Self.as_type.loc19_27 [symbolic = %Self.as_type.loc19_14.1 (constants.%Self.as_type)] -// CHECK:STDOUT: %U2.ref.loc19_27: = name_ref U2, [concrete = ] -// CHECK:STDOUT: } -// CHECK:STDOUT: %z: = value_binding z, [concrete = ] -// CHECK:STDOUT: %return: = return_slot -// CHECK:STDOUT: } -// CHECK:STDOUT: %assoc1: %J2.assoc_type = assoc_entity element1, %J2.WithSelf.F.decl [concrete = constants.%assoc1] +// CHECK:STDOUT: impl @A.as.J.impl: %A.ref as %J.ref { +// CHECK:STDOUT: %A.as.J.impl.F.decl: %A.as.J.impl.F.type = fn_decl @A.as.J.impl.F [concrete = constants.%A.as.J.impl.F] {} {} +// CHECK:STDOUT: +// CHECK:STDOUT: // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = %Self -// CHECK:STDOUT: .U2 = @U2.%assoc0 -// CHECK:STDOUT: .F = @J2.WithSelf.%assoc1 -// CHECK:STDOUT: witness = (@J2.WithSelf.%U2, @J2.WithSelf.%J2.WithSelf.F.decl) -// CHECK:STDOUT: -// CHECK:STDOUT: !requires: +// CHECK:STDOUT: .F = %A.as.J.impl.F.decl +// CHECK:STDOUT: .G = %A.as.J.impl.G.decl +// CHECK:STDOUT: extend %J.ref +// CHECK:STDOUT: witness = %J.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: impl @empty_tuple.type.as.J2.impl: %.loc22_7.2 as %.loc22_15 { -// CHECK:STDOUT: %empty_tuple.type.as.J2.impl.F.decl.loc23_40.1: %empty_tuple.type.as.J2.impl.F.type.56bdaf.1 = fn_decl @empty_tuple.type.as.J2.impl.F.loc23_40.1 [concrete = constants.%empty_tuple.type.as.J2.impl.F.7b8679.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.cb1 = value_param_pattern [concrete] -// CHECK:STDOUT: %self.patt: %pattern_type.cb1 = at_binding_pattern self, %self.param_patt [concrete] -// CHECK:STDOUT: %z.param_patt: %pattern_type.a96 = value_param_pattern [concrete] -// CHECK:STDOUT: %z.patt: %pattern_type.a96 = at_binding_pattern z, %z.param_patt [concrete] -// CHECK:STDOUT: %return.param_patt: %pattern_type.a96 = out_param_pattern [concrete] -// CHECK:STDOUT: %return.patt: %pattern_type.a96 = return_slot_pattern %return.param_patt, %.loc23_38.2 [concrete] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc23_38.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct] -// CHECK:STDOUT: %.loc23_38.2: type = converted %.loc23_38.1, constants.%empty_struct_type [concrete = constants.%empty_struct_type] -// CHECK:STDOUT: %.loc23_38.3: Core.Form = init_form %.loc23_38.2 [concrete = constants.%.469] -// CHECK:STDOUT: %self.param: %empty_tuple.type = value_param call_param0 -// CHECK:STDOUT: %Self.ref: type = name_ref Self, @empty_tuple.type.as.J2.impl.%.loc22_7.2 [concrete = constants.%empty_tuple.type] -// CHECK:STDOUT: %self: %empty_tuple.type = value_binding self, %self.param -// CHECK:STDOUT: %z.param: %empty_struct_type = value_param call_param1 -// CHECK:STDOUT: %.loc23_31.1: type = splice_block %.loc23_31.3 [concrete = constants.%empty_struct_type] { -// CHECK:STDOUT: %.loc23_31.2: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct] -// CHECK:STDOUT: %.loc23_31.3: type = converted %.loc23_31.2, constants.%empty_struct_type [concrete = constants.%empty_struct_type] -// CHECK:STDOUT: } -// CHECK:STDOUT: %z: %empty_struct_type = value_binding z, %z.param -// CHECK:STDOUT: %return.param: ref %empty_struct_type = out_param call_param2 -// CHECK:STDOUT: %return: ref %empty_struct_type = return_slot %return.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %.1: type = specific_constant , @J2.WithSelf.F(constants.%J2.facet.6c9) [concrete = ] -// CHECK:STDOUT: %.2: type = specific_constant , @J2.WithSelf.F(constants.%J2.facet.6c9) [concrete = ] -// CHECK:STDOUT: %empty_tuple.type.as.J2.impl.F.decl.loc23_40.2: %empty_tuple.type.as.J2.impl.F.type.56bdaf.2 = fn_decl @empty_tuple.type.as.J2.impl.F.loc23_40.2 [concrete = constants.%empty_tuple.type.as.J2.impl.F.7b8679.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.cb1 = value_param_pattern [concrete] -// CHECK:STDOUT: %self.patt: %pattern_type.cb1 = at_binding_pattern self, %self.param_patt [concrete] -// CHECK:STDOUT: %return.patt: = return_slot_pattern , invalid [concrete] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: %empty_tuple.type = value_param call_param0 -// CHECK:STDOUT: %self: %empty_tuple.type = value_binding self, %self.param -// CHECK:STDOUT: %return: = return_slot -// CHECK:STDOUT: } -// CHECK:STDOUT: %J2.impl_witness_table = impl_witness_table (%impl_witness_assoc_constant, %empty_tuple.type.as.J2.impl.F.decl.loc23_40.2), @empty_tuple.type.as.J2.impl [concrete] -// CHECK:STDOUT: %J2.impl_witness: = impl_witness %J2.impl_witness_table [concrete = constants.%J2.impl_witness.941] -// CHECK:STDOUT: %impl_witness_assoc_constant: type = impl_witness_assoc_constant constants.%empty_struct_type [concrete = constants.%empty_struct_type] -// CHECK:STDOUT: -// CHECK:STDOUT: !members: -// CHECK:STDOUT: .F = %empty_tuple.type.as.J2.impl.F.decl.loc23_40.1 -// CHECK:STDOUT: witness = %J2.impl_witness -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: impl @C2.as.J2.impl: %C2.ref.loc31_6 as %.loc31_15 { -// CHECK:STDOUT: %C2.as.J2.impl.F.decl.loc32_40.1: %C2.as.J2.impl.F.type.d2a210.1 = fn_decl @C2.as.J2.impl.F.loc32_40.1 [concrete = constants.%C2.as.J2.impl.F.720bb2.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.8df = value_param_pattern [concrete] -// CHECK:STDOUT: %self.patt: %pattern_type.8df = at_binding_pattern self, %self.param_patt [concrete] -// CHECK:STDOUT: %z.param_patt: %pattern_type.8df = value_param_pattern [concrete] -// CHECK:STDOUT: %z.patt: %pattern_type.8df = at_binding_pattern z, %z.param_patt [concrete] -// CHECK:STDOUT: %return.param_patt: %pattern_type.8df = out_param_pattern [concrete] -// CHECK:STDOUT: %return.patt: %pattern_type.8df = return_slot_pattern %return.param_patt, %C2.ref.loc32_37 [concrete] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %C2.ref.loc32_37: type = name_ref C2, file.%C2.decl [concrete = constants.%C2] -// CHECK:STDOUT: %.loc32_37: Core.Form = init_form %C2.ref.loc32_37 [concrete = constants.%.d4c] -// CHECK:STDOUT: %self.param: %C2 = value_param call_param0 -// CHECK:STDOUT: %Self.ref: type = name_ref Self, @C2.as.J2.impl.%C2.ref.loc31_6 [concrete = constants.%C2] -// CHECK:STDOUT: %self: %C2 = value_binding self, %self.param -// CHECK:STDOUT: %z.param: %C2 = value_param call_param1 -// CHECK:STDOUT: %C2.ref.loc32_30: type = name_ref C2, file.%C2.decl [concrete = constants.%C2] -// CHECK:STDOUT: %z: %C2 = value_binding z, %z.param -// CHECK:STDOUT: %return.param: ref %C2 = out_param call_param2 -// CHECK:STDOUT: %return: ref %C2 = return_slot %return.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %.1: type = specific_constant , @J2.WithSelf.F(constants.%J2.facet.f19) [concrete = ] -// CHECK:STDOUT: %.2: type = specific_constant , @J2.WithSelf.F(constants.%J2.facet.f19) [concrete = ] -// CHECK:STDOUT: %C2.as.J2.impl.F.decl.loc32_40.2: %C2.as.J2.impl.F.type.d2a210.2 = fn_decl @C2.as.J2.impl.F.loc32_40.2 [concrete = constants.%C2.as.J2.impl.F.720bb2.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.8df = value_param_pattern [concrete] -// CHECK:STDOUT: %self.patt: %pattern_type.8df = at_binding_pattern self, %self.param_patt [concrete] -// CHECK:STDOUT: %return.patt: = return_slot_pattern , invalid [concrete] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: %C2 = value_param call_param0 -// CHECK:STDOUT: %self: %C2 = value_binding self, %self.param -// CHECK:STDOUT: %return: = return_slot -// CHECK:STDOUT: } -// CHECK:STDOUT: %J2.impl_witness_table = impl_witness_table (%impl_witness_assoc_constant, %C2.as.J2.impl.F.decl.loc32_40.2), @C2.as.J2.impl [concrete] -// CHECK:STDOUT: %J2.impl_witness: = impl_witness %J2.impl_witness_table [concrete = constants.%J2.impl_witness.30f] -// CHECK:STDOUT: %impl_witness_assoc_constant: type = impl_witness_assoc_constant constants.%C2 [concrete = constants.%C2] -// CHECK:STDOUT: -// CHECK:STDOUT: !members: -// CHECK:STDOUT: .C2 = -// CHECK:STDOUT: .F = %C2.as.J2.impl.F.decl.loc32_40.1 -// CHECK:STDOUT: witness = %J2.impl_witness -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: class @C2 { -// CHECK:STDOUT: %.loc28_10: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct] -// CHECK:STDOUT: %.loc28_11: type = converted %.loc28_10, constants.%empty_struct_type [concrete = constants.%empty_struct_type] -// CHECK:STDOUT: adapt_decl %.loc28_11 [concrete] -// CHECK:STDOUT: %complete_type: = complete_type_witness constants.%empty_struct_type [concrete = constants.%complete_type] -// CHECK:STDOUT: complete_type_witness = %complete_type -// CHECK:STDOUT: -// CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = constants.%C2 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generic fn @J2.WithSelf.F(@J2.%Self: %J2.type) { -// CHECK:STDOUT: %Self: %J2.type = symbolic_binding Self, 0 [symbolic = %Self (constants.%Self)] -// CHECK:STDOUT: %Self.as_type.loc19_14.1: type = facet_access_type %Self [symbolic = %Self.as_type.loc19_14.1 (constants.%Self.as_type)] -// CHECK:STDOUT: %pattern_type: type = pattern_type %Self.as_type.loc19_14.1 [symbolic = %pattern_type (constants.%pattern_type.307)] -// CHECK:STDOUT: -// CHECK:STDOUT: fn(%self.param: @J2.WithSelf.F.%Self.as_type.loc19_14.1 (%Self.as_type), %z.param: ) -> ; -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @empty_tuple.type.as.J2.impl.F.loc23_40.1(%self.param: %empty_tuple.type, %z.param: %empty_struct_type) -> out %return.param: %empty_struct_type { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %z.ref: %empty_struct_type = name_ref z, %z -// CHECK:STDOUT: %.loc23_49: init %empty_struct_type = struct_init () [concrete = constants.%empty_struct] -// CHECK:STDOUT: %.loc23_50: init %empty_struct_type = converted %z.ref, %.loc23_49 [concrete = constants.%empty_struct] -// CHECK:STDOUT: return %.loc23_50 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @empty_tuple.type.as.J2.impl.F.loc23_40.2(%self.param: %empty_tuple.type) -> [thunk @empty_tuple.type.as.J2.impl.%empty_tuple.type.as.J2.impl.F.decl.loc23_40.1 for @J2.WithSelf.%J2.WithSelf.F.decl, @J2.WithSelf.F(constants.%J2.facet.6c9)] { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %F.ref: %empty_tuple.type.as.J2.impl.F.type.56bdaf.1 = name_ref F, @empty_tuple.type.as.J2.impl.%empty_tuple.type.as.J2.impl.F.decl.loc23_40.1 [concrete = constants.%empty_tuple.type.as.J2.impl.F.7b8679.1] -// CHECK:STDOUT: %empty_tuple.type.as.J2.impl.F.bound: = bound_method %self.param, %F.ref -// CHECK:STDOUT: %empty_tuple.type.as.J2.impl.F.call: init %empty_struct_type = call %empty_tuple.type.as.J2.impl.F.bound(%self.param, ) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @C2.as.J2.impl.F.loc32_40.1(%self.param: %C2, %z.param: %C2) -> out %return.param: %C2 { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %self.ref: %C2 = name_ref self, %self -// CHECK:STDOUT: %.loc32_53.1: %empty_struct_type = as_compatible %self.ref -// CHECK:STDOUT: %.loc32_53.2: init %empty_struct_type = struct_init () [concrete = constants.%empty_struct] -// CHECK:STDOUT: %.loc32_53.3: init %C2 = as_compatible %.loc32_53.2 [concrete = constants.%C2.val] -// CHECK:STDOUT: %.loc32_53.4: init %C2 = converted %self.ref, %.loc32_53.3 [concrete = constants.%C2.val] -// CHECK:STDOUT: return %.loc32_53.4 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @C2.as.J2.impl.F.loc32_40.2(%self.param: %C2) -> [thunk @C2.as.J2.impl.%C2.as.J2.impl.F.decl.loc32_40.1 for @J2.WithSelf.%J2.WithSelf.F.decl, @J2.WithSelf.F(constants.%J2.facet.f19)] { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %F.ref: %C2.as.J2.impl.F.type.d2a210.1 = name_ref F, @C2.as.J2.impl.%C2.as.J2.impl.F.decl.loc32_40.1 [concrete = constants.%C2.as.J2.impl.F.720bb2.1] -// CHECK:STDOUT: %C2.as.J2.impl.F.bound: = bound_method %self.param, %F.ref -// CHECK:STDOUT: %C2.as.J2.impl.F.call: init %C2 = call %C2.as.J2.impl.F.bound(%self.param, ) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: specific @J2.WithSelf(constants.%Self) { -// CHECK:STDOUT: !definition: -// CHECK:STDOUT: %Self => constants.%Self -// CHECK:STDOUT: %J2.WithSelf.F.type => constants.%J2.WithSelf.F.type.68c -// CHECK:STDOUT: %J2.WithSelf.F => constants.%J2.WithSelf.F.643 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: specific @J2.WithSelf.F(constants.%Self) { -// CHECK:STDOUT: %Self => constants.%Self -// CHECK:STDOUT: %Self.as_type.loc19_14.1 => constants.%Self.as_type -// CHECK:STDOUT: %pattern_type => constants.%pattern_type.307 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: specific @J2.WithSelf(constants.%.Self) { -// CHECK:STDOUT: !definition: -// CHECK:STDOUT: %Self => constants.%.Self -// CHECK:STDOUT: %J2.WithSelf.F.type => constants.%J2.WithSelf.F.type.30c -// CHECK:STDOUT: %J2.WithSelf.F => constants.%J2.WithSelf.F.99a -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: specific @J2.WithSelf(constants.%J2.facet.6c9) { -// CHECK:STDOUT: !definition: -// CHECK:STDOUT: %Self => constants.%J2.facet.6c9 -// CHECK:STDOUT: %J2.WithSelf.F.type => constants.%J2.WithSelf.F.type.43a -// CHECK:STDOUT: %J2.WithSelf.F => constants.%J2.WithSelf.F.2bb -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: specific @J2.WithSelf.F(constants.%J2.facet.6c9) { -// CHECK:STDOUT: %Self => constants.%J2.facet.6c9 -// CHECK:STDOUT: %Self.as_type.loc19_14.1 => constants.%empty_tuple.type -// CHECK:STDOUT: %pattern_type => constants.%pattern_type.cb1 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: specific @J2.WithSelf(constants.%J2.facet.f19) { -// CHECK:STDOUT: !definition: -// CHECK:STDOUT: %Self => constants.%J2.facet.f19 -// CHECK:STDOUT: %J2.WithSelf.F.type => constants.%J2.WithSelf.F.type.3cd -// CHECK:STDOUT: %J2.WithSelf.F => constants.%J2.WithSelf.F.06e -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: specific @J2.WithSelf.F(constants.%J2.facet.f19) { -// CHECK:STDOUT: %Self => constants.%J2.facet.f19 -// CHECK:STDOUT: %Self.as_type.loc19_14.1 => constants.%C2 -// CHECK:STDOUT: %pattern_type => constants.%pattern_type.8df -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: --- fail_associated_type_in_signature_mismatch.carbon -// CHECK:STDOUT: -// CHECK:STDOUT: constants { -// CHECK:STDOUT: %K.type: type = facet_type <@K> [concrete] -// CHECK:STDOUT: %Self.44d: %K.type = symbolic_binding Self, 0 [symbolic] -// CHECK:STDOUT: %K.assoc_type: type = assoc_entity_type @K [concrete] -// CHECK:STDOUT: %assoc0.6cb: %K.assoc_type = assoc_entity element0, @K.WithSelf.%V [concrete] -// CHECK:STDOUT: %Self.as_type.6f5: type = facet_access_type %Self.44d [symbolic] -// CHECK:STDOUT: %pattern_type.c8b: type = pattern_type %Self.as_type.6f5 [symbolic] -// CHECK:STDOUT: %K.lookup_impl_witness.a24: = lookup_impl_witness %Self.44d, @K [symbolic] -// CHECK:STDOUT: %impl.elem0.c23: type = impl_witness_access %K.lookup_impl_witness.a24, element0 [symbolic] -// CHECK:STDOUT: %pattern_type.9fa: type = pattern_type %impl.elem0.c23 [symbolic] -// CHECK:STDOUT: %.c1a: Core.Form = init_form %impl.elem0.c23 [symbolic] -// CHECK:STDOUT: %K.WithSelf.F.type.d74: type = fn_type @K.WithSelf.F, @K.WithSelf(%Self.44d) [symbolic] -// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] -// CHECK:STDOUT: %K.WithSelf.F.f53: %K.WithSelf.F.type.d74 = struct_value () [symbolic] -// CHECK:STDOUT: %assoc1: %K.assoc_type = assoc_entity element1, @K.WithSelf.%K.WithSelf.F.decl [concrete] -// CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [concrete] -// CHECK:STDOUT: %.Self: %K.type = symbolic_binding .Self [symbolic_self] -// CHECK:STDOUT: %K.WithSelf.F.type.262: type = fn_type @K.WithSelf.F, @K.WithSelf(%.Self) [symbolic_self] -// CHECK:STDOUT: %K.WithSelf.F.40c: %K.WithSelf.F.type.262 = struct_value () [symbolic_self] -// CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self [symbolic_self] -// CHECK:STDOUT: %K.lookup_impl_witness.28c: = lookup_impl_witness %.Self, @K [symbolic_self] -// CHECK:STDOUT: %impl.elem0.afd: type = impl_witness_access %K.lookup_impl_witness.28c, element0 [symbolic_self] -// CHECK:STDOUT: %struct_type.a: type = struct_type {.a: %empty_tuple.type} [concrete] -// CHECK:STDOUT: %K_where.type: type = facet_type <@K where %impl.elem0.afd = %struct_type.a> [concrete] -// CHECK:STDOUT: %K.impl_witness: = impl_witness @empty_tuple.type.as.K.impl.%K.impl_witness_table [concrete] -// CHECK:STDOUT: %pattern_type.cb1: type = pattern_type %empty_tuple.type [concrete] -// CHECK:STDOUT: %struct_type.x: type = struct_type {.x: %empty_tuple.type} [concrete] -// CHECK:STDOUT: %pattern_type.414: type = pattern_type %struct_type.x [concrete] -// CHECK:STDOUT: %.a89: Core.Form = init_form %struct_type.x [concrete] -// CHECK:STDOUT: %empty_tuple.type.as.K.impl.F.type.1710d5.1: type = fn_type @empty_tuple.type.as.K.impl.F.loc26_52.1 [concrete] -// CHECK:STDOUT: %empty_tuple.type.as.K.impl.F.907e52.1: %empty_tuple.type.as.K.impl.F.type.1710d5.1 = struct_value () [concrete] -// CHECK:STDOUT: %K.facet: %K.type = facet_value %empty_tuple.type, (%K.impl_witness) [concrete] -// CHECK:STDOUT: %K.WithSelf.F.type.aac: type = fn_type @K.WithSelf.F, @K.WithSelf(%K.facet) [concrete] -// CHECK:STDOUT: %K.WithSelf.F.e22: %K.WithSelf.F.type.aac = struct_value () [concrete] -// CHECK:STDOUT: %pattern_type.e85: type = pattern_type %struct_type.a [concrete] -// CHECK:STDOUT: %.4f9: Core.Form = init_form %struct_type.a [concrete] -// CHECK:STDOUT: %empty_tuple.type.as.K.impl.F.type.1710d5.2: type = fn_type @empty_tuple.type.as.K.impl.F.loc26_52.2 [concrete] -// CHECK:STDOUT: %empty_tuple.type.as.K.impl.F.907e52.2: %empty_tuple.type.as.K.impl.F.type.1710d5.2 = struct_value () [concrete] -// CHECK:STDOUT: %struct: %struct_type.x = struct_value (%empty_tuple) [concrete] -// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %Destroy.Op.type.bae255.2: type = fn_type @Destroy.Op.loc26_52.2 [concrete] -// CHECK:STDOUT: %Destroy.Op.651ba6.2: %Destroy.Op.type.bae255.2 = struct_value () [concrete] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: imports { -// CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { -// CHECK:STDOUT: .Destroy = %Core.Destroy -// CHECK:STDOUT: import Core//prelude -// CHECK:STDOUT: import Core//prelude/... -// CHECK:STDOUT: } -// CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: file { -// CHECK:STDOUT: package: = namespace [concrete] { -// CHECK:STDOUT: .Core = imports.%Core -// CHECK:STDOUT: .K = %K.decl -// CHECK:STDOUT: } -// CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %K.decl: type = interface_decl @K [concrete = constants.%K.type] {} {} -// CHECK:STDOUT: impl_decl @empty_tuple.type.as.K.impl [concrete] {} { -// CHECK:STDOUT: %.loc11_7.1: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple] -// CHECK:STDOUT: %.loc11_7.2: type = converted %.loc11_7.1, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] -// CHECK:STDOUT: %K.ref: type = name_ref K, file.%K.decl [concrete = constants.%K.type] -// CHECK:STDOUT: %.Self: %K.type = symbolic_binding .Self [symbolic_self = constants.%.Self] -// CHECK:STDOUT: %.Self.ref: %K.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self] -// CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref [symbolic_self = constants.%.Self.as_type] -// CHECK:STDOUT: %.loc11_20: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.as_type] -// CHECK:STDOUT: %V.ref: %K.assoc_type = name_ref V, @V.%assoc0 [concrete = constants.%assoc0.6cb] -// CHECK:STDOUT: %impl.elem0: type = impl_witness_access constants.%K.lookup_impl_witness.28c, element0 [symbolic_self = constants.%impl.elem0.afd] -// CHECK:STDOUT: %.loc11_31.1: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple] -// CHECK:STDOUT: %.loc11_31.2: type = converted %.loc11_31.1, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] -// CHECK:STDOUT: %struct_type.a: type = struct_type {.a: %empty_tuple.type} [concrete = constants.%struct_type.a] -// CHECK:STDOUT: %.loc11_14: type = where_expr [concrete = constants.%K_where.type] { -// CHECK:STDOUT: requirement_base_facet_type %K.ref -// CHECK:STDOUT: requirement_rewrite %impl.elem0, %struct_type.a -// CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: interface @K { -// CHECK:STDOUT: %Self: %K.type = symbolic_binding Self, 0 [symbolic = constants.%Self.44d] -// CHECK:STDOUT: %K.WithSelf.decl = interface_with_self_decl @K [concrete] -// CHECK:STDOUT: -// CHECK:STDOUT: !with Self: -// CHECK:STDOUT: %V: type = assoc_const_decl @V [concrete] { -// CHECK:STDOUT: %assoc0: %K.assoc_type = assoc_entity element0, @K.WithSelf.%V [concrete = constants.%assoc0.6cb] -// CHECK:STDOUT: } -// CHECK:STDOUT: %K.WithSelf.F.decl: @K.WithSelf.%K.WithSelf.F.type (%K.WithSelf.F.type.d74) = fn_decl @K.WithSelf.F [symbolic = @K.WithSelf.%K.WithSelf.F (constants.%K.WithSelf.F.f53)] { -// CHECK:STDOUT: %self.param_patt: @K.WithSelf.F.%pattern_type.loc8_12 (%pattern_type.c8b) = value_param_pattern [concrete] -// CHECK:STDOUT: %self.patt: @K.WithSelf.F.%pattern_type.loc8_12 (%pattern_type.c8b) = at_binding_pattern self, %self.param_patt [concrete] -// CHECK:STDOUT: %v.param_patt: @K.WithSelf.F.%pattern_type.loc8_21 (%pattern_type.9fa) = value_param_pattern [concrete] -// CHECK:STDOUT: %v.patt: @K.WithSelf.F.%pattern_type.loc8_21 (%pattern_type.9fa) = at_binding_pattern v, %v.param_patt [concrete] -// CHECK:STDOUT: %return.param_patt: @K.WithSelf.F.%pattern_type.loc8_21 (%pattern_type.9fa) = out_param_pattern [concrete] -// CHECK:STDOUT: %return.patt: @K.WithSelf.F.%pattern_type.loc8_21 (%pattern_type.9fa) = return_slot_pattern %return.param_patt, %V.ref.loc8_29 [concrete] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %impl.elem0.loc8_29: type = impl_witness_access constants.%K.lookup_impl_witness.a24, element0 [symbolic = %impl.elem0.loc8_23.1 (constants.%impl.elem0.c23)] -// CHECK:STDOUT: %V.ref.loc8_29: type = name_ref V, %impl.elem0.loc8_29 [symbolic = %impl.elem0.loc8_23.1 (constants.%impl.elem0.c23)] -// CHECK:STDOUT: %.loc8_29.2: Core.Form = init_form %V.ref.loc8_29 [symbolic = %.loc8_29.1 (constants.%.c1a)] -// CHECK:STDOUT: %self.param: @K.WithSelf.F.%Self.as_type.loc8_14.1 (%Self.as_type.6f5) = value_param call_param0 -// CHECK:STDOUT: %.loc8_14.1: type = splice_block %.loc8_14.2 [symbolic = %Self.as_type.loc8_14.1 (constants.%Self.as_type.6f5)] { -// CHECK:STDOUT: %Self.ref: %K.type = name_ref Self, @K.%Self [symbolic = %Self (constants.%Self.44d)] -// CHECK:STDOUT: %Self.as_type.loc8_14.2: type = facet_access_type %Self.ref [symbolic = %Self.as_type.loc8_14.1 (constants.%Self.as_type.6f5)] -// CHECK:STDOUT: %.loc8_14.2: type = converted %Self.ref, %Self.as_type.loc8_14.2 [symbolic = %Self.as_type.loc8_14.1 (constants.%Self.as_type.6f5)] -// CHECK:STDOUT: } -// CHECK:STDOUT: %self: @K.WithSelf.F.%Self.as_type.loc8_14.1 (%Self.as_type.6f5) = value_binding self, %self.param -// CHECK:STDOUT: %v.param: @K.WithSelf.F.%impl.elem0.loc8_23.1 (%impl.elem0.c23) = value_param call_param1 -// CHECK:STDOUT: %.loc8_23: type = splice_block %V.ref.loc8_23 [symbolic = %impl.elem0.loc8_23.1 (constants.%impl.elem0.c23)] { -// CHECK:STDOUT: %impl.elem0.loc8_23.2: type = impl_witness_access constants.%K.lookup_impl_witness.a24, element0 [symbolic = %impl.elem0.loc8_23.1 (constants.%impl.elem0.c23)] -// CHECK:STDOUT: %V.ref.loc8_23: type = name_ref V, %impl.elem0.loc8_23.2 [symbolic = %impl.elem0.loc8_23.1 (constants.%impl.elem0.c23)] -// CHECK:STDOUT: } -// CHECK:STDOUT: %v: @K.WithSelf.F.%impl.elem0.loc8_23.1 (%impl.elem0.c23) = value_binding v, %v.param -// CHECK:STDOUT: %return.param: ref @K.WithSelf.F.%impl.elem0.loc8_23.1 (%impl.elem0.c23) = out_param call_param2 -// CHECK:STDOUT: %return: ref @K.WithSelf.F.%impl.elem0.loc8_23.1 (%impl.elem0.c23) = return_slot %return.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %assoc1: %K.assoc_type = assoc_entity element1, %K.WithSelf.F.decl [concrete = constants.%assoc1] -// CHECK:STDOUT: -// CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = %Self -// CHECK:STDOUT: .V = @V.%assoc0 -// CHECK:STDOUT: .F = @K.WithSelf.%assoc1 -// CHECK:STDOUT: witness = (@K.WithSelf.%V, @K.WithSelf.%K.WithSelf.F.decl) -// CHECK:STDOUT: -// CHECK:STDOUT: !requires: -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: impl @empty_tuple.type.as.K.impl: %.loc11_7.2 as %.loc11_14 { -// CHECK:STDOUT: %empty_tuple.type.as.K.impl.F.decl.loc26_52.1: %empty_tuple.type.as.K.impl.F.type.1710d5.1 = fn_decl @empty_tuple.type.as.K.impl.F.loc26_52.1 [concrete = constants.%empty_tuple.type.as.K.impl.F.907e52.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.cb1 = value_param_pattern [concrete] -// CHECK:STDOUT: %self.patt: %pattern_type.cb1 = at_binding_pattern self, %self.param_patt [concrete] -// CHECK:STDOUT: %v.param_patt: %pattern_type.414 = value_param_pattern [concrete] -// CHECK:STDOUT: %v.patt: %pattern_type.414 = at_binding_pattern v, %v.param_patt [concrete] -// CHECK:STDOUT: %return.param_patt: %pattern_type.414 = out_param_pattern [concrete] -// CHECK:STDOUT: %return.patt: %pattern_type.414 = return_slot_pattern %return.param_patt, %struct_type.x.loc26_50 [concrete] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc26_49.1: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple] -// CHECK:STDOUT: %.loc26_49.2: type = converted %.loc26_49.1, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] -// CHECK:STDOUT: %struct_type.x.loc26_50: type = struct_type {.x: %empty_tuple.type} [concrete = constants.%struct_type.x] -// CHECK:STDOUT: %.loc26_50: Core.Form = init_form %struct_type.x.loc26_50 [concrete = constants.%.a89] -// CHECK:STDOUT: %self.param: %empty_tuple.type = value_param call_param0 -// CHECK:STDOUT: %Self.ref: type = name_ref Self, @empty_tuple.type.as.K.impl.%.loc11_7.2 [concrete = constants.%empty_tuple.type] -// CHECK:STDOUT: %self: %empty_tuple.type = value_binding self, %self.param -// CHECK:STDOUT: %v.param: %struct_type.x = value_param call_param1 -// CHECK:STDOUT: %.loc26_37: type = splice_block %struct_type.x.loc26_37 [concrete = constants.%struct_type.x] { -// CHECK:STDOUT: %.loc26_36.1: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple] -// CHECK:STDOUT: %.loc26_36.2: type = converted %.loc26_36.1, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] -// CHECK:STDOUT: %struct_type.x.loc26_37: type = struct_type {.x: %empty_tuple.type} [concrete = constants.%struct_type.x] -// CHECK:STDOUT: } -// CHECK:STDOUT: %v: %struct_type.x = value_binding v, %v.param -// CHECK:STDOUT: %return.param: ref %struct_type.x = out_param call_param2 -// CHECK:STDOUT: %return: ref %struct_type.x = return_slot %return.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %.loc8_29.1: type = specific_constant @K.WithSelf.F.%V.ref.loc8_29, @K.WithSelf.F(constants.%K.facet) [concrete = constants.%struct_type.a] -// CHECK:STDOUT: %.loc8_29.2: type = specific_constant @K.WithSelf.F.%.loc8_29.2, @K.WithSelf.F(constants.%K.facet) [concrete = constants.%.4f9] -// CHECK:STDOUT: %empty_tuple.type.as.K.impl.F.decl.loc26_52.2: %empty_tuple.type.as.K.impl.F.type.1710d5.2 = fn_decl @empty_tuple.type.as.K.impl.F.loc26_52.2 [concrete = constants.%empty_tuple.type.as.K.impl.F.907e52.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.cb1 = value_param_pattern [concrete] -// CHECK:STDOUT: %self.patt: %pattern_type.cb1 = at_binding_pattern self, %self.param_patt [concrete] -// CHECK:STDOUT: %v.param_patt: %pattern_type.e85 = value_param_pattern [concrete] -// CHECK:STDOUT: %v.patt: %pattern_type.e85 = at_binding_pattern v, %v.param_patt [concrete] -// CHECK:STDOUT: %return.param_patt: %pattern_type.e85 = out_param_pattern [concrete] -// CHECK:STDOUT: %return.patt: %pattern_type.e85 = return_slot_pattern %return.param_patt, invalid [concrete] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: %empty_tuple.type = value_param call_param0 -// CHECK:STDOUT: %self: %empty_tuple.type = value_binding self, %self.param -// CHECK:STDOUT: %v.param: %struct_type.a = value_param call_param1 -// CHECK:STDOUT: %v: %struct_type.a = value_binding v, %v.param -// CHECK:STDOUT: %return.param: ref %struct_type.a = out_param call_param2 -// CHECK:STDOUT: %return: ref %struct_type.a = return_slot %return.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %K.impl_witness_table = impl_witness_table (%impl_witness_assoc_constant, %empty_tuple.type.as.K.impl.F.decl.loc26_52.2), @empty_tuple.type.as.K.impl [concrete] -// CHECK:STDOUT: %K.impl_witness: = impl_witness %K.impl_witness_table [concrete = constants.%K.impl_witness] -// CHECK:STDOUT: %impl_witness_assoc_constant: type = impl_witness_assoc_constant constants.%struct_type.a [concrete = constants.%struct_type.a] -// CHECK:STDOUT: -// CHECK:STDOUT: !members: -// CHECK:STDOUT: .F = %empty_tuple.type.as.K.impl.F.decl.loc26_52.1 -// CHECK:STDOUT: witness = %K.impl_witness -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generic fn @K.WithSelf.F(@K.%Self: %K.type) { -// CHECK:STDOUT: %Self: %K.type = symbolic_binding Self, 0 [symbolic = %Self (constants.%Self.44d)] -// CHECK:STDOUT: %Self.as_type.loc8_14.1: type = facet_access_type %Self [symbolic = %Self.as_type.loc8_14.1 (constants.%Self.as_type.6f5)] -// CHECK:STDOUT: %pattern_type.loc8_12: type = pattern_type %Self.as_type.loc8_14.1 [symbolic = %pattern_type.loc8_12 (constants.%pattern_type.c8b)] -// CHECK:STDOUT: %K.lookup_impl_witness: = lookup_impl_witness %Self, @K [symbolic = %K.lookup_impl_witness (constants.%K.lookup_impl_witness.a24)] -// CHECK:STDOUT: %impl.elem0.loc8_23.1: type = impl_witness_access %K.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc8_23.1 (constants.%impl.elem0.c23)] -// CHECK:STDOUT: %pattern_type.loc8_21: type = pattern_type %impl.elem0.loc8_23.1 [symbolic = %pattern_type.loc8_21 (constants.%pattern_type.9fa)] -// CHECK:STDOUT: %.loc8_29.1: Core.Form = init_form %impl.elem0.loc8_23.1 [symbolic = %.loc8_29.1 (constants.%.c1a)] -// CHECK:STDOUT: -// CHECK:STDOUT: fn(%self.param: @K.WithSelf.F.%Self.as_type.loc8_14.1 (%Self.as_type.6f5), %v.param: @K.WithSelf.F.%impl.elem0.loc8_23.1 (%impl.elem0.c23)) -> out %return.param: @K.WithSelf.F.%impl.elem0.loc8_23.1 (%impl.elem0.c23); -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @empty_tuple.type.as.K.impl.F.loc26_52.1(%self.param: %empty_tuple.type, %v.param: %struct_type.x) -> out %return.param: %struct_type.x { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %v.ref: %struct_type.x = name_ref v, %v -// CHECK:STDOUT: %.loc26_61.1: %empty_tuple.type = struct_access %v.ref, element0 -// CHECK:STDOUT: %.loc26_61.2: init %empty_tuple.type = tuple_init () [concrete = constants.%empty_tuple] -// CHECK:STDOUT: %.loc26_61.3: init %empty_tuple.type = converted %.loc26_61.1, %.loc26_61.2 [concrete = constants.%empty_tuple] -// CHECK:STDOUT: %.loc26_61.4: init %struct_type.x = struct_init (%.loc26_61.3) [concrete = constants.%struct] -// CHECK:STDOUT: %.loc26_62: init %struct_type.x = converted %v.ref, %.loc26_61.4 [concrete = constants.%struct] -// CHECK:STDOUT: return %.loc26_62 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @empty_tuple.type.as.K.impl.F.loc26_52.2(%self.param: %empty_tuple.type, %v.param: %struct_type.a) -> out %return.param: %struct_type.a [thunk @empty_tuple.type.as.K.impl.%empty_tuple.type.as.K.impl.F.decl.loc26_52.1 for @K.WithSelf.%K.WithSelf.F.decl, @K.WithSelf.F(constants.%K.facet)] { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %F.ref: %empty_tuple.type.as.K.impl.F.type.1710d5.1 = name_ref F, @empty_tuple.type.as.K.impl.%empty_tuple.type.as.K.impl.F.decl.loc26_52.1 [concrete = constants.%empty_tuple.type.as.K.impl.F.907e52.1] -// CHECK:STDOUT: %empty_tuple.type.as.K.impl.F.bound: = bound_method %self.param, %F.ref -// CHECK:STDOUT: %empty_tuple.type.as.K.impl.F.call: init %struct_type.x = call %empty_tuple.type.as.K.impl.F.bound(%self.param, ) -// CHECK:STDOUT: %.loc26_52.1: ref %struct_type.x = temporary_storage -// CHECK:STDOUT: %.loc26_52.2: ref %struct_type.x = temporary %.loc26_52.1, %empty_tuple.type.as.K.impl.F.call -// CHECK:STDOUT: %Destroy.Op.bound: = bound_method %.loc26_52.2, constants.%Destroy.Op.651ba6.2 -// CHECK:STDOUT: %Destroy.Op.call: init %empty_tuple.type = call %Destroy.Op.bound(%.loc26_52.2) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.Op.loc26_52.1(%self.param: ref %empty_tuple.type) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.Op.loc26_52.2(%self.param: ref %struct_type.x) { +// CHECK:STDOUT: fn @A.as.J.impl.F() { // CHECK:STDOUT: !entry: +// CHECK:STDOUT: %G.ref: %A.as.J.impl.G.type = name_ref G, @A.as.J.impl.%A.as.J.impl.G.decl [concrete = constants.%A.as.J.impl.G] +// CHECK:STDOUT: %A.as.J.impl.G.call: init %empty_tuple.type = call %G.ref() // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @K.WithSelf(constants.%Self.44d) { -// CHECK:STDOUT: !definition: -// CHECK:STDOUT: %Self => constants.%Self.44d -// CHECK:STDOUT: %K.WithSelf.F.type => constants.%K.WithSelf.F.type.d74 -// CHECK:STDOUT: %K.WithSelf.F => constants.%K.WithSelf.F.f53 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: specific @K.WithSelf.F(constants.%Self.44d) { -// CHECK:STDOUT: %Self => constants.%Self.44d -// CHECK:STDOUT: %Self.as_type.loc8_14.1 => constants.%Self.as_type.6f5 -// CHECK:STDOUT: %pattern_type.loc8_12 => constants.%pattern_type.c8b -// CHECK:STDOUT: %K.lookup_impl_witness => constants.%K.lookup_impl_witness.a24 -// CHECK:STDOUT: %impl.elem0.loc8_23.1 => constants.%impl.elem0.c23 -// CHECK:STDOUT: %pattern_type.loc8_21 => constants.%pattern_type.9fa -// CHECK:STDOUT: %.loc8_29.1 => constants.%.c1a -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: specific @K.WithSelf(constants.%.Self) { -// CHECK:STDOUT: !definition: -// CHECK:STDOUT: %Self => constants.%.Self -// CHECK:STDOUT: %K.WithSelf.F.type => constants.%K.WithSelf.F.type.262 -// CHECK:STDOUT: %K.WithSelf.F => constants.%K.WithSelf.F.40c -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: specific @K.WithSelf(constants.%K.facet) { -// CHECK:STDOUT: !definition: -// CHECK:STDOUT: %Self => constants.%K.facet -// CHECK:STDOUT: %K.WithSelf.F.type => constants.%K.WithSelf.F.type.aac -// CHECK:STDOUT: %K.WithSelf.F => constants.%K.WithSelf.F.e22 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: specific @K.WithSelf.F(constants.%K.facet) { -// CHECK:STDOUT: %Self => constants.%K.facet -// CHECK:STDOUT: %Self.as_type.loc8_14.1 => constants.%empty_tuple.type -// CHECK:STDOUT: %pattern_type.loc8_12 => constants.%pattern_type.cb1 -// CHECK:STDOUT: %K.lookup_impl_witness => constants.%K.impl_witness -// CHECK:STDOUT: %impl.elem0.loc8_23.1 => constants.%struct_type.a -// CHECK:STDOUT: %pattern_type.loc8_21 => constants.%pattern_type.e85 -// CHECK:STDOUT: %.loc8_29.1 => constants.%.4f9 -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: --- use_non-type_in_function.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %M.type: type = facet_type <@M> [concrete] -// CHECK:STDOUT: %Self: %M.type = symbolic_binding Self, 0 [symbolic] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %empty_struct: %empty_struct_type = struct_value () [concrete] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] // CHECK:STDOUT: %struct_type.b.347: type = struct_type {.b: %empty_struct_type} [concrete] // CHECK:STDOUT: %M.assoc_type: type = assoc_entity_type @M [concrete] // CHECK:STDOUT: %assoc0: %M.assoc_type = assoc_entity element0, @M.WithSelf.%Z [concrete] -// CHECK:STDOUT: %.469: Core.Form = init_form %empty_struct_type [concrete] -// CHECK:STDOUT: %pattern_type: type = pattern_type %empty_struct_type [concrete] -// CHECK:STDOUT: %M.WithSelf.G.type.e2f: type = fn_type @M.WithSelf.G, @M.WithSelf(%Self) [symbolic] -// CHECK:STDOUT: %M.WithSelf.G.020: %M.WithSelf.G.type.e2f = struct_value () [symbolic] -// CHECK:STDOUT: %assoc1: %M.assoc_type = assoc_entity element1, @M.WithSelf.%M.WithSelf.G.decl [concrete] -// CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [concrete] -// CHECK:STDOUT: %.Self: %M.type = symbolic_binding .Self [symbolic_self] -// CHECK:STDOUT: %M.WithSelf.G.type.a84: type = fn_type @M.WithSelf.G, @M.WithSelf(%.Self) [symbolic_self] -// CHECK:STDOUT: %M.WithSelf.G.6c7: %M.WithSelf.G.type.a84 = struct_value () [symbolic_self] -// CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self [symbolic_self] -// CHECK:STDOUT: %M.lookup_impl_witness: = lookup_impl_witness %.Self, @M [symbolic_self] -// CHECK:STDOUT: %impl.elem0: %struct_type.b.347 = impl_witness_access %M.lookup_impl_witness, element0 [symbolic_self] // CHECK:STDOUT: %struct: %struct_type.b.347 = struct_value (%empty_struct) [concrete] -// CHECK:STDOUT: %M_where.type: type = facet_type <@M where %impl.elem0 = %struct> [concrete] // CHECK:STDOUT: %M.impl_witness: = impl_witness @empty_tuple.type.as.M.impl.%M.impl_witness_table [concrete] -// CHECK:STDOUT: %empty_tuple.type.as.M.impl.G.type: type = fn_type @empty_tuple.type.as.M.impl.G [concrete] -// CHECK:STDOUT: %empty_tuple.type.as.M.impl.G: %empty_tuple.type.as.M.impl.G.type = struct_value () [concrete] // CHECK:STDOUT: %M.facet: %M.type = facet_value %empty_tuple.type, (%M.impl_witness) [concrete] -// CHECK:STDOUT: %M.WithSelf.G.type.5a0: type = fn_type @M.WithSelf.G, @M.WithSelf(%M.facet) [concrete] -// CHECK:STDOUT: %M.WithSelf.G.986: %M.WithSelf.G.type.5a0 = struct_value () [concrete] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: imports { -// CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { -// CHECK:STDOUT: import Core//prelude -// CHECK:STDOUT: import Core//prelude/... -// CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: file { -// CHECK:STDOUT: package: = namespace [concrete] { -// CHECK:STDOUT: .Core = imports.%Core -// CHECK:STDOUT: .M = %M.decl -// CHECK:STDOUT: } -// CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %M.decl: type = interface_decl @M [concrete = constants.%M.type] {} {} -// CHECK:STDOUT: impl_decl @empty_tuple.type.as.M.impl [concrete] {} { -// CHECK:STDOUT: %.loc8_7.1: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple] -// CHECK:STDOUT: %.loc8_7.2: type = converted %.loc8_7.1, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] -// CHECK:STDOUT: %M.ref: type = name_ref M, file.%M.decl [concrete = constants.%M.type] -// CHECK:STDOUT: %.Self: %M.type = symbolic_binding .Self [symbolic_self = constants.%.Self] -// CHECK:STDOUT: %.Self.ref: %M.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self] -// CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref [symbolic_self = constants.%.Self.as_type] -// CHECK:STDOUT: %.loc8_20: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.as_type] -// CHECK:STDOUT: %Z.ref: %M.assoc_type = name_ref Z, @Z.%assoc0 [concrete = constants.%assoc0] -// CHECK:STDOUT: %impl.elem0: %struct_type.b.347 = impl_witness_access constants.%M.lookup_impl_witness, element0 [symbolic_self = constants.%impl.elem0] -// CHECK:STDOUT: %.loc8_32: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct] -// CHECK:STDOUT: %.loc8_33.1: %struct_type.b.347 = struct_literal (%.loc8_32) [concrete = constants.%struct] -// CHECK:STDOUT: %empty_struct: %empty_struct_type = struct_value () [concrete = constants.%empty_struct] -// CHECK:STDOUT: %.loc8_33.2: %empty_struct_type = converted %.loc8_32, %empty_struct [concrete = constants.%empty_struct] -// CHECK:STDOUT: %struct: %struct_type.b.347 = struct_value (%.loc8_33.2) [concrete = constants.%struct] -// CHECK:STDOUT: %.loc8_33.3: %struct_type.b.347 = converted %.loc8_33.1, %struct [concrete = constants.%struct] -// CHECK:STDOUT: %.loc8_14: type = where_expr [concrete = constants.%M_where.type] { -// CHECK:STDOUT: requirement_base_facet_type %M.ref -// CHECK:STDOUT: requirement_rewrite %impl.elem0, %.loc8_33.3 -// CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: interface @M { -// CHECK:STDOUT: %Self: %M.type = symbolic_binding Self, 0 [symbolic = constants.%Self] -// CHECK:STDOUT: %M.WithSelf.decl = interface_with_self_decl @M [concrete] -// CHECK:STDOUT: -// CHECK:STDOUT: !with Self: -// CHECK:STDOUT: %Z: %struct_type.b.347 = assoc_const_decl @Z [concrete] { -// CHECK:STDOUT: %assoc0: %M.assoc_type = assoc_entity element0, @M.WithSelf.%Z [concrete = constants.%assoc0] -// CHECK:STDOUT: } -// CHECK:STDOUT: %M.WithSelf.G.decl: @M.WithSelf.%M.WithSelf.G.type (%M.WithSelf.G.type.e2f) = fn_decl @M.WithSelf.G [symbolic = @M.WithSelf.%M.WithSelf.G (constants.%M.WithSelf.G.020)] { -// CHECK:STDOUT: %return.param_patt: %pattern_type = out_param_pattern [concrete] -// CHECK:STDOUT: %return.patt: %pattern_type = return_slot_pattern %return.param_patt, %.loc5_14.2 [concrete] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc5_14.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct] -// CHECK:STDOUT: %.loc5_14.2: type = converted %.loc5_14.1, constants.%empty_struct_type [concrete = constants.%empty_struct_type] -// CHECK:STDOUT: %.loc5_14.3: Core.Form = init_form %.loc5_14.2 [concrete = constants.%.469] -// CHECK:STDOUT: %return.param: ref %empty_struct_type = out_param call_param0 -// CHECK:STDOUT: %return: ref %empty_struct_type = return_slot %return.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %assoc1: %M.assoc_type = assoc_entity element1, %M.WithSelf.G.decl [concrete = constants.%assoc1] -// CHECK:STDOUT: -// CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = %Self -// CHECK:STDOUT: .Z = @Z.%assoc0 -// CHECK:STDOUT: .G = @M.WithSelf.%assoc1 -// CHECK:STDOUT: witness = (@M.WithSelf.%Z, @M.WithSelf.%M.WithSelf.G.decl) -// CHECK:STDOUT: -// CHECK:STDOUT: !requires: // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @empty_tuple.type.as.M.impl: %.loc8_7.2 as %.loc8_14 { -// CHECK:STDOUT: %empty_tuple.type.as.M.impl.G.decl: %empty_tuple.type.as.M.impl.G.type = fn_decl @empty_tuple.type.as.M.impl.G [concrete = constants.%empty_tuple.type.as.M.impl.G] { -// CHECK:STDOUT: %return.param_patt: %pattern_type = out_param_pattern [concrete] -// CHECK:STDOUT: %return.patt: %pattern_type = return_slot_pattern %return.param_patt, %.loc9_14.2 [concrete] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc9_14.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct] -// CHECK:STDOUT: %.loc9_14.2: type = converted %.loc9_14.1, constants.%empty_struct_type [concrete = constants.%empty_struct_type] -// CHECK:STDOUT: %.loc9_14.3: Core.Form = init_form %.loc9_14.2 [concrete = constants.%.469] -// CHECK:STDOUT: %return.param: ref %empty_struct_type = out_param call_param0 -// CHECK:STDOUT: %return: ref %empty_struct_type = return_slot %return.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %M.impl_witness_table = impl_witness_table (%impl_witness_assoc_constant, %empty_tuple.type.as.M.impl.G.decl), @empty_tuple.type.as.M.impl [concrete] -// CHECK:STDOUT: %M.impl_witness: = impl_witness %M.impl_witness_table [concrete = constants.%M.impl_witness] -// CHECK:STDOUT: %impl_witness_assoc_constant: %struct_type.b.347 = impl_witness_assoc_constant constants.%struct [concrete = constants.%struct] +// CHECK:STDOUT: +// CHECK:STDOUT: // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .G = %empty_tuple.type.as.M.impl.G.decl // CHECK:STDOUT: .M = +// CHECK:STDOUT: extend %.loc8_14 // CHECK:STDOUT: witness = %M.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @M.WithSelf.G(@M.%Self: %M.type) { -// CHECK:STDOUT: fn() -> out %return.param: %empty_struct_type; -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: fn @empty_tuple.type.as.M.impl.G() -> out %return.param: %empty_struct_type { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Self.ref: type = name_ref Self, @empty_tuple.type.as.M.impl.%.loc8_7.2 [concrete = constants.%empty_tuple.type] // CHECK:STDOUT: %M.ref: type = name_ref M, file.%M.decl [concrete = constants.%M.type] // CHECK:STDOUT: %M.facet: %M.type = facet_value %Self.ref, (constants.%M.impl_witness) [concrete = constants.%M.facet] -// CHECK:STDOUT: %.loc10_18: %M.type = converted %Self.ref, %M.facet [concrete = constants.%M.facet] -// CHECK:STDOUT: %as_type: type = facet_access_type %.loc10_18 [concrete = constants.%empty_tuple.type] -// CHECK:STDOUT: %.loc10_23: type = converted %.loc10_18, %as_type [concrete = constants.%empty_tuple.type] +// CHECK:STDOUT: %.loc11_18: %M.type = converted %Self.ref, %M.facet [concrete = constants.%M.facet] +// CHECK:STDOUT: %as_type: type = facet_access_type %.loc11_18 [concrete = constants.%empty_tuple.type] +// CHECK:STDOUT: %.loc11_23: type = converted %.loc11_18, %as_type [concrete = constants.%empty_tuple.type] // CHECK:STDOUT: %Z.ref: %M.assoc_type = name_ref Z, @Z.%assoc0 [concrete = constants.%assoc0] // CHECK:STDOUT: %impl.elem0: %struct_type.b.347 = impl_witness_access constants.%M.impl_witness, element0 [concrete = constants.%struct] -// CHECK:STDOUT: %.loc10_25.1: %empty_struct_type = struct_access %impl.elem0, element0 [concrete = constants.%empty_struct] -// CHECK:STDOUT: %.loc10_25.2: init %empty_struct_type = struct_init () [concrete = constants.%empty_struct] -// CHECK:STDOUT: %.loc10_27: init %empty_struct_type = converted %.loc10_25.1, %.loc10_25.2 [concrete = constants.%empty_struct] -// CHECK:STDOUT: return %.loc10_27 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: specific @M.WithSelf(constants.%Self) { -// CHECK:STDOUT: !definition: -// CHECK:STDOUT: %Self => constants.%Self -// CHECK:STDOUT: %M.WithSelf.G.type => constants.%M.WithSelf.G.type.e2f -// CHECK:STDOUT: %M.WithSelf.G => constants.%M.WithSelf.G.020 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: specific @M.WithSelf.G(constants.%Self) {} -// CHECK:STDOUT: -// CHECK:STDOUT: specific @M.WithSelf(constants.%.Self) { -// CHECK:STDOUT: !definition: -// CHECK:STDOUT: %Self => constants.%.Self -// CHECK:STDOUT: %M.WithSelf.G.type => constants.%M.WithSelf.G.type.a84 -// CHECK:STDOUT: %M.WithSelf.G => constants.%M.WithSelf.G.6c7 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: specific @M.WithSelf(constants.%M.facet) { -// CHECK:STDOUT: !definition: -// CHECK:STDOUT: %Self => constants.%M.facet -// CHECK:STDOUT: %M.WithSelf.G.type => constants.%M.WithSelf.G.type.5a0 -// CHECK:STDOUT: %M.WithSelf.G => constants.%M.WithSelf.G.986 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: specific @M.WithSelf.G(constants.%M.facet) {} -// CHECK:STDOUT: -// CHECK:STDOUT: --- self_as_uses_correct_rewrite_constraint.carbon -// CHECK:STDOUT: -// CHECK:STDOUT: constants { -// CHECK:STDOUT: %type: type = facet_type [concrete] -// CHECK:STDOUT: %.Self.c39: %type = symbolic_binding .Self [symbolic_self] -// CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete] -// CHECK:STDOUT: %T.67d: type = symbolic_binding T, 0 [symbolic] -// CHECK:STDOUT: %C.type: type = generic_class_type @C [concrete] -// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] -// CHECK:STDOUT: %C.generic: %C.type = struct_value () [concrete] -// CHECK:STDOUT: %C.5a3: type = class_type @C, @C(%T.67d) [symbolic] -// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] -// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete] -// CHECK:STDOUT: %M.type: type = facet_type <@M> [concrete] -// CHECK:STDOUT: %Self.0c7: %M.type = symbolic_binding Self, 0 [symbolic] -// CHECK:STDOUT: %struct_type.b.86f: type = struct_type {.b: type} [concrete] -// CHECK:STDOUT: %M.assoc_type: type = assoc_entity_type @M [concrete] -// CHECK:STDOUT: %assoc0.ed2: %M.assoc_type = assoc_entity element0, @M.WithSelf.%Z [concrete] -// CHECK:STDOUT: %.805: Core.Form = init_form type [concrete] -// CHECK:STDOUT: %M.WithSelf.G.type.e2f: type = fn_type @M.WithSelf.G, @M.WithSelf(%Self.0c7) [symbolic] -// CHECK:STDOUT: %M.WithSelf.G.020: %M.WithSelf.G.type.e2f = struct_value () [symbolic] -// CHECK:STDOUT: %assoc1: %M.assoc_type = assoc_entity element1, @M.WithSelf.%M.WithSelf.G.decl [concrete] -// CHECK:STDOUT: %empty_struct: %empty_struct_type = struct_value () [concrete] -// CHECK:STDOUT: %C.850: type = class_type @C, @C(%empty_struct_type) [concrete] -// CHECK:STDOUT: %.Self.b4d: %M.type = symbolic_binding .Self [symbolic_self] -// CHECK:STDOUT: %M.WithSelf.G.type.a84: type = fn_type @M.WithSelf.G, @M.WithSelf(%.Self.b4d) [symbolic_self] -// CHECK:STDOUT: %M.WithSelf.G.6c7: %M.WithSelf.G.type.a84 = struct_value () [symbolic_self] -// CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.b4d [symbolic_self] -// CHECK:STDOUT: %M.lookup_impl_witness: = lookup_impl_witness %.Self.b4d, @M [symbolic_self] -// CHECK:STDOUT: %impl.elem0.47b: %struct_type.b.86f = impl_witness_access %M.lookup_impl_witness, element0 [symbolic_self] -// CHECK:STDOUT: %struct_type.b.347: type = struct_type {.b: %empty_struct_type} [concrete] -// CHECK:STDOUT: %struct.692: %struct_type.b.347 = struct_value (%empty_struct) [concrete] -// CHECK:STDOUT: %struct_type.b.161: type = struct_type {.b: %empty_tuple.type} [concrete] -// CHECK:STDOUT: %struct.0f3: %struct_type.b.86f = struct_value (%empty_struct_type) [concrete] -// CHECK:STDOUT: %M_where.type.2ad: type = facet_type <@M where %impl.elem0.47b = %struct.0f3> [concrete] -// CHECK:STDOUT: %M.impl_witness.9de: = impl_witness @C.as.M.impl.20d.%M.impl_witness_table [concrete] -// CHECK:STDOUT: %C.as.M.impl.G.type.107: type = fn_type @C.as.M.impl.G.loc11 [concrete] -// CHECK:STDOUT: %C.as.M.impl.G.eb6: %C.as.M.impl.G.type.107 = struct_value () [concrete] -// CHECK:STDOUT: %M.facet.9e0: %M.type = facet_value %C.850, (%M.impl_witness.9de) [concrete] -// CHECK:STDOUT: %M.WithSelf.G.type.563: type = fn_type @M.WithSelf.G, @M.WithSelf(%M.facet.9e0) [concrete] -// CHECK:STDOUT: %M.WithSelf.G.897: %M.WithSelf.G.type.563 = struct_value () [concrete] -// CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete] -// CHECK:STDOUT: %Copy.impl_witness.037: = impl_witness imports.%Copy.impl_witness_table.794 [concrete] -// CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value type, (%Copy.impl_witness.037) [concrete] -// CHECK:STDOUT: %Copy.WithSelf.Op.type.994: type = fn_type @Copy.WithSelf.Op, @Copy.WithSelf(%Copy.facet) [concrete] -// CHECK:STDOUT: %.641: type = fn_type_with_self_type %Copy.WithSelf.Op.type.994, %Copy.facet [concrete] -// CHECK:STDOUT: %type.as.Copy.impl.Op.type: type = fn_type @type.as.Copy.impl.Op [concrete] -// CHECK:STDOUT: %type.as.Copy.impl.Op: %type.as.Copy.impl.Op.type = struct_value () [concrete] -// CHECK:STDOUT: %type.as.Copy.impl.Op.bound.a39: = bound_method %empty_struct_type, %type.as.Copy.impl.Op [concrete] -// CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [concrete] -// CHECK:STDOUT: %C.e8f: type = class_type @C, @C(%empty_tuple.type) [concrete] -// CHECK:STDOUT: %struct.63c: %struct_type.b.161 = struct_value (%empty_tuple) [concrete] -// CHECK:STDOUT: %struct.c94: %struct_type.b.86f = struct_value (%empty_tuple.type) [concrete] -// CHECK:STDOUT: %M_where.type.bf5: type = facet_type <@M where %impl.elem0.47b = %struct.c94> [concrete] -// CHECK:STDOUT: %M.impl_witness.a5c: = impl_witness @C.as.M.impl.243.%M.impl_witness_table [concrete] -// CHECK:STDOUT: %C.as.M.impl.G.type.52d: type = fn_type @C.as.M.impl.G.loc17 [concrete] -// CHECK:STDOUT: %C.as.M.impl.G.973: %C.as.M.impl.G.type.52d = struct_value () [concrete] -// CHECK:STDOUT: %M.facet.586: %M.type = facet_value %C.e8f, (%M.impl_witness.a5c) [concrete] -// CHECK:STDOUT: %M.WithSelf.G.type.5ab: type = fn_type @M.WithSelf.G, @M.WithSelf(%M.facet.586) [concrete] -// CHECK:STDOUT: %M.WithSelf.G.bdc: %M.WithSelf.G.type.5ab = struct_value () [concrete] -// CHECK:STDOUT: %type.as.Copy.impl.Op.bound.914: = bound_method %empty_tuple.type, %type.as.Copy.impl.Op [concrete] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: imports { -// CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { -// CHECK:STDOUT: .Copy = %Core.Copy -// CHECK:STDOUT: import Core//prelude -// CHECK:STDOUT: import Core//prelude/... -// CHECK:STDOUT: } -// CHECK:STDOUT: %Core.Copy: type = import_ref Core//prelude/parts/copy, Copy, loaded [concrete = constants.%Copy.type] -// CHECK:STDOUT: %Core.import_ref.87a: %type.as.Copy.impl.Op.type = import_ref Core//prelude/parts/copy, loc{{\d+_\d+}}, loaded [concrete = constants.%type.as.Copy.impl.Op] -// CHECK:STDOUT: %Copy.impl_witness_table.794 = impl_witness_table (%Core.import_ref.87a), @type.as.Copy.impl [concrete] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: file { -// CHECK:STDOUT: package: = namespace [concrete] { -// CHECK:STDOUT: .Core = imports.%Core -// CHECK:STDOUT: .C = %C.decl -// CHECK:STDOUT: .M = %M.decl -// CHECK:STDOUT: } -// CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %C.decl: %C.type = class_decl @C [concrete = constants.%C.generic] { -// CHECK:STDOUT: %T.patt: %pattern_type.98f = symbolic_binding_pattern T, 0 [concrete] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc3_13.1: type = splice_block %.loc3_13.2 [concrete = type] { -// CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.c39] -// CHECK:STDOUT: %.loc3_13.2: type = type_literal type [concrete = type] -// CHECK:STDOUT: } -// CHECK:STDOUT: %T.loc3_10.2: type = symbolic_binding T, 0 [symbolic = %T.loc3_10.1 (constants.%T.67d)] -// CHECK:STDOUT: } -// CHECK:STDOUT: %M.decl: type = interface_decl @M [concrete = constants.%M.type] {} {} -// CHECK:STDOUT: impl_decl @C.as.M.impl.20d [concrete] {} { -// CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [concrete = constants.%C.generic] -// CHECK:STDOUT: %.loc10_9: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct] -// CHECK:STDOUT: %.loc10_10: type = converted %.loc10_9, constants.%empty_struct_type [concrete = constants.%empty_struct_type] -// CHECK:STDOUT: %C: type = class_type @C, @C(constants.%empty_struct_type) [concrete = constants.%C.850] -// CHECK:STDOUT: %M.ref: type = name_ref M, file.%M.decl [concrete = constants.%M.type] -// CHECK:STDOUT: %.Self: %M.type = symbolic_binding .Self [symbolic_self = constants.%.Self.b4d] -// CHECK:STDOUT: %.Self.ref: %M.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self.b4d] -// CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref [symbolic_self = constants.%.Self.as_type] -// CHECK:STDOUT: %.loc10_23: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.as_type] -// CHECK:STDOUT: %Z.ref: %M.assoc_type = name_ref Z, @Z.%assoc0 [concrete = constants.%assoc0.ed2] -// CHECK:STDOUT: %impl.elem0: %struct_type.b.86f = impl_witness_access constants.%M.lookup_impl_witness, element0 [symbolic_self = constants.%impl.elem0.47b] -// CHECK:STDOUT: %.loc10_35: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct] -// CHECK:STDOUT: %.loc10_36.1: %struct_type.b.347 = struct_literal (%.loc10_35) [concrete = constants.%struct.692] -// CHECK:STDOUT: %.loc10_36.2: type = converted %.loc10_35, constants.%empty_struct_type [concrete = constants.%empty_struct_type] -// CHECK:STDOUT: %struct: %struct_type.b.86f = struct_value (%.loc10_36.2) [concrete = constants.%struct.0f3] -// CHECK:STDOUT: %.loc10_36.3: %struct_type.b.86f = converted %.loc10_36.1, %struct [concrete = constants.%struct.0f3] -// CHECK:STDOUT: %.loc10_17: type = where_expr [concrete = constants.%M_where.type.2ad] { -// CHECK:STDOUT: requirement_base_facet_type %M.ref -// CHECK:STDOUT: requirement_rewrite %impl.elem0, %.loc10_36.3 -// CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: impl_decl @C.as.M.impl.243 [concrete] {} { -// CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [concrete = constants.%C.generic] -// CHECK:STDOUT: %.loc16_9: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple] -// CHECK:STDOUT: %.loc16_10: type = converted %.loc16_9, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] -// CHECK:STDOUT: %C: type = class_type @C, @C(constants.%empty_tuple.type) [concrete = constants.%C.e8f] -// CHECK:STDOUT: %M.ref: type = name_ref M, file.%M.decl [concrete = constants.%M.type] -// CHECK:STDOUT: %.Self: %M.type = symbolic_binding .Self [symbolic_self = constants.%.Self.b4d] -// CHECK:STDOUT: %.Self.ref: %M.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self.b4d] -// CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref [symbolic_self = constants.%.Self.as_type] -// CHECK:STDOUT: %.loc16_23: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.as_type] -// CHECK:STDOUT: %Z.ref: %M.assoc_type = name_ref Z, @Z.%assoc0 [concrete = constants.%assoc0.ed2] -// CHECK:STDOUT: %impl.elem0: %struct_type.b.86f = impl_witness_access constants.%M.lookup_impl_witness, element0 [symbolic_self = constants.%impl.elem0.47b] -// CHECK:STDOUT: %.loc16_35: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple] -// CHECK:STDOUT: %.loc16_36.1: %struct_type.b.161 = struct_literal (%.loc16_35) [concrete = constants.%struct.63c] -// CHECK:STDOUT: %.loc16_36.2: type = converted %.loc16_35, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] -// CHECK:STDOUT: %struct: %struct_type.b.86f = struct_value (%.loc16_36.2) [concrete = constants.%struct.c94] -// CHECK:STDOUT: %.loc16_36.3: %struct_type.b.86f = converted %.loc16_36.1, %struct [concrete = constants.%struct.c94] -// CHECK:STDOUT: %.loc16_17: type = where_expr [concrete = constants.%M_where.type.bf5] { -// CHECK:STDOUT: requirement_base_facet_type %M.ref -// CHECK:STDOUT: requirement_rewrite %impl.elem0, %.loc16_36.3 -// CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: interface @M { -// CHECK:STDOUT: %Self: %M.type = symbolic_binding Self, 0 [symbolic = constants.%Self.0c7] -// CHECK:STDOUT: %M.WithSelf.decl = interface_with_self_decl @M [concrete] -// CHECK:STDOUT: -// CHECK:STDOUT: !with Self: -// CHECK:STDOUT: %Z: %struct_type.b.86f = assoc_const_decl @Z [concrete] { -// CHECK:STDOUT: %assoc0: %M.assoc_type = assoc_entity element0, @M.WithSelf.%Z [concrete = constants.%assoc0.ed2] -// CHECK:STDOUT: } -// CHECK:STDOUT: %M.WithSelf.G.decl: @M.WithSelf.%M.WithSelf.G.type (%M.WithSelf.G.type.e2f) = fn_decl @M.WithSelf.G [symbolic = @M.WithSelf.%M.WithSelf.G (constants.%M.WithSelf.G.020)] { -// CHECK:STDOUT: %return.param_patt: %pattern_type.98f = out_param_pattern [concrete] -// CHECK:STDOUT: %return.patt: %pattern_type.98f = return_slot_pattern %return.param_patt, %.loc7_13.1 [concrete] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc7_13.1: type = type_literal type [concrete = type] -// CHECK:STDOUT: %.loc7_13.2: Core.Form = init_form %.loc7_13.1 [concrete = constants.%.805] -// CHECK:STDOUT: %return.param: ref type = out_param call_param0 -// CHECK:STDOUT: %return: ref type = return_slot %return.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %assoc1: %M.assoc_type = assoc_entity element1, %M.WithSelf.G.decl [concrete = constants.%assoc1] -// CHECK:STDOUT: -// CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = %Self -// CHECK:STDOUT: .Z = @Z.%assoc0 -// CHECK:STDOUT: .G = @M.WithSelf.%assoc1 -// CHECK:STDOUT: witness = (@M.WithSelf.%Z, @M.WithSelf.%M.WithSelf.G.decl) -// CHECK:STDOUT: -// CHECK:STDOUT: !requires: -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: impl @C.as.M.impl.20d: %C as %.loc10_17 { -// CHECK:STDOUT: %C.as.M.impl.G.decl: %C.as.M.impl.G.type.107 = fn_decl @C.as.M.impl.G.loc11 [concrete = constants.%C.as.M.impl.G.eb6] { -// CHECK:STDOUT: %return.param_patt: %pattern_type.98f = out_param_pattern [concrete] -// CHECK:STDOUT: %return.patt: %pattern_type.98f = return_slot_pattern %return.param_patt, %.loc11_13.1 [concrete] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc11_13.1: type = type_literal type [concrete = type] -// CHECK:STDOUT: %.loc11_13.2: Core.Form = init_form %.loc11_13.1 [concrete = constants.%.805] -// CHECK:STDOUT: %return.param: ref type = out_param call_param0 -// CHECK:STDOUT: %return: ref type = return_slot %return.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %M.impl_witness_table = impl_witness_table (%impl_witness_assoc_constant, %C.as.M.impl.G.decl), @C.as.M.impl.20d [concrete] -// CHECK:STDOUT: %M.impl_witness: = impl_witness %M.impl_witness_table [concrete = constants.%M.impl_witness.9de] -// CHECK:STDOUT: %impl_witness_assoc_constant: %struct_type.b.86f = impl_witness_assoc_constant constants.%struct.0f3 [concrete = constants.%struct.0f3] -// CHECK:STDOUT: -// CHECK:STDOUT: !members: -// CHECK:STDOUT: .G = %C.as.M.impl.G.decl -// CHECK:STDOUT: .M = -// CHECK:STDOUT: witness = %M.impl_witness -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: impl @C.as.M.impl.243: %C as %.loc16_17 { -// CHECK:STDOUT: %C.as.M.impl.G.decl: %C.as.M.impl.G.type.52d = fn_decl @C.as.M.impl.G.loc17 [concrete = constants.%C.as.M.impl.G.973] { -// CHECK:STDOUT: %return.param_patt: %pattern_type.98f = out_param_pattern [concrete] -// CHECK:STDOUT: %return.patt: %pattern_type.98f = return_slot_pattern %return.param_patt, %.loc17_13.1 [concrete] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc17_13.1: type = type_literal type [concrete = type] -// CHECK:STDOUT: %.loc17_13.2: Core.Form = init_form %.loc17_13.1 [concrete = constants.%.805] -// CHECK:STDOUT: %return.param: ref type = out_param call_param0 -// CHECK:STDOUT: %return: ref type = return_slot %return.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %M.impl_witness_table = impl_witness_table (%impl_witness_assoc_constant, %C.as.M.impl.G.decl), @C.as.M.impl.243 [concrete] -// CHECK:STDOUT: %M.impl_witness: = impl_witness %M.impl_witness_table [concrete = constants.%M.impl_witness.a5c] -// CHECK:STDOUT: %impl_witness_assoc_constant: %struct_type.b.86f = impl_witness_assoc_constant constants.%struct.c94 [concrete = constants.%struct.c94] -// CHECK:STDOUT: -// CHECK:STDOUT: !members: -// CHECK:STDOUT: .G = %C.as.M.impl.G.decl -// CHECK:STDOUT: .M = -// CHECK:STDOUT: witness = %M.impl_witness -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generic class @C(%T.loc3_10.2: type) { -// CHECK:STDOUT: %T.loc3_10.1: type = symbolic_binding T, 0 [symbolic = %T.loc3_10.1 (constants.%T.67d)] -// CHECK:STDOUT: -// CHECK:STDOUT: !definition: -// CHECK:STDOUT: -// CHECK:STDOUT: class { -// CHECK:STDOUT: %complete_type: = complete_type_witness constants.%empty_struct_type [concrete = constants.%complete_type] -// CHECK:STDOUT: complete_type_witness = %complete_type -// CHECK:STDOUT: -// CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = constants.%C.5a3 -// CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generic fn @M.WithSelf.G(@M.%Self: %M.type) { -// CHECK:STDOUT: fn() -> out %return.param: type; -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @C.as.M.impl.G.loc11() -> out %return.param: type { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Self.ref: type = name_ref Self, @C.as.M.impl.20d.%C [concrete = constants.%C.850] -// CHECK:STDOUT: %M.ref: type = name_ref M, file.%M.decl [concrete = constants.%M.type] -// CHECK:STDOUT: %M.facet: %M.type = facet_value %Self.ref, (constants.%M.impl_witness.9de) [concrete = constants.%M.facet.9e0] -// CHECK:STDOUT: %.loc12_18: %M.type = converted %Self.ref, %M.facet [concrete = constants.%M.facet.9e0] -// CHECK:STDOUT: %as_type: type = facet_access_type %.loc12_18 [concrete = constants.%C.850] -// CHECK:STDOUT: %.loc12_23: type = converted %.loc12_18, %as_type [concrete = constants.%C.850] -// CHECK:STDOUT: %Z.ref: %M.assoc_type = name_ref Z, @Z.%assoc0 [concrete = constants.%assoc0.ed2] -// CHECK:STDOUT: %impl.elem0.loc12_23: %struct_type.b.86f = impl_witness_access constants.%M.impl_witness.9de, element0 [concrete = constants.%struct.0f3] -// CHECK:STDOUT: %.loc12_25: type = struct_access %impl.elem0.loc12_23, element0 [concrete = constants.%empty_struct_type] -// CHECK:STDOUT: %impl.elem0.loc12_25: %.641 = impl_witness_access constants.%Copy.impl_witness.037, element0 [concrete = constants.%type.as.Copy.impl.Op] -// CHECK:STDOUT: %bound_method: = bound_method %.loc12_25, %impl.elem0.loc12_25 [concrete = constants.%type.as.Copy.impl.Op.bound.a39] -// CHECK:STDOUT: %type.as.Copy.impl.Op.call: init type = call %bound_method(%.loc12_25) [concrete = constants.%empty_struct_type] -// CHECK:STDOUT: return %type.as.Copy.impl.Op.call -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @C.as.M.impl.G.loc17() -> out %return.param: type { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Self.ref: type = name_ref Self, @C.as.M.impl.243.%C [concrete = constants.%C.e8f] -// CHECK:STDOUT: %M.ref: type = name_ref M, file.%M.decl [concrete = constants.%M.type] -// CHECK:STDOUT: %M.facet: %M.type = facet_value %Self.ref, (constants.%M.impl_witness.a5c) [concrete = constants.%M.facet.586] -// CHECK:STDOUT: %.loc18_18: %M.type = converted %Self.ref, %M.facet [concrete = constants.%M.facet.586] -// CHECK:STDOUT: %as_type: type = facet_access_type %.loc18_18 [concrete = constants.%C.e8f] -// CHECK:STDOUT: %.loc18_23: type = converted %.loc18_18, %as_type [concrete = constants.%C.e8f] -// CHECK:STDOUT: %Z.ref: %M.assoc_type = name_ref Z, @Z.%assoc0 [concrete = constants.%assoc0.ed2] -// CHECK:STDOUT: %impl.elem0.loc18_23: %struct_type.b.86f = impl_witness_access constants.%M.impl_witness.a5c, element0 [concrete = constants.%struct.c94] -// CHECK:STDOUT: %.loc18_25: type = struct_access %impl.elem0.loc18_23, element0 [concrete = constants.%empty_tuple.type] -// CHECK:STDOUT: %impl.elem0.loc18_25: %.641 = impl_witness_access constants.%Copy.impl_witness.037, element0 [concrete = constants.%type.as.Copy.impl.Op] -// CHECK:STDOUT: %bound_method: = bound_method %.loc18_25, %impl.elem0.loc18_25 [concrete = constants.%type.as.Copy.impl.Op.bound.914] -// CHECK:STDOUT: %type.as.Copy.impl.Op.call: init type = call %bound_method(%.loc18_25) [concrete = constants.%empty_tuple.type] -// CHECK:STDOUT: return %type.as.Copy.impl.Op.call -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: specific @C(constants.%T.67d) { -// CHECK:STDOUT: %T.loc3_10.1 => constants.%T.67d -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: specific @M.WithSelf(constants.%Self.0c7) { -// CHECK:STDOUT: !definition: -// CHECK:STDOUT: %Self => constants.%Self.0c7 -// CHECK:STDOUT: %M.WithSelf.G.type => constants.%M.WithSelf.G.type.e2f -// CHECK:STDOUT: %M.WithSelf.G => constants.%M.WithSelf.G.020 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: specific @M.WithSelf.G(constants.%Self.0c7) {} -// CHECK:STDOUT: -// CHECK:STDOUT: specific @C(constants.%empty_struct_type) { -// CHECK:STDOUT: %T.loc3_10.1 => constants.%empty_struct_type -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: specific @M.WithSelf(constants.%.Self.b4d) { -// CHECK:STDOUT: !definition: -// CHECK:STDOUT: %Self => constants.%.Self.b4d -// CHECK:STDOUT: %M.WithSelf.G.type => constants.%M.WithSelf.G.type.a84 -// CHECK:STDOUT: %M.WithSelf.G => constants.%M.WithSelf.G.6c7 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: specific @M.WithSelf(constants.%M.facet.9e0) { -// CHECK:STDOUT: !definition: -// CHECK:STDOUT: %Self => constants.%M.facet.9e0 -// CHECK:STDOUT: %M.WithSelf.G.type => constants.%M.WithSelf.G.type.563 -// CHECK:STDOUT: %M.WithSelf.G => constants.%M.WithSelf.G.897 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: specific @M.WithSelf.G(constants.%M.facet.9e0) {} -// CHECK:STDOUT: -// CHECK:STDOUT: specific @C(constants.%empty_tuple.type) { -// CHECK:STDOUT: %T.loc3_10.1 => constants.%empty_tuple.type -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: specific @M.WithSelf(constants.%M.facet.586) { -// CHECK:STDOUT: !definition: -// CHECK:STDOUT: %Self => constants.%M.facet.586 -// CHECK:STDOUT: %M.WithSelf.G.type => constants.%M.WithSelf.G.type.5ab -// CHECK:STDOUT: %M.WithSelf.G => constants.%M.WithSelf.G.bdc -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: specific @M.WithSelf.G(constants.%M.facet.586) {} -// CHECK:STDOUT: -// CHECK:STDOUT: --- associated_int_in_array.carbon -// CHECK:STDOUT: -// CHECK:STDOUT: constants { -// CHECK:STDOUT: %I.type: type = facet_type <@I> [concrete] -// CHECK:STDOUT: %Self.ab9: %I.type = symbolic_binding Self, 0 [symbolic] -// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete] -// CHECK:STDOUT: %Int.type: type = generic_class_type @Int [concrete] -// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] -// CHECK:STDOUT: %Int.generic: %Int.type = struct_value () [concrete] -// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete] -// CHECK:STDOUT: %I.assoc_type: type = assoc_entity_type @I [concrete] -// CHECK:STDOUT: %assoc0.d72: %I.assoc_type = assoc_entity element0, @I.WithSelf.%N [concrete] -// CHECK:STDOUT: %Self.as_type.a26: type = facet_access_type %Self.ab9 [symbolic] -// CHECK:STDOUT: %pattern_type.965: type = pattern_type %Self.as_type.a26 [symbolic] -// CHECK:STDOUT: %Bool.type: type = fn_type @Bool [concrete] -// CHECK:STDOUT: %Bool: %Bool.type = struct_value () [concrete] -// CHECK:STDOUT: %I.lookup_impl_witness.3ae: = lookup_impl_witness %Self.ab9, @I [symbolic] -// CHECK:STDOUT: %impl.elem0.f83: %i32 = impl_witness_access %I.lookup_impl_witness.3ae, element0 [symbolic] -// CHECK:STDOUT: %ImplicitAs.type.cc7: type = generic_interface_type @ImplicitAs [concrete] -// CHECK:STDOUT: %ImplicitAs.generic: %ImplicitAs.type.cc7 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.type.139: type = facet_type <@ImplicitAs, @ImplicitAs(Core.IntLiteral)> [concrete] -// CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic] -// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.f67: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%To) [symbolic] -// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.8fd: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.f67 = struct_value () [symbolic] -// CHECK:STDOUT: %From: Core.IntLiteral = symbolic_binding From, 0 [symbolic] -// CHECK:STDOUT: %Int.as.ImplicitAs.impl.Convert.type.7d6: type = fn_type @Int.as.ImplicitAs.impl.Convert, @Int.as.ImplicitAs.impl(%From) [symbolic] -// CHECK:STDOUT: %Int.as.ImplicitAs.impl.Convert.81b: %Int.as.ImplicitAs.impl.Convert.type.7d6 = struct_value () [symbolic] -// CHECK:STDOUT: %ImplicitAs.impl_witness.176: = impl_witness imports.%ImplicitAs.impl_witness_table.577, @Int.as.ImplicitAs.impl(%int_32) [concrete] -// CHECK:STDOUT: %Int.as.ImplicitAs.impl.Convert.type.c8f: type = fn_type @Int.as.ImplicitAs.impl.Convert, @Int.as.ImplicitAs.impl(%int_32) [concrete] -// CHECK:STDOUT: %Int.as.ImplicitAs.impl.Convert.741: %Int.as.ImplicitAs.impl.Convert.type.c8f = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet.e7a: %ImplicitAs.type.139 = facet_value %i32, (%ImplicitAs.impl_witness.176) [concrete] -// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.00f: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs.WithSelf(Core.IntLiteral, %ImplicitAs.facet.e7a) [concrete] -// CHECK:STDOUT: %.42f: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.00f, %ImplicitAs.facet.e7a [concrete] -// CHECK:STDOUT: %Int.as.ImplicitAs.impl.Convert.bound.363: = bound_method %impl.elem0.f83, %Int.as.ImplicitAs.impl.Convert.741 [symbolic] -// CHECK:STDOUT: %Int.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Int.as.ImplicitAs.impl.Convert.741, @Int.as.ImplicitAs.impl.Convert(%int_32) [concrete] -// CHECK:STDOUT: %bound_method.a64: = bound_method %impl.elem0.f83, %Int.as.ImplicitAs.impl.Convert.specific_fn [symbolic] -// CHECK:STDOUT: %Int.as.ImplicitAs.impl.Convert.call: init Core.IntLiteral = call %bound_method.a64(%impl.elem0.f83) [symbolic] -// CHECK:STDOUT: %array_type.939: type = array_type %Int.as.ImplicitAs.impl.Convert.call, bool [symbolic] -// CHECK:STDOUT: %.3fd: Core.Form = init_form %array_type.939 [symbolic] -// CHECK:STDOUT: %pattern_type.7ed: type = pattern_type %array_type.939 [symbolic] -// CHECK:STDOUT: %I.WithSelf.F.type.08c: type = fn_type @I.WithSelf.F, @I.WithSelf(%Self.ab9) [symbolic] -// CHECK:STDOUT: %I.WithSelf.F.705: %I.WithSelf.F.type.08c = struct_value () [symbolic] -// CHECK:STDOUT: %assoc1: %I.assoc_type = assoc_entity element1, @I.WithSelf.%I.WithSelf.F.decl [concrete] -// CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [concrete] -// CHECK:STDOUT: %.Self: %I.type = symbolic_binding .Self [symbolic_self] -// CHECK:STDOUT: %I.WithSelf.F.type.29d: type = fn_type @I.WithSelf.F, @I.WithSelf(%.Self) [symbolic_self] -// CHECK:STDOUT: %I.WithSelf.F.8ec: %I.WithSelf.F.type.29d = struct_value () [symbolic_self] -// CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self [symbolic_self] -// CHECK:STDOUT: %I.lookup_impl_witness.c4b: = lookup_impl_witness %.Self, @I [symbolic_self] -// CHECK:STDOUT: %impl.elem0.667: %i32 = impl_witness_access %I.lookup_impl_witness.c4b, element0 [symbolic_self] -// CHECK:STDOUT: %int_2.ecc: Core.IntLiteral = int_value 2 [concrete] -// CHECK:STDOUT: %ImplicitAs.type.e8c: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] -// CHECK:STDOUT: %ImplicitAs.impl_witness.ac5: = impl_witness imports.%ImplicitAs.impl_witness_table.82d, @Core.IntLiteral.as.ImplicitAs.impl(%int_32) [concrete] -// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.a56: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%int_32) [concrete] -// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.f1a: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.a56 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet.614: %ImplicitAs.type.e8c = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.ac5) [concrete] -// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.b91: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs.WithSelf(%i32, %ImplicitAs.facet.614) [concrete] -// CHECK:STDOUT: %.9db: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.b91, %ImplicitAs.facet.614 [concrete] -// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound: = bound_method %int_2.ecc, %Core.IntLiteral.as.ImplicitAs.impl.Convert.f1a [concrete] -// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.f1a, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete] -// CHECK:STDOUT: %bound_method.419: = bound_method %int_2.ecc, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] -// CHECK:STDOUT: %int_2.ef8: %i32 = int_value 2 [concrete] -// CHECK:STDOUT: %I_where.type: type = facet_type <@I where %impl.elem0.667 = %int_2.ef8> [concrete] -// CHECK:STDOUT: %I.impl_witness: = impl_witness @empty_tuple.type.as.I.impl.%I.impl_witness_table [concrete] -// CHECK:STDOUT: %pattern_type.cb1: type = pattern_type %empty_tuple.type [concrete] -// CHECK:STDOUT: %array_type.c9b: type = array_type %int_2.ecc, bool [concrete] -// CHECK:STDOUT: %.8b3: Core.Form = init_form %array_type.c9b [concrete] -// CHECK:STDOUT: %pattern_type.5d5: type = pattern_type %array_type.c9b [concrete] -// CHECK:STDOUT: %empty_tuple.type.as.I.impl.F.type: type = fn_type @empty_tuple.type.as.I.impl.F [concrete] -// CHECK:STDOUT: %empty_tuple.type.as.I.impl.F: %empty_tuple.type.as.I.impl.F.type = struct_value () [concrete] -// CHECK:STDOUT: %I.facet: %I.type = facet_value %empty_tuple.type, (%I.impl_witness) [concrete] -// CHECK:STDOUT: %I.WithSelf.F.type.7ea: type = fn_type @I.WithSelf.F, @I.WithSelf(%I.facet) [concrete] -// CHECK:STDOUT: %I.WithSelf.F.755: %I.WithSelf.F.type.7ea = struct_value () [concrete] -// CHECK:STDOUT: %Int.as.ImplicitAs.impl.Convert.bound.c19: = bound_method %int_2.ef8, %Int.as.ImplicitAs.impl.Convert.741 [concrete] -// CHECK:STDOUT: %bound_method.868: = bound_method %int_2.ef8, %Int.as.ImplicitAs.impl.Convert.specific_fn [concrete] -// CHECK:STDOUT: %true: bool = bool_literal true [concrete] -// CHECK:STDOUT: %false: bool = bool_literal false [concrete] -// CHECK:STDOUT: %tuple.type.784: type = tuple_type (bool, bool) [concrete] -// CHECK:STDOUT: %tuple.a9a: %tuple.type.784 = tuple_value (%true, %false) [concrete] -// CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete] -// CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete] -// CHECK:STDOUT: %Copy.impl_witness.c24: = impl_witness imports.%Copy.impl_witness_table.a3d [concrete] -// CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value bool, (%Copy.impl_witness.c24) [concrete] -// CHECK:STDOUT: %Copy.WithSelf.Op.type.86e: type = fn_type @Copy.WithSelf.Op, @Copy.WithSelf(%Copy.facet) [concrete] -// CHECK:STDOUT: %.7f0: type = fn_type_with_self_type %Copy.WithSelf.Op.type.86e, %Copy.facet [concrete] -// CHECK:STDOUT: %bool.as.Copy.impl.Op.type: type = fn_type @bool.as.Copy.impl.Op [concrete] -// CHECK:STDOUT: %bool.as.Copy.impl.Op: %bool.as.Copy.impl.Op.type = struct_value () [concrete] -// CHECK:STDOUT: %bool.as.Copy.impl.Op.bound.9e2: = bound_method %true, %bool.as.Copy.impl.Op [concrete] -// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete] -// CHECK:STDOUT: %bool.as.Copy.impl.Op.bound.240: = bound_method %false, %bool.as.Copy.impl.Op [concrete] -// CHECK:STDOUT: %array: %array_type.c9b = tuple_value (%true, %false) [concrete] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: imports { -// CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { -// CHECK:STDOUT: .Int = %Core.Int -// CHECK:STDOUT: .Bool = %Core.Bool -// CHECK:STDOUT: .ImplicitAs = %Core.ImplicitAs -// CHECK:STDOUT: .Copy = %Core.Copy -// CHECK:STDOUT: import Core//prelude -// CHECK:STDOUT: import Core//prelude/... -// CHECK:STDOUT: } -// CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/parts/int, Int, loaded [concrete = constants.%Int.generic] -// CHECK:STDOUT: %Core.Bool: %Bool.type = import_ref Core//prelude/parts/bool, Bool, loaded [concrete = constants.%Bool] -// CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.cc7 = import_ref Core//prelude/parts/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic] -// CHECK:STDOUT: %Core.import_ref.70a: @Core.IntLiteral.as.ImplicitAs.impl.%Core.IntLiteral.as.ImplicitAs.impl.Convert.type (%Core.IntLiteral.as.ImplicitAs.impl.Convert.type.f67) = import_ref Core//prelude/parts/int, loc{{\d+_\d+}}, loaded [symbolic = @Core.IntLiteral.as.ImplicitAs.impl.%Core.IntLiteral.as.ImplicitAs.impl.Convert (constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.8fd)] -// CHECK:STDOUT: %ImplicitAs.impl_witness_table.82d = impl_witness_table (%Core.import_ref.70a), @Core.IntLiteral.as.ImplicitAs.impl [concrete] -// CHECK:STDOUT: %Core.import_ref.e0f: @Int.as.ImplicitAs.impl.%Int.as.ImplicitAs.impl.Convert.type (%Int.as.ImplicitAs.impl.Convert.type.7d6) = import_ref Core//prelude/parts/int, loc{{\d+_\d+}}, loaded [symbolic = @Int.as.ImplicitAs.impl.%Int.as.ImplicitAs.impl.Convert (constants.%Int.as.ImplicitAs.impl.Convert.81b)] -// CHECK:STDOUT: %ImplicitAs.impl_witness_table.577 = impl_witness_table (%Core.import_ref.e0f), @Int.as.ImplicitAs.impl [concrete] -// CHECK:STDOUT: %Core.Copy: type = import_ref Core//prelude/parts/copy, Copy, loaded [concrete = constants.%Copy.type] -// CHECK:STDOUT: %Core.import_ref.53b: %bool.as.Copy.impl.Op.type = import_ref Core//prelude/parts/copy, loc{{\d+_\d+}}, loaded [concrete = constants.%bool.as.Copy.impl.Op] -// CHECK:STDOUT: %Copy.impl_witness_table.a3d = impl_witness_table (%Core.import_ref.53b), @bool.as.Copy.impl [concrete] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: file { -// CHECK:STDOUT: package: = namespace [concrete] { -// CHECK:STDOUT: .Core = imports.%Core -// CHECK:STDOUT: .I = %I.decl -// CHECK:STDOUT: } -// CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %I.decl: type = interface_decl @I [concrete = constants.%I.type] {} {} -// CHECK:STDOUT: impl_decl @empty_tuple.type.as.I.impl [concrete] {} { -// CHECK:STDOUT: %.loc8_7.1: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple] -// CHECK:STDOUT: %.loc8_7.2: type = converted %.loc8_7.1, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] -// CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [concrete = constants.%I.type] -// CHECK:STDOUT: %.Self: %I.type = symbolic_binding .Self [symbolic_self = constants.%.Self] -// CHECK:STDOUT: %.Self.ref: %I.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self] -// CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref [symbolic_self = constants.%.Self.as_type] -// CHECK:STDOUT: %.loc8_20: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.as_type] -// CHECK:STDOUT: %N.ref: %I.assoc_type = name_ref N, @N.%assoc0 [concrete = constants.%assoc0.d72] -// CHECK:STDOUT: %impl.elem0.loc8_20: %i32 = impl_witness_access constants.%I.lookup_impl_witness.c4b, element0 [symbolic_self = constants.%impl.elem0.667] -// CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc] -// CHECK:STDOUT: %impl.elem0.loc8_25: %.9db = impl_witness_access constants.%ImplicitAs.impl_witness.ac5, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.f1a] -// CHECK:STDOUT: %bound_method.loc8_25.1: = bound_method %int_2, %impl.elem0.loc8_25 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound] -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0.loc8_25, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] -// CHECK:STDOUT: %bound_method.loc8_25.2: = bound_method %int_2, %specific_fn [concrete = constants.%bound_method.419] -// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call: init %i32 = call %bound_method.loc8_25.2(%int_2) [concrete = constants.%int_2.ef8] -// CHECK:STDOUT: %.loc8_25.1: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call [concrete = constants.%int_2.ef8] -// CHECK:STDOUT: %.loc8_25.2: %i32 = converted %int_2, %.loc8_25.1 [concrete = constants.%int_2.ef8] -// CHECK:STDOUT: %.loc8_14: type = where_expr [concrete = constants.%I_where.type] { -// CHECK:STDOUT: requirement_base_facet_type %I.ref -// CHECK:STDOUT: requirement_rewrite %impl.elem0.loc8_20, %.loc8_25.2 -// CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: interface @I { -// CHECK:STDOUT: %Self: %I.type = symbolic_binding Self, 0 [symbolic = constants.%Self.ab9] -// CHECK:STDOUT: %I.WithSelf.decl = interface_with_self_decl @I [concrete] -// CHECK:STDOUT: -// CHECK:STDOUT: !with Self: -// CHECK:STDOUT: %N: %i32 = assoc_const_decl @N [concrete] { -// CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, @I.WithSelf.%N [concrete = constants.%assoc0.d72] -// CHECK:STDOUT: } -// CHECK:STDOUT: %I.WithSelf.F.decl: @I.WithSelf.%I.WithSelf.F.type (%I.WithSelf.F.type.08c) = fn_decl @I.WithSelf.F [symbolic = @I.WithSelf.%I.WithSelf.F (constants.%I.WithSelf.F.705)] { -// CHECK:STDOUT: %self.param_patt: @I.WithSelf.F.%pattern_type.loc5_12 (%pattern_type.965) = value_param_pattern [concrete] -// CHECK:STDOUT: %self.patt: @I.WithSelf.F.%pattern_type.loc5_12 (%pattern_type.965) = at_binding_pattern self, %self.param_patt [concrete] -// CHECK:STDOUT: %return.param_patt: @I.WithSelf.F.%pattern_type.loc5_38 (%pattern_type.7ed) = out_param_pattern [concrete] -// CHECK:STDOUT: %return.patt: @I.WithSelf.F.%pattern_type.loc5_38 (%pattern_type.7ed) = return_slot_pattern %return.param_patt, %array_type.loc5_38.2 [concrete] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc5_31: type = type_literal bool [concrete = bool] -// CHECK:STDOUT: %impl.elem0.loc5_37.2: %i32 = impl_witness_access constants.%I.lookup_impl_witness.3ae, element0 [symbolic = %impl.elem0.loc5_37.1 (constants.%impl.elem0.f83)] -// CHECK:STDOUT: %N.ref: %i32 = name_ref N, %impl.elem0.loc5_37.2 [symbolic = %impl.elem0.loc5_37.1 (constants.%impl.elem0.f83)] -// CHECK:STDOUT: %impl.elem0.loc5_37.3: %.42f = impl_witness_access constants.%ImplicitAs.impl_witness.176, element0 [concrete = constants.%Int.as.ImplicitAs.impl.Convert.741] -// CHECK:STDOUT: %bound_method.loc5_37.2: = bound_method %N.ref, %impl.elem0.loc5_37.3 [symbolic = %Int.as.ImplicitAs.impl.Convert.bound (constants.%Int.as.ImplicitAs.impl.Convert.bound.363)] -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0.loc5_37.3, @Int.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Int.as.ImplicitAs.impl.Convert.specific_fn] -// CHECK:STDOUT: %bound_method.loc5_37.3: = bound_method %N.ref, %specific_fn [symbolic = %bound_method.loc5_37.1 (constants.%bound_method.a64)] -// CHECK:STDOUT: %Int.as.ImplicitAs.impl.Convert.call.loc5_37.2: init Core.IntLiteral = call %bound_method.loc5_37.3(%N.ref) [symbolic = %Int.as.ImplicitAs.impl.Convert.call.loc5_37.1 (constants.%Int.as.ImplicitAs.impl.Convert.call)] -// CHECK:STDOUT: %.loc5_37.1: Core.IntLiteral = value_of_initializer %Int.as.ImplicitAs.impl.Convert.call.loc5_37.2 [symbolic = %Int.as.ImplicitAs.impl.Convert.call.loc5_37.1 (constants.%Int.as.ImplicitAs.impl.Convert.call)] -// CHECK:STDOUT: %.loc5_37.2: Core.IntLiteral = converted %N.ref, %.loc5_37.1 [symbolic = %Int.as.ImplicitAs.impl.Convert.call.loc5_37.1 (constants.%Int.as.ImplicitAs.impl.Convert.call)] -// CHECK:STDOUT: %array_type.loc5_38.2: type = array_type %.loc5_37.2, %.loc5_31 [symbolic = %array_type.loc5_38.1 (constants.%array_type.939)] -// CHECK:STDOUT: %.loc5_38.2: Core.Form = init_form %array_type.loc5_38.2 [symbolic = %.loc5_38.1 (constants.%.3fd)] -// CHECK:STDOUT: %self.param: @I.WithSelf.F.%Self.as_type.loc5_14.1 (%Self.as_type.a26) = value_param call_param0 -// CHECK:STDOUT: %.loc5_14.1: type = splice_block %.loc5_14.2 [symbolic = %Self.as_type.loc5_14.1 (constants.%Self.as_type.a26)] { -// CHECK:STDOUT: %Self.ref: %I.type = name_ref Self, @I.%Self [symbolic = %Self (constants.%Self.ab9)] -// CHECK:STDOUT: %Self.as_type.loc5_14.2: type = facet_access_type %Self.ref [symbolic = %Self.as_type.loc5_14.1 (constants.%Self.as_type.a26)] -// CHECK:STDOUT: %.loc5_14.2: type = converted %Self.ref, %Self.as_type.loc5_14.2 [symbolic = %Self.as_type.loc5_14.1 (constants.%Self.as_type.a26)] -// CHECK:STDOUT: } -// CHECK:STDOUT: %self: @I.WithSelf.F.%Self.as_type.loc5_14.1 (%Self.as_type.a26) = value_binding self, %self.param -// CHECK:STDOUT: %return.param: ref @I.WithSelf.F.%array_type.loc5_38.1 (%array_type.939) = out_param call_param1 -// CHECK:STDOUT: %return: ref @I.WithSelf.F.%array_type.loc5_38.1 (%array_type.939) = return_slot %return.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %assoc1: %I.assoc_type = assoc_entity element1, %I.WithSelf.F.decl [concrete = constants.%assoc1] -// CHECK:STDOUT: -// CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = %Self -// CHECK:STDOUT: .N = @N.%assoc0 -// CHECK:STDOUT: .F = @I.WithSelf.%assoc1 -// CHECK:STDOUT: witness = (@I.WithSelf.%N, @I.WithSelf.%I.WithSelf.F.decl) -// CHECK:STDOUT: -// CHECK:STDOUT: !requires: -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: impl @empty_tuple.type.as.I.impl: %.loc8_7.2 as %.loc8_14 { -// CHECK:STDOUT: %empty_tuple.type.as.I.impl.F.decl: %empty_tuple.type.as.I.impl.F.type = fn_decl @empty_tuple.type.as.I.impl.F [concrete = constants.%empty_tuple.type.as.I.impl.F] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.cb1 = value_param_pattern [concrete] -// CHECK:STDOUT: %self.patt: %pattern_type.cb1 = at_binding_pattern self, %self.param_patt [concrete] -// CHECK:STDOUT: %return.param_patt: %pattern_type.5d5 = out_param_pattern [concrete] -// CHECK:STDOUT: %return.patt: %pattern_type.5d5 = return_slot_pattern %return.param_patt, %array_type [concrete] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc9_38: type = type_literal bool [concrete = bool] -// CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc] -// CHECK:STDOUT: %array_type: type = array_type %int_2, %.loc9_38 [concrete = constants.%array_type.c9b] -// CHECK:STDOUT: %.loc9_45: Core.Form = init_form %array_type [concrete = constants.%.8b3] -// CHECK:STDOUT: %self.param: %empty_tuple.type = value_param call_param0 -// CHECK:STDOUT: %Self.ref: type = name_ref Self, @empty_tuple.type.as.I.impl.%.loc8_7.2 [concrete = constants.%empty_tuple.type] -// CHECK:STDOUT: %self: %empty_tuple.type = value_binding self, %self.param -// CHECK:STDOUT: %return.param: ref %array_type.c9b = out_param call_param1 -// CHECK:STDOUT: %return: ref %array_type.c9b = return_slot %return.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %I.impl_witness_table = impl_witness_table (%impl_witness_assoc_constant, %empty_tuple.type.as.I.impl.F.decl), @empty_tuple.type.as.I.impl [concrete] -// CHECK:STDOUT: %I.impl_witness: = impl_witness %I.impl_witness_table [concrete = constants.%I.impl_witness] -// CHECK:STDOUT: %impl_witness_assoc_constant: %i32 = impl_witness_assoc_constant constants.%int_2.ef8 [concrete = constants.%int_2.ef8] -// CHECK:STDOUT: -// CHECK:STDOUT: !members: -// CHECK:STDOUT: .F = %empty_tuple.type.as.I.impl.F.decl -// CHECK:STDOUT: witness = %I.impl_witness -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generic fn @I.WithSelf.F(@I.%Self: %I.type) { -// CHECK:STDOUT: %Self: %I.type = symbolic_binding Self, 0 [symbolic = %Self (constants.%Self.ab9)] -// CHECK:STDOUT: %Self.as_type.loc5_14.1: type = facet_access_type %Self [symbolic = %Self.as_type.loc5_14.1 (constants.%Self.as_type.a26)] -// CHECK:STDOUT: %pattern_type.loc5_12: type = pattern_type %Self.as_type.loc5_14.1 [symbolic = %pattern_type.loc5_12 (constants.%pattern_type.965)] -// CHECK:STDOUT: %I.lookup_impl_witness: = lookup_impl_witness %Self, @I [symbolic = %I.lookup_impl_witness (constants.%I.lookup_impl_witness.3ae)] -// CHECK:STDOUT: %impl.elem0.loc5_37.1: %i32 = impl_witness_access %I.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc5_37.1 (constants.%impl.elem0.f83)] -// CHECK:STDOUT: %Int.as.ImplicitAs.impl.Convert.bound: = bound_method %impl.elem0.loc5_37.1, constants.%Int.as.ImplicitAs.impl.Convert.741 [symbolic = %Int.as.ImplicitAs.impl.Convert.bound (constants.%Int.as.ImplicitAs.impl.Convert.bound.363)] -// CHECK:STDOUT: %bound_method.loc5_37.1: = bound_method %impl.elem0.loc5_37.1, constants.%Int.as.ImplicitAs.impl.Convert.specific_fn [symbolic = %bound_method.loc5_37.1 (constants.%bound_method.a64)] -// CHECK:STDOUT: %Int.as.ImplicitAs.impl.Convert.call.loc5_37.1: init Core.IntLiteral = call %bound_method.loc5_37.1(%impl.elem0.loc5_37.1) [symbolic = %Int.as.ImplicitAs.impl.Convert.call.loc5_37.1 (constants.%Int.as.ImplicitAs.impl.Convert.call)] -// CHECK:STDOUT: %array_type.loc5_38.1: type = array_type %Int.as.ImplicitAs.impl.Convert.call.loc5_37.1, bool [symbolic = %array_type.loc5_38.1 (constants.%array_type.939)] -// CHECK:STDOUT: %.loc5_38.1: Core.Form = init_form %array_type.loc5_38.1 [symbolic = %.loc5_38.1 (constants.%.3fd)] -// CHECK:STDOUT: %pattern_type.loc5_38: type = pattern_type %array_type.loc5_38.1 [symbolic = %pattern_type.loc5_38 (constants.%pattern_type.7ed)] -// CHECK:STDOUT: -// CHECK:STDOUT: fn(%self.param: @I.WithSelf.F.%Self.as_type.loc5_14.1 (%Self.as_type.a26)) -> out %return.param: @I.WithSelf.F.%array_type.loc5_38.1 (%array_type.939); -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @empty_tuple.type.as.I.impl.F(%self.param: %empty_tuple.type) -> out %return.param: %array_type.c9b { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %true: bool = bool_literal true [concrete = constants.%true] -// CHECK:STDOUT: %false: bool = bool_literal false [concrete = constants.%false] -// CHECK:STDOUT: %.loc9_68.1: %tuple.type.784 = tuple_literal (%true, %false) [concrete = constants.%tuple.a9a] -// CHECK:STDOUT: %impl.elem0.loc9_57: %.7f0 = impl_witness_access constants.%Copy.impl_witness.c24, element0 [concrete = constants.%bool.as.Copy.impl.Op] -// CHECK:STDOUT: %bound_method.loc9_57: = bound_method %true, %impl.elem0.loc9_57 [concrete = constants.%bool.as.Copy.impl.Op.bound.9e2] -// CHECK:STDOUT: %bool.as.Copy.impl.Op.call.loc9_57: init bool = call %bound_method.loc9_57(%true) [concrete = constants.%true] -// CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0] -// CHECK:STDOUT: %.loc9_68.2: ref bool = array_index %return.param, %int_0 -// CHECK:STDOUT: %.loc9_68.3: init bool to %.loc9_68.2 = in_place_init %bool.as.Copy.impl.Op.call.loc9_57 [concrete = constants.%true] -// CHECK:STDOUT: %impl.elem0.loc9_63: %.7f0 = impl_witness_access constants.%Copy.impl_witness.c24, element0 [concrete = constants.%bool.as.Copy.impl.Op] -// CHECK:STDOUT: %bound_method.loc9_63: = bound_method %false, %impl.elem0.loc9_63 [concrete = constants.%bool.as.Copy.impl.Op.bound.240] -// CHECK:STDOUT: %bool.as.Copy.impl.Op.call.loc9_63: init bool = call %bound_method.loc9_63(%false) [concrete = constants.%false] -// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1] -// CHECK:STDOUT: %.loc9_68.4: ref bool = array_index %return.param, %int_1 -// CHECK:STDOUT: %.loc9_68.5: init bool to %.loc9_68.4 = in_place_init %bool.as.Copy.impl.Op.call.loc9_63 [concrete = constants.%false] -// CHECK:STDOUT: %.loc9_68.6: init %array_type.c9b to %return.param = array_init (%.loc9_68.3, %.loc9_68.5) [concrete = constants.%array] -// CHECK:STDOUT: %.loc9_69: init %array_type.c9b = converted %.loc9_68.1, %.loc9_68.6 [concrete = constants.%array] -// CHECK:STDOUT: return %.loc9_69 to %return.param -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: specific @I.WithSelf(constants.%Self.ab9) { -// CHECK:STDOUT: !definition: -// CHECK:STDOUT: %Self => constants.%Self.ab9 -// CHECK:STDOUT: %I.WithSelf.F.type => constants.%I.WithSelf.F.type.08c -// CHECK:STDOUT: %I.WithSelf.F => constants.%I.WithSelf.F.705 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: specific @I.WithSelf.F(constants.%Self.ab9) { -// CHECK:STDOUT: %Self => constants.%Self.ab9 -// CHECK:STDOUT: %Self.as_type.loc5_14.1 => constants.%Self.as_type.a26 -// CHECK:STDOUT: %pattern_type.loc5_12 => constants.%pattern_type.965 -// CHECK:STDOUT: %I.lookup_impl_witness => constants.%I.lookup_impl_witness.3ae -// CHECK:STDOUT: %impl.elem0.loc5_37.1 => constants.%impl.elem0.f83 -// CHECK:STDOUT: %Int.as.ImplicitAs.impl.Convert.bound => constants.%Int.as.ImplicitAs.impl.Convert.bound.363 -// CHECK:STDOUT: %bound_method.loc5_37.1 => constants.%bound_method.a64 -// CHECK:STDOUT: %Int.as.ImplicitAs.impl.Convert.call.loc5_37.1 => constants.%Int.as.ImplicitAs.impl.Convert.call -// CHECK:STDOUT: %array_type.loc5_38.1 => constants.%array_type.939 -// CHECK:STDOUT: %.loc5_38.1 => constants.%.3fd -// CHECK:STDOUT: %pattern_type.loc5_38 => constants.%pattern_type.7ed -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: specific @I.WithSelf(constants.%.Self) { -// CHECK:STDOUT: !definition: -// CHECK:STDOUT: %Self => constants.%.Self -// CHECK:STDOUT: %I.WithSelf.F.type => constants.%I.WithSelf.F.type.29d -// CHECK:STDOUT: %I.WithSelf.F => constants.%I.WithSelf.F.8ec -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: specific @I.WithSelf(constants.%I.facet) { -// CHECK:STDOUT: !definition: -// CHECK:STDOUT: %Self => constants.%I.facet -// CHECK:STDOUT: %I.WithSelf.F.type => constants.%I.WithSelf.F.type.7ea -// CHECK:STDOUT: %I.WithSelf.F => constants.%I.WithSelf.F.755 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: specific @I.WithSelf.F(constants.%I.facet) { -// CHECK:STDOUT: %Self => constants.%I.facet -// CHECK:STDOUT: %Self.as_type.loc5_14.1 => constants.%empty_tuple.type -// CHECK:STDOUT: %pattern_type.loc5_12 => constants.%pattern_type.cb1 -// CHECK:STDOUT: %I.lookup_impl_witness => constants.%I.impl_witness -// CHECK:STDOUT: %impl.elem0.loc5_37.1 => constants.%int_2.ef8 -// CHECK:STDOUT: %Int.as.ImplicitAs.impl.Convert.bound => constants.%Int.as.ImplicitAs.impl.Convert.bound.c19 -// CHECK:STDOUT: %bound_method.loc5_37.1 => constants.%bound_method.868 -// CHECK:STDOUT: %Int.as.ImplicitAs.impl.Convert.call.loc5_37.1 => constants.%int_2.ecc -// CHECK:STDOUT: %array_type.loc5_38.1 => constants.%array_type.c9b -// CHECK:STDOUT: %.loc5_38.1 => constants.%.8b3 -// CHECK:STDOUT: %pattern_type.loc5_38 => constants.%pattern_type.5d5 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: --- symbolic_associated_type_in_concrete_context.carbon -// CHECK:STDOUT: -// CHECK:STDOUT: constants { -// CHECK:STDOUT: %Z.type: type = facet_type <@Z> [concrete] -// CHECK:STDOUT: %Self.c59: %Z.type = symbolic_binding Self, 0 [symbolic] -// CHECK:STDOUT: %Z.assoc_type: type = assoc_entity_type @Z [concrete] -// CHECK:STDOUT: %assoc0.cdf: %Z.assoc_type = assoc_entity element0, @Z.WithSelf.%X [concrete] -// CHECK:STDOUT: %type: type = facet_type [concrete] -// CHECK:STDOUT: %.Self.c39: %type = symbolic_binding .Self [symbolic_self] -// CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete] -// CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic] -// CHECK:STDOUT: %C.type: type = generic_class_type @C [concrete] -// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] -// CHECK:STDOUT: %C.generic: %C.type = struct_value () [concrete] -// CHECK:STDOUT: %C.5a3: type = class_type @C, @C(%T) [symbolic] -// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] -// CHECK:STDOUT: %complete_type.357: = complete_type_witness %empty_struct_type [concrete] -// CHECK:STDOUT: %D: type = class_type @D [concrete] -// CHECK:STDOUT: %.Self.aac: %Z.type = symbolic_binding .Self [symbolic_self] -// CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.aac [symbolic_self] -// CHECK:STDOUT: %Z.lookup_impl_witness: = lookup_impl_witness %.Self.aac, @Z [symbolic_self] -// CHECK:STDOUT: %impl.elem0: type = impl_witness_access %Z.lookup_impl_witness, element0 [symbolic_self] -// CHECK:STDOUT: %Z_where.type.ea1: type = facet_type <@Z where %impl.elem0 = %C.5a3> [symbolic] -// CHECK:STDOUT: %Z.impl_witness.8d2: = impl_witness @T.as.Z.impl.%Z.impl_witness_table, @T.as.Z.impl(%T) [symbolic] -// CHECK:STDOUT: %require_complete: = require_complete_type %Z_where.type.ea1 [symbolic] -// CHECK:STDOUT: %Z.facet.49c: %Z.type = facet_value %T, (%Z.impl_witness.8d2) [symbolic] -// CHECK:STDOUT: %F.type: type = fn_type @F [concrete] -// CHECK:STDOUT: %F: %F.type = struct_value () [concrete] -// CHECK:STDOUT: %C.302: type = class_type @C, @C(%D) [concrete] -// CHECK:STDOUT: %Z_where.type.4e0: type = facet_type <@Z where %impl.elem0 = %C.302> [concrete] -// CHECK:STDOUT: %Z.impl_witness.63b: = impl_witness @T.as.Z.impl.%Z.impl_witness_table, @T.as.Z.impl(%D) [concrete] -// CHECK:STDOUT: %complete_type.9a2: = complete_type_witness %Z_where.type.4e0 [concrete] -// CHECK:STDOUT: %Z.facet.59e: %Z.type = facet_value %D, (%Z.impl_witness.63b) [concrete] -// CHECK:STDOUT: %pattern_type.a7e: type = pattern_type %C.302 [concrete] -// CHECK:STDOUT: %empty_struct: %empty_struct_type = struct_value () [concrete] -// CHECK:STDOUT: %C.val: %C.302 = struct_value () [concrete] -// CHECK:STDOUT: %.cdd: ref %C.302 = temporary invalid, %C.val [concrete] -// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %Destroy.Op.type.bae255.2: type = fn_type @Destroy.Op.loc13_30.2 [concrete] -// CHECK:STDOUT: %Destroy.Op.651ba6.2: %Destroy.Op.type.bae255.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.Op.bound: = bound_method %.cdd, %Destroy.Op.651ba6.2 [concrete] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: imports { -// CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { -// CHECK:STDOUT: .Destroy = %Core.Destroy -// CHECK:STDOUT: import Core//prelude -// CHECK:STDOUT: import Core//prelude/... -// CHECK:STDOUT: } -// CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: file { -// CHECK:STDOUT: package: = namespace [concrete] { -// CHECK:STDOUT: .Core = imports.%Core -// CHECK:STDOUT: .Z = %Z.decl -// CHECK:STDOUT: .C = %C.decl -// CHECK:STDOUT: .D = %D.decl -// CHECK:STDOUT: .F = %F.decl -// CHECK:STDOUT: } -// CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %Z.decl: type = interface_decl @Z [concrete = constants.%Z.type] {} {} -// CHECK:STDOUT: %C.decl: %C.type = class_decl @C [concrete = constants.%C.generic] { -// CHECK:STDOUT: %T.patt: %pattern_type.98f = symbolic_binding_pattern T, 0 [concrete] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc7_13.1: type = splice_block %.loc7_13.2 [concrete = type] { -// CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.c39] -// CHECK:STDOUT: %.loc7_13.2: type = type_literal type [concrete = type] -// CHECK:STDOUT: } -// CHECK:STDOUT: %T.loc7_10.2: type = symbolic_binding T, 0 [symbolic = %T.loc7_10.1 (constants.%T)] -// CHECK:STDOUT: } -// CHECK:STDOUT: %D.decl: type = class_decl @D [concrete = constants.%D] {} {} -// CHECK:STDOUT: impl_decl @T.as.Z.impl [concrete] { -// CHECK:STDOUT: %T.patt: %pattern_type.98f = symbolic_binding_pattern T, 0 [concrete] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %T.ref.loc10_24: type = name_ref T, %T.loc10_15.1 [symbolic = %T.loc10_15.2 (constants.%T)] -// CHECK:STDOUT: %Z.ref: type = name_ref Z, file.%Z.decl [concrete = constants.%Z.type] -// CHECK:STDOUT: %.Self.loc10_31: %Z.type = symbolic_binding .Self [symbolic_self = constants.%.Self.aac] -// CHECK:STDOUT: %.Self.ref: %Z.type = name_ref .Self, %.Self.loc10_31 [symbolic_self = constants.%.Self.aac] -// CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref [symbolic_self = constants.%.Self.as_type] -// CHECK:STDOUT: %.loc10_37: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.as_type] -// CHECK:STDOUT: %X.ref: %Z.assoc_type = name_ref X, @X.%assoc0 [concrete = constants.%assoc0.cdf] -// CHECK:STDOUT: %impl.elem0: type = impl_witness_access constants.%Z.lookup_impl_witness, element0 [symbolic_self = constants.%impl.elem0] -// CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [concrete = constants.%C.generic] -// CHECK:STDOUT: %T.ref.loc10_44: type = name_ref T, %T.loc10_15.1 [symbolic = %T.loc10_15.2 (constants.%T)] -// CHECK:STDOUT: %C.loc10_45.1: type = class_type @C, @C(constants.%T) [symbolic = %C.loc10_45.2 (constants.%C.5a3)] -// CHECK:STDOUT: %.loc10_31: type = where_expr [symbolic = %Z_where.type (constants.%Z_where.type.ea1)] { -// CHECK:STDOUT: requirement_base_facet_type %Z.ref -// CHECK:STDOUT: requirement_rewrite %impl.elem0, %C.loc10_45.1 -// CHECK:STDOUT: } -// CHECK:STDOUT: %.loc10_18.1: type = splice_block %.loc10_18.2 [concrete = type] { -// CHECK:STDOUT: %.Self.loc10_15: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.c39] -// CHECK:STDOUT: %.loc10_18.2: type = type_literal type [concrete = type] -// CHECK:STDOUT: } -// CHECK:STDOUT: %T.loc10_15.1: type = symbolic_binding T, 0 [symbolic = %T.loc10_15.2 (constants.%T)] -// CHECK:STDOUT: } -// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] {} {} -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: interface @Z { -// CHECK:STDOUT: %Self: %Z.type = symbolic_binding Self, 0 [symbolic = constants.%Self.c59] -// CHECK:STDOUT: %Z.WithSelf.decl = interface_with_self_decl @Z [concrete] -// CHECK:STDOUT: -// CHECK:STDOUT: !with Self: -// CHECK:STDOUT: %X: type = assoc_const_decl @X [concrete] { -// CHECK:STDOUT: %assoc0: %Z.assoc_type = assoc_entity element0, @Z.WithSelf.%X [concrete = constants.%assoc0.cdf] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = %Self -// CHECK:STDOUT: .X = @X.%assoc0 -// CHECK:STDOUT: witness = (@Z.WithSelf.%X) -// CHECK:STDOUT: -// CHECK:STDOUT: !requires: -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generic impl @T.as.Z.impl(%T.loc10_15.1: type) { -// CHECK:STDOUT: %T.loc10_15.2: type = symbolic_binding T, 0 [symbolic = %T.loc10_15.2 (constants.%T)] -// CHECK:STDOUT: %C.loc10_45.2: type = class_type @C, @C(%T.loc10_15.2) [symbolic = %C.loc10_45.2 (constants.%C.5a3)] -// CHECK:STDOUT: %Z_where.type: type = facet_type <@Z where constants.%impl.elem0 = %C.loc10_45.2> [symbolic = %Z_where.type (constants.%Z_where.type.ea1)] -// CHECK:STDOUT: %Z.impl_witness.loc10_47.2: = impl_witness %Z.impl_witness_table, @T.as.Z.impl(%T.loc10_15.2) [symbolic = %Z.impl_witness.loc10_47.2 (constants.%Z.impl_witness.8d2)] -// CHECK:STDOUT: -// CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete: = require_complete_type %Z_where.type [symbolic = %require_complete (constants.%require_complete)] -// CHECK:STDOUT: -// CHECK:STDOUT: impl: %T.ref.loc10_24 as %.loc10_31 { -// CHECK:STDOUT: %Z.impl_witness_table = impl_witness_table (%impl_witness_assoc_constant), @T.as.Z.impl [concrete] -// CHECK:STDOUT: %Z.impl_witness.loc10_47.1: = impl_witness %Z.impl_witness_table, @T.as.Z.impl(constants.%T) [symbolic = %Z.impl_witness.loc10_47.2 (constants.%Z.impl_witness.8d2)] -// CHECK:STDOUT: %impl_witness_assoc_constant: type = impl_witness_assoc_constant constants.%C.5a3 [symbolic = %C.loc10_45.2 (constants.%C.5a3)] -// CHECK:STDOUT: -// CHECK:STDOUT: !members: -// CHECK:STDOUT: witness = %Z.impl_witness.loc10_47.1 -// CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generic class @C(%T.loc7_10.2: type) { -// CHECK:STDOUT: %T.loc7_10.1: type = symbolic_binding T, 0 [symbolic = %T.loc7_10.1 (constants.%T)] -// CHECK:STDOUT: -// CHECK:STDOUT: !definition: -// CHECK:STDOUT: -// CHECK:STDOUT: class { -// CHECK:STDOUT: %complete_type: = complete_type_witness constants.%empty_struct_type [concrete = constants.%complete_type.357] -// CHECK:STDOUT: complete_type_witness = %complete_type -// CHECK:STDOUT: -// CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = constants.%C.5a3 -// CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: class @D { -// CHECK:STDOUT: %complete_type: = complete_type_witness constants.%empty_struct_type [concrete = constants.%complete_type.357] -// CHECK:STDOUT: complete_type_witness = %complete_type -// CHECK:STDOUT: -// CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = constants.%D -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @F() { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: name_binding_decl { -// CHECK:STDOUT: %a.patt: %pattern_type.a7e = value_binding_pattern a [concrete] -// CHECK:STDOUT: } -// CHECK:STDOUT: %.loc13_28.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct] -// CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [concrete = constants.%C.generic] -// CHECK:STDOUT: %D.ref.loc13_35: type = name_ref D, file.%D.decl [concrete = constants.%D] -// CHECK:STDOUT: %C: type = class_type @C, @C(constants.%D) [concrete = constants.%C.302] -// CHECK:STDOUT: %.loc13_28.2: ref %C.302 = temporary_storage -// CHECK:STDOUT: %.loc13_28.3: init %C.302 to %.loc13_28.2 = class_init () [concrete = constants.%C.val] -// CHECK:STDOUT: %.loc13_30.1: init %C.302 = converted %.loc13_28.1, %.loc13_28.3 [concrete = constants.%C.val] -// CHECK:STDOUT: %.loc13_18.1: type = splice_block %impl.elem0 [concrete = constants.%C.302] { -// CHECK:STDOUT: %D.ref.loc13_17: type = name_ref D, file.%D.decl [concrete = constants.%D] -// CHECK:STDOUT: %Z.ref: type = name_ref Z, file.%Z.decl [concrete = constants.%Z.type] -// CHECK:STDOUT: %X.ref: %Z.assoc_type = name_ref X, @X.%assoc0 [concrete = constants.%assoc0.cdf] -// CHECK:STDOUT: %Z.facet: %Z.type = facet_value %D.ref.loc13_17, (constants.%Z.impl_witness.63b) [concrete = constants.%Z.facet.59e] -// CHECK:STDOUT: %.loc13_18.2: %Z.type = converted %D.ref.loc13_17, %Z.facet [concrete = constants.%Z.facet.59e] -// CHECK:STDOUT: %impl.elem0: type = impl_witness_access constants.%Z.impl_witness.63b, element0 [concrete = constants.%C.302] -// CHECK:STDOUT: } -// CHECK:STDOUT: %.loc13_30.2: ref %C.302 = temporary %.loc13_28.2, %.loc13_30.1 [concrete = constants.%.cdd] -// CHECK:STDOUT: %.loc13_30.3: %C.302 = acquire_value %.loc13_30.2 [concrete = constants.%C.val] -// CHECK:STDOUT: %a: %C.302 = value_binding a, %.loc13_30.3 -// CHECK:STDOUT: %Destroy.Op.call: init %empty_tuple.type = call constants.%Destroy.Op.bound(constants.%.cdd) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.Op.loc13_30.1(%self.param: ref %empty_struct_type) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.Op.loc13_30.2(%self.param: ref %C.302) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: specific @Z.WithSelf(constants.%Self.c59) { -// CHECK:STDOUT: !definition: -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: specific @C(constants.%T) { -// CHECK:STDOUT: %T.loc7_10.1 => constants.%T -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: specific @Z.WithSelf(constants.%.Self.aac) { -// CHECK:STDOUT: !definition: -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: specific @T.as.Z.impl(constants.%T) { -// CHECK:STDOUT: %T.loc10_15.2 => constants.%T -// CHECK:STDOUT: %C.loc10_45.2 => constants.%C.5a3 -// CHECK:STDOUT: %Z_where.type => constants.%Z_where.type.ea1 -// CHECK:STDOUT: %Z.impl_witness.loc10_47.2 => constants.%Z.impl_witness.8d2 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: specific @Z.WithSelf(constants.%Z.facet.49c) { -// CHECK:STDOUT: !definition: -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: specific @T.as.Z.impl(constants.%D) { -// CHECK:STDOUT: %T.loc10_15.2 => constants.%D -// CHECK:STDOUT: %C.loc10_45.2 => constants.%C.302 -// CHECK:STDOUT: %Z_where.type => constants.%Z_where.type.4e0 -// CHECK:STDOUT: %Z.impl_witness.loc10_47.2 => constants.%Z.impl_witness.63b -// CHECK:STDOUT: -// CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete => constants.%complete_type.9a2 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: specific @C(constants.%D) { -// CHECK:STDOUT: %T.loc7_10.1 => constants.%D -// CHECK:STDOUT: -// CHECK:STDOUT: !definition: -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: specific @Z.WithSelf(constants.%Z.facet.59e) { -// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %.loc11_25.1: %empty_struct_type = struct_access %impl.elem0, element0 [concrete = constants.%empty_struct] +// CHECK:STDOUT: %.loc11_25.2: init %empty_struct_type = struct_init () [concrete = constants.%empty_struct] +// CHECK:STDOUT: %.loc11_27: init %empty_struct_type = converted %.loc11_25.1, %.loc11_25.2 [concrete = constants.%empty_struct] +// CHECK:STDOUT: return %.loc11_27 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/interface/as_type_of_type.carbon b/toolchain/check/testdata/interface/as_type_of_type.carbon index 6ae12994be5b..05a6927119d9 100644 --- a/toolchain/check/testdata/interface/as_type_of_type.carbon +++ b/toolchain/check/testdata/interface/as_type_of_type.carbon @@ -112,6 +112,7 @@ fn F(T:! Empty) { // CHECK:STDOUT: %Empty.impl_witness: = impl_witness %Empty.impl_witness_table [concrete = constants.%Empty.impl_witness] // CHECK:STDOUT: // CHECK:STDOUT: !members: +// CHECK:STDOUT: extend %Empty.ref // CHECK:STDOUT: witness = %Empty.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/interface/compound_member_access.carbon b/toolchain/check/testdata/interface/compound_member_access.carbon index 1cb8ec8bf746..45ad36051e47 100644 --- a/toolchain/check/testdata/interface/compound_member_access.carbon +++ b/toolchain/check/testdata/interface/compound_member_access.carbon @@ -1379,6 +1379,7 @@ fn Works() { // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .G = %C.as.A.impl.G.decl +// CHECK:STDOUT: extend %A.ref // CHECK:STDOUT: witness = %A.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: @@ -1563,6 +1564,7 @@ fn Works() { // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .G = %C.as.A.impl.G.decl +// CHECK:STDOUT: extend %A.ref // CHECK:STDOUT: witness = %A.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/interface/default_fn.carbon b/toolchain/check/testdata/interface/default_fn.carbon index 2db28e5742e0..d013f2f4df74 100644 --- a/toolchain/check/testdata/interface/default_fn.carbon +++ b/toolchain/check/testdata/interface/default_fn.carbon @@ -121,6 +121,7 @@ class C { // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %C.as.I.impl.F.decl +// CHECK:STDOUT: extend %I.ref // CHECK:STDOUT: witness = %I.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/interface/final.carbon b/toolchain/check/testdata/interface/final.carbon index 36d31b5d18cd..f636f063045d 100644 --- a/toolchain/check/testdata/interface/final.carbon +++ b/toolchain/check/testdata/interface/final.carbon @@ -189,6 +189,7 @@ fn Use() { UseJ(C); } // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %T.as_type.as.I.impl.F.decl +// CHECK:STDOUT: extend %I.ref // CHECK:STDOUT: witness = %I.impl_witness.loc7_34.1 // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -198,6 +199,7 @@ fn Use() { UseJ(C); } // CHECK:STDOUT: %J.impl_witness: = impl_witness %J.impl_witness_table [concrete = constants.%J.impl_witness] // CHECK:STDOUT: // CHECK:STDOUT: !members: +// CHECK:STDOUT: extend %J.ref // CHECK:STDOUT: witness = %J.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/interface/generic.carbon b/toolchain/check/testdata/interface/generic.carbon index ebf072a9f242..751ed1bf5228 100644 --- a/toolchain/check/testdata/interface/generic.carbon +++ b/toolchain/check/testdata/interface/generic.carbon @@ -269,6 +269,7 @@ fn F(unused T:! Generic((), ())) {} // CHECK:STDOUT: %Simple.impl_witness: = impl_witness %Simple.impl_witness_table [concrete = constants.%Simple.impl_witness] // CHECK:STDOUT: // CHECK:STDOUT: !members: +// CHECK:STDOUT: extend %Simple.type // CHECK:STDOUT: witness = %Simple.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: @@ -288,6 +289,7 @@ fn F(unused T:! Generic((), ())) {} // CHECK:STDOUT: !members: // CHECK:STDOUT: .X = // CHECK:STDOUT: .F = %C.as.WithAssocFn.impl.F.decl +// CHECK:STDOUT: extend %WithAssocFn.type // CHECK:STDOUT: witness = %WithAssocFn.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/interface/generic_import.carbon b/toolchain/check/testdata/interface/generic_import.carbon index eae178ff940f..9a54bc04ecbb 100644 --- a/toolchain/check/testdata/interface/generic_import.carbon +++ b/toolchain/check/testdata/interface/generic_import.carbon @@ -176,6 +176,7 @@ impl C as AddWith(C) { // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %C.as.AddWith.impl.F.decl +// CHECK:STDOUT: extend %AddWith.type // CHECK:STDOUT: witness = %AddWith.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/interface/generic_method.carbon b/toolchain/check/testdata/interface/generic_method.carbon index 866fad1842f6..bb86fb82ffd9 100644 --- a/toolchain/check/testdata/interface/generic_method.carbon +++ b/toolchain/check/testdata/interface/generic_method.carbon @@ -359,6 +359,8 @@ fn CallIndirect() { // CHECK:STDOUT: .T = // CHECK:STDOUT: .T = // CHECK:STDOUT: .F = @A.WithSelf.%assoc0.loc6_41.1 +// CHECK:STDOUT: .X = +// CHECK:STDOUT: .Y = // CHECK:STDOUT: witness = (@A.WithSelf.%A.WithSelf.F.decl) // CHECK:STDOUT: // CHECK:STDOUT: !requires: @@ -401,6 +403,7 @@ fn CallIndirect() { // CHECK:STDOUT: .X = // CHECK:STDOUT: .Y = // CHECK:STDOUT: .F = %Y.as.A.impl.F.decl +// CHECK:STDOUT: extend %A.type // CHECK:STDOUT: witness = %A.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: @@ -1085,6 +1088,9 @@ fn CallIndirect() { // CHECK:STDOUT: .T = // CHECK:STDOUT: .T = // CHECK:STDOUT: .F = @A.WithSelf.%assoc0.loc6_39.1 +// CHECK:STDOUT: .W = +// CHECK:STDOUT: .V1 = +// CHECK:STDOUT: .V2 = // CHECK:STDOUT: witness = (@A.WithSelf.%A.WithSelf.F.decl) // CHECK:STDOUT: // CHECK:STDOUT: !requires: @@ -1141,6 +1147,7 @@ fn CallIndirect() { // CHECK:STDOUT: .V1 = // CHECK:STDOUT: .V2 = // CHECK:STDOUT: .F = %tuple.type.as.A.impl.F.decl +// CHECK:STDOUT: extend %A.type.loc14_61.2 // CHECK:STDOUT: witness = %A.impl_witness.loc14_63.1 // CHECK:STDOUT: } // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/interface/generic_vs_params.carbon b/toolchain/check/testdata/interface/generic_vs_params.carbon index 331baee7bf40..00d0cabbb855 100644 --- a/toolchain/check/testdata/interface/generic_vs_params.carbon +++ b/toolchain/check/testdata/interface/generic_vs_params.carbon @@ -271,6 +271,7 @@ interface Bar[T:! type] {} // CHECK:STDOUT: %NotGenericNoParams.impl_witness: = impl_witness %NotGenericNoParams.impl_witness_table [concrete = constants.%NotGenericNoParams.impl_witness] // CHECK:STDOUT: // CHECK:STDOUT: !members: +// CHECK:STDOUT: extend %NotGenericNoParams.ref // CHECK:STDOUT: witness = %NotGenericNoParams.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: @@ -279,6 +280,7 @@ interface Bar[T:! type] {} // CHECK:STDOUT: %NotGenericButParams.impl_witness: = impl_witness %NotGenericButParams.impl_witness_table [concrete = constants.%NotGenericButParams.impl_witness] // CHECK:STDOUT: // CHECK:STDOUT: !members: +// CHECK:STDOUT: extend %NotGenericButParams.type // CHECK:STDOUT: witness = %NotGenericButParams.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: @@ -287,6 +289,7 @@ interface Bar[T:! type] {} // CHECK:STDOUT: %GenericAndParams.impl_witness: = impl_witness %GenericAndParams.impl_witness_table [concrete = constants.%GenericAndParams.impl_witness.12e] // CHECK:STDOUT: // CHECK:STDOUT: !members: +// CHECK:STDOUT: extend %GenericAndParams.type // CHECK:STDOUT: witness = %GenericAndParams.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: @@ -295,6 +298,7 @@ interface Bar[T:! type] {} // CHECK:STDOUT: %GenericNoParams.impl_witness: = impl_witness %GenericNoParams.impl_witness_table [concrete = constants.%GenericNoParams.impl_witness] // CHECK:STDOUT: // CHECK:STDOUT: !members: +// CHECK:STDOUT: extend %GenericNoParams.ref // CHECK:STDOUT: witness = %GenericNoParams.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: @@ -303,6 +307,7 @@ interface Bar[T:! type] {} // CHECK:STDOUT: %GenericAndParams.impl_witness: = impl_witness %GenericAndParams.impl_witness_table [concrete = constants.%GenericAndParams.impl_witness.e7f] // CHECK:STDOUT: // CHECK:STDOUT: !members: +// CHECK:STDOUT: extend %GenericAndParams.type // CHECK:STDOUT: witness = %GenericAndParams.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/interface/incomplete.carbon b/toolchain/check/testdata/interface/incomplete.carbon index 02a311c90cba..a4ec10df3d82 100644 --- a/toolchain/check/testdata/interface/incomplete.carbon +++ b/toolchain/check/testdata/interface/incomplete.carbon @@ -202,6 +202,7 @@ interface A(T:! type) { // CHECK:STDOUT: // CHECK:STDOUT: impl @empty_struct_type.as..impl: %.loc16_7.2 as { // CHECK:STDOUT: !members: +// CHECK:STDOUT: extend // CHECK:STDOUT: witness = // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/interface/local.carbon b/toolchain/check/testdata/interface/local.carbon index 988b85129fb0..628914b147e4 100644 --- a/toolchain/check/testdata/interface/local.carbon +++ b/toolchain/check/testdata/interface/local.carbon @@ -96,6 +96,7 @@ fn F() { // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .G = %empty_tuple.type.as.I.impl.G.decl +// CHECK:STDOUT: extend %I.ref // CHECK:STDOUT: witness = %I.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/let/compile_time_bindings.carbon b/toolchain/check/testdata/let/compile_time_bindings.carbon index 19afe20be9dc..73af13b175fe 100644 --- a/toolchain/check/testdata/let/compile_time_bindings.carbon +++ b/toolchain/check/testdata/let/compile_time_bindings.carbon @@ -785,6 +785,7 @@ impl i32 as Empty { // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Zero = %Zero +// CHECK:STDOUT: extend %Empty.ref // CHECK:STDOUT: witness = %Empty.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/operators/overloaded/eq.carbon b/toolchain/check/testdata/operators/overloaded/eq.carbon index cea33e264bcf..5e6a744a9941 100644 --- a/toolchain/check/testdata/operators/overloaded/eq.carbon +++ b/toolchain/check/testdata/operators/overloaded/eq.carbon @@ -224,6 +224,7 @@ fn TestLhsBad(a: D, b: C) -> bool { // CHECK:STDOUT: .C = // CHECK:STDOUT: .Equal = %C.as.EqWith.impl.Equal.decl // CHECK:STDOUT: .NotEqual = %C.as.EqWith.impl.NotEqual.decl +// CHECK:STDOUT: extend %EqWith.type // CHECK:STDOUT: witness = %EqWith.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: @@ -502,6 +503,7 @@ fn TestLhsBad(a: D, b: C) -> bool { // CHECK:STDOUT: .C = // CHECK:STDOUT: .Equal = %C.as.EqWith.impl.Equal.decl // CHECK:STDOUT: .NotEqual = %C.as.EqWith.impl.NotEqual.decl +// CHECK:STDOUT: extend %EqWith.type // CHECK:STDOUT: witness = %EqWith.impl_witness // 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 c6c19ca4c37f..c159d684233f 100644 --- a/toolchain/check/testdata/operators/overloaded/fail_assign_non_ref.carbon +++ b/toolchain/check/testdata/operators/overloaded/fail_assign_non_ref.carbon @@ -145,6 +145,7 @@ fn TestAddAssignNonRef(a: C, b: C) { // CHECK:STDOUT: !members: // CHECK:STDOUT: .C = // CHECK:STDOUT: .Op = %C.as.Inc.impl.Op.decl +// CHECK:STDOUT: extend %Inc.ref // CHECK:STDOUT: witness = %Inc.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: @@ -168,6 +169,7 @@ fn TestAddAssignNonRef(a: C, b: C) { // CHECK:STDOUT: !members: // CHECK:STDOUT: .C = // CHECK:STDOUT: .Op = %C.as.AddAssignWith.impl.Op.decl +// CHECK:STDOUT: extend %AddAssignWith.type // CHECK:STDOUT: witness = %AddAssignWith.impl_witness // 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 3025f0bc9657..da2d47b670e1 100644 --- a/toolchain/check/testdata/operators/overloaded/implicit_as.carbon +++ b/toolchain/check/testdata/operators/overloaded/implicit_as.carbon @@ -200,6 +200,7 @@ fn Test() { // CHECK:STDOUT: !members: // CHECK:STDOUT: .X = // CHECK:STDOUT: .Convert = %i32.as.ImplicitAs.impl.Convert.decl +// CHECK:STDOUT: extend %ImplicitAs.type // CHECK:STDOUT: witness = %ImplicitAs.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: @@ -224,6 +225,7 @@ fn Test() { // CHECK:STDOUT: !members: // CHECK:STDOUT: .X = // CHECK:STDOUT: .Convert = %X.as.ImplicitAs.impl.Convert.decl +// CHECK:STDOUT: extend %ImplicitAs.type // CHECK:STDOUT: witness = %ImplicitAs.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/operators/overloaded/index.carbon b/toolchain/check/testdata/operators/overloaded/index.carbon index fabf92b0c757..7eb4624a1352 100644 --- a/toolchain/check/testdata/operators/overloaded/index.carbon +++ b/toolchain/check/testdata/operators/overloaded/index.carbon @@ -443,6 +443,7 @@ fn F() { // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .At = %C.as.IndexWith.impl.At.decl +// CHECK:STDOUT: extend %IndexWith.type // CHECK:STDOUT: witness = %IndexWith.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/operators/overloaded/index_with_prelude.carbon b/toolchain/check/testdata/operators/overloaded/index_with_prelude.carbon index f600d9501c6f..3b106ee7a039 100644 --- a/toolchain/check/testdata/operators/overloaded/index_with_prelude.carbon +++ b/toolchain/check/testdata/operators/overloaded/index_with_prelude.carbon @@ -106,12 +106,12 @@ let x: i32 = c[0]; // CHECK:STDOUT: %IndexWith.impl_witness: = impl_witness @C.as.IndexWith.impl.%IndexWith.impl_witness_table [concrete] // CHECK:STDOUT: %pattern_type.7c7: type = pattern_type %C [concrete] // CHECK:STDOUT: %pattern_type.541: type = pattern_type %SubscriptType.9ec [concrete] +// CHECK:STDOUT: %IndexWith.facet: %IndexWith.type.bbe = facet_value %C, (%IndexWith.impl_witness) [concrete] +// CHECK:STDOUT: %IndexWith.WithSelf.At.type.cc5: type = fn_type @IndexWith.WithSelf.At, @IndexWith.WithSelf(%SubscriptType.9ec, %IndexWith.facet) [concrete] // CHECK:STDOUT: %.312: Core.Form = init_form %ElementType [concrete] // CHECK:STDOUT: %pattern_type.fde: type = pattern_type %ElementType [concrete] // CHECK:STDOUT: %C.as.IndexWith.impl.At.type: type = fn_type @C.as.IndexWith.impl.At [concrete] // CHECK:STDOUT: %C.as.IndexWith.impl.At: %C.as.IndexWith.impl.At.type = struct_value () [concrete] -// CHECK:STDOUT: %IndexWith.facet: %IndexWith.type.bbe = facet_value %C, (%IndexWith.impl_witness) [concrete] -// CHECK:STDOUT: %IndexWith.WithSelf.At.type.cc5: type = fn_type @IndexWith.WithSelf.At, @IndexWith.WithSelf(%SubscriptType.9ec, %IndexWith.facet) [concrete] // CHECK:STDOUT: %empty_struct: %empty_struct_type = struct_value () [concrete] // CHECK:STDOUT: %ElementType.val: %ElementType = struct_value () [concrete] // CHECK:STDOUT: %SubscriptType.val: %SubscriptType.9ec = struct_value () [concrete] @@ -205,8 +205,11 @@ let x: i32 = c[0]; // CHECK:STDOUT: %return.param_patt: %pattern_type.fde = out_param_pattern [concrete] // CHECK:STDOUT: %return.patt: %pattern_type.fde = return_slot_pattern %return.param_patt, %ElementType.ref [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %ElementType.ref: type = name_ref ElementType, file.%ElementType.decl [concrete = constants.%ElementType] -// CHECK:STDOUT: %.loc9: Core.Form = init_form %ElementType.ref [concrete = constants.%.312] +// CHECK:STDOUT: %IndexWith.facet: %IndexWith.type.bbe = facet_value @C.as.IndexWith.impl.%C.ref, (constants.%IndexWith.impl_witness) [concrete = constants.%IndexWith.facet] +// CHECK:STDOUT: %.loc9_64.1: %IndexWith.type.bbe = converted @C.as.IndexWith.impl.%C.ref, %IndexWith.facet [concrete = constants.%IndexWith.facet] +// CHECK:STDOUT: %impl.elem0: type = impl_witness_access constants.%IndexWith.impl_witness, element0 [concrete = constants.%ElementType] +// CHECK:STDOUT: %ElementType.ref: type = name_ref ElementType, %impl.elem0 [concrete = constants.%ElementType] +// CHECK:STDOUT: %.loc9_64.2: Core.Form = init_form %ElementType.ref [concrete = constants.%.312] // CHECK:STDOUT: %self.param: %C = value_param call_param0 // CHECK:STDOUT: %Self.ref: type = name_ref Self, @C.as.IndexWith.impl.%C.ref [concrete = constants.%C] // CHECK:STDOUT: %self: %C = value_binding self, %self.param @@ -224,6 +227,7 @@ let x: i32 = c[0]; // CHECK:STDOUT: .SubscriptType = // CHECK:STDOUT: .ElementType = // CHECK:STDOUT: .At = %C.as.IndexWith.impl.At.decl +// CHECK:STDOUT: extend %.loc8_41 // CHECK:STDOUT: witness = %IndexWith.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: @@ -420,6 +424,7 @@ let x: i32 = c[0]; // CHECK:STDOUT: !members: // CHECK:STDOUT: .C = // CHECK:STDOUT: .At = %tuple.type.as.IndexWith.impl.At.decl +// CHECK:STDOUT: extend %.loc8_50 // CHECK:STDOUT: witness = %IndexWith.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: @@ -491,6 +496,7 @@ let x: i32 = c[0]; // CHECK:STDOUT: %IndexWith.impl_witness: = impl_witness @C.as.IndexWith.impl.%IndexWith.impl_witness_table [concrete] // CHECK:STDOUT: %pattern_type.7c7: type = pattern_type %C [concrete] // CHECK:STDOUT: %pattern_type.541: type = pattern_type %SubscriptType.9ec [concrete] +// CHECK:STDOUT: %IndexWith.facet: %IndexWith.type.bbe = facet_value %C, (%IndexWith.impl_witness) [concrete] // CHECK:STDOUT: %.312: Core.Form = init_form %ElementType [concrete] // CHECK:STDOUT: %pattern_type.fde: type = pattern_type %ElementType [concrete] // CHECK:STDOUT: %C.as.IndexWith.impl.At.type: type = fn_type @C.as.IndexWith.impl.At [concrete] @@ -573,8 +579,11 @@ let x: i32 = c[0]; // CHECK:STDOUT: %return.param_patt: %pattern_type.fde = out_param_pattern [concrete] // CHECK:STDOUT: %return.patt: %pattern_type.fde = return_slot_pattern %return.param_patt, %ElementType.ref [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %ElementType.ref: type = name_ref ElementType, file.%ElementType.decl [concrete = constants.%ElementType] -// CHECK:STDOUT: %.loc9: Core.Form = init_form %ElementType.ref [concrete = constants.%.312] +// CHECK:STDOUT: %IndexWith.facet: %IndexWith.type.bbe = facet_value @C.as.IndexWith.impl.%C.ref, (constants.%IndexWith.impl_witness) [concrete = constants.%IndexWith.facet] +// CHECK:STDOUT: %.loc9_64.1: %IndexWith.type.bbe = converted @C.as.IndexWith.impl.%C.ref, %IndexWith.facet [concrete = constants.%IndexWith.facet] +// CHECK:STDOUT: %impl.elem0: type = impl_witness_access constants.%IndexWith.impl_witness, element0 [concrete = constants.%ElementType] +// CHECK:STDOUT: %ElementType.ref: type = name_ref ElementType, %impl.elem0 [concrete = constants.%ElementType] +// CHECK:STDOUT: %.loc9_64.2: Core.Form = init_form %ElementType.ref [concrete = constants.%.312] // CHECK:STDOUT: %self.param: %C = value_param call_param0 // CHECK:STDOUT: %Self.ref: type = name_ref Self, @C.as.IndexWith.impl.%C.ref [concrete = constants.%C] // CHECK:STDOUT: %self: %C = value_binding self, %self.param @@ -592,6 +601,7 @@ let x: i32 = c[0]; // CHECK:STDOUT: .SubscriptType = // CHECK:STDOUT: .ElementType = // CHECK:STDOUT: .At = %C.as.IndexWith.impl.At.decl +// CHECK:STDOUT: extend %.loc8_41 // CHECK:STDOUT: witness = %IndexWith.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/operators/overloaded/ordered.carbon b/toolchain/check/testdata/operators/overloaded/ordered.carbon index 7e5f689c3144..1a9c708c0811 100644 --- a/toolchain/check/testdata/operators/overloaded/ordered.carbon +++ b/toolchain/check/testdata/operators/overloaded/ordered.carbon @@ -314,6 +314,7 @@ fn TestGreaterEqual(a: D, b: D) -> bool { // CHECK:STDOUT: .LessOrEquivalent = %C.as.OrderedWith.impl.LessOrEquivalent.decl // CHECK:STDOUT: .Greater = %C.as.OrderedWith.impl.Greater.decl // CHECK:STDOUT: .GreaterOrEquivalent = %C.as.OrderedWith.impl.GreaterOrEquivalent.decl +// CHECK:STDOUT: extend %OrderedWith.type // CHECK:STDOUT: witness = %OrderedWith.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/return/import_convert_function.carbon b/toolchain/check/testdata/return/import_convert_function.carbon index dfd79890decb..7663e2d70bd5 100644 --- a/toolchain/check/testdata/return/import_convert_function.carbon +++ b/toolchain/check/testdata/return/import_convert_function.carbon @@ -354,6 +354,7 @@ fn F0(unused n: i32) -> P.D { // CHECK:STDOUT: .D = // CHECK:STDOUT: .Convert = %C.as.ImplicitAs.impl.Convert.decl // CHECK:STDOUT: .Make = +// CHECK:STDOUT: extend %ImplicitAs.type // CHECK:STDOUT: witness = %ImplicitAs.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: @@ -379,6 +380,7 @@ fn F0(unused n: i32) -> P.D { // CHECK:STDOUT: .D = // CHECK:STDOUT: .Convert = %C.as.ImplicitAs.impl.Convert.decl // CHECK:STDOUT: .Make = +// CHECK:STDOUT: extend %ImplicitAs.type // CHECK:STDOUT: witness = %ImplicitAs.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: @@ -404,6 +406,7 @@ fn F0(unused n: i32) -> P.D { // CHECK:STDOUT: .D = // CHECK:STDOUT: .Convert = %C.as.ImplicitAs.impl.Convert.decl // CHECK:STDOUT: .Make = +// CHECK:STDOUT: extend %ImplicitAs.type // CHECK:STDOUT: witness = %ImplicitAs.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: @@ -429,6 +432,7 @@ fn F0(unused n: i32) -> P.D { // CHECK:STDOUT: .D = // CHECK:STDOUT: .Convert = %C.as.ImplicitAs.impl.Convert.decl // CHECK:STDOUT: .Make = +// CHECK:STDOUT: extend %ImplicitAs.type // CHECK:STDOUT: witness = %ImplicitAs.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: @@ -454,6 +458,7 @@ fn F0(unused n: i32) -> P.D { // CHECK:STDOUT: .D = // CHECK:STDOUT: .Convert = %C.as.ImplicitAs.impl.Convert.decl // CHECK:STDOUT: .Make = +// CHECK:STDOUT: extend %ImplicitAs.type // CHECK:STDOUT: witness = %ImplicitAs.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: @@ -479,6 +484,7 @@ fn F0(unused n: i32) -> P.D { // CHECK:STDOUT: .D = // CHECK:STDOUT: .Convert = %C.as.ImplicitAs.impl.Convert.decl // CHECK:STDOUT: .Make = +// CHECK:STDOUT: extend %ImplicitAs.type // CHECK:STDOUT: witness = %ImplicitAs.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: @@ -504,6 +510,7 @@ fn F0(unused n: i32) -> P.D { // CHECK:STDOUT: .D = // CHECK:STDOUT: .Convert = %C.as.ImplicitAs.impl.Convert.decl // CHECK:STDOUT: .Make = +// CHECK:STDOUT: extend %ImplicitAs.type // CHECK:STDOUT: witness = %ImplicitAs.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: @@ -529,6 +536,7 @@ fn F0(unused n: i32) -> P.D { // CHECK:STDOUT: .D = // CHECK:STDOUT: .Convert = %C.as.ImplicitAs.impl.Convert.decl // CHECK:STDOUT: .Make = +// CHECK:STDOUT: extend %ImplicitAs.type // CHECK:STDOUT: witness = %ImplicitAs.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/impl/import_facet.carbon b/toolchain/lower/testdata/impl/import_facet.carbon index 1d33b43acbc8..9b2254fdd791 100644 --- a/toolchain/lower/testdata/impl/import_facet.carbon +++ b/toolchain/lower/testdata/impl/import_facet.carbon @@ -36,9 +36,9 @@ interface I { library "[[@TEST_NAME]]"; export import library "b"; -class D(T:! type) { - impl as I where .T = T* { - fn GetI[unused self: Self]() -> C(T*) { +class D(U:! type) { + impl as I where .T = U* { + fn GetI[unused self: Self]() -> C(U*) { return {}; } } diff --git a/toolchain/sem_ir/name_scope.h b/toolchain/sem_ir/name_scope.h index 0cb68538e7f4..9112de730fbe 100644 --- a/toolchain/sem_ir/name_scope.h +++ b/toolchain/sem_ir/name_scope.h @@ -202,6 +202,7 @@ class NameScope : public Printable { inst_id_ = inst_id; name_id_ = name_id; parent_scope_id_ = parent_scope_id; + self_type_id_ = InstId::None; } auto inst_id() const -> InstId { return inst_id_; } @@ -249,14 +250,10 @@ class NameScope : public Printable { import_ir_scopes_.push_back(import_ir_scope); } - auto is_interface_definition() const -> bool { - return is_interface_definition_; - } + auto self_type_id() const -> InstId { return self_type_id_; } - // TODO: Figure out a better way of setting this and is_cpp_scope() than - // calling a function immediately after construction. - auto set_is_interface_definition() -> void { - is_interface_definition_ = true; + auto set_self_type_id(InstId self_type_id) -> void { + self_type_id_ = self_type_id; } private: @@ -291,6 +288,15 @@ class NameScope : public Printable { // The parent scope. NameScopeId parent_scope_id_; + // The `Self` value that should be used implicitly for unqualified lookups in + // this scope that find associated entities, if any. This is used for lookups + // in `interface`, `impl`, and `class` scopes so that unqualified names of + // associated entities resolve to their corresponding values rather than to an + // unbound associated entity constant. + // TODO: Instead of storing this separately, can we look up `SelfType` in the + // scope's name lookup table? + InstId self_type_id_ = InstId::None; + // Whether we have diagnosed an error in a construct that would have added // names to this scope. For example, this can happen if an `import` failed or // an `extend` declaration was ill-formed. If true, names are assumed to be @@ -301,10 +307,6 @@ class NameScope : public Printable { // True if this is a closed namespace created by importing a package. bool is_closed_import_ = false; - // True if this is the scope of an interface definition, where associated - // entities will be bound to the interface's `Self` symbolic type. - bool is_interface_definition_ = false; - // True if this scope was imported from C++. Set if this is the `Cpp` scope or // a scope inside `Cpp`. bool is_cpp_scope_ = false; @@ -352,6 +354,26 @@ class NameScopeStore { auto GetInstIfValid(NameScopeId scope_id) const -> std::pair>; + // Returns whether the specified name scope is owned by an instruction of the + // specified kind. Returns false for `NameScopeId::None`. + template + auto InstIs(NameScopeId scope_id) const -> bool { + auto [inst_id, inst] = GetInstIfValid(scope_id); + return inst && inst->Is(); + } + + // Returns the instruction owning the requested name scope if there is one and + // it is of the specified kind. Returns `nullopt` otherwise, and for + // `NameScopeId::None`. + template + auto TryGetInstAs(NameScopeId scope_id) const -> std::optional { + auto [inst_id, inst] = GetInstIfValid(scope_id); + if (!inst.has_value()) { + return std::nullopt; + } + return inst->TryAs(); + } + // Returns whether the provided scope ID is for the Core package. auto IsCorePackage(NameScopeId scope_id) const -> bool { return scope_id.has_value() && Get(scope_id).name_id() == NameId::Core;